Module Name:    src
Committed By:   jmcneill
Date:           Mon Oct 23 15:21:11 UTC 2017

Modified Files:
        src/sys/dev/ic: bwfm.c

Log Message:
Initialize txrate to 0 for new associations; firmware handles rate adaptation 
for us


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/bwfm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/bwfm.c
diff -u src/sys/dev/ic/bwfm.c:1.3 src/sys/dev/ic/bwfm.c:1.4
--- src/sys/dev/ic/bwfm.c:1.3	Mon Oct 23 09:31:17 2017
+++ src/sys/dev/ic/bwfm.c	Mon Oct 23 15:21:10 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: bwfm.c,v 1.3 2017/10/23 09:31:17 msaitoh Exp $ */
+/* $NetBSD: bwfm.c,v 1.4 2017/10/23 15:21:10 jmcneill Exp $ */
 /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */
 /*
  * Copyright (c) 2010-2016 Broadcom Corporation
@@ -71,6 +71,7 @@ int	 bwfm_key_set(struct ieee80211com *,
 int	 bwfm_key_delete(struct ieee80211com *, const struct ieee80211_key *);
 int	 bwfm_newstate(struct ieee80211com *, enum ieee80211_state, int);
 void	 bwfm_newstate_cb(struct bwfm_softc *, struct bwfm_cmd_newstate *);
+void	 bwfm_newassoc(struct ieee80211_node *, int);
 void	 bwfm_task(struct work *, void *);
 
 int	 bwfm_chip_attach(struct bwfm_softc *);
@@ -248,6 +249,7 @@ bwfm_attach(struct bwfm_softc *sc)
 
 	sc->sc_newstate = ic->ic_newstate;
 	ic->ic_newstate = bwfm_newstate;
+	ic->ic_newassoc = bwfm_newassoc;
 	ic->ic_send_mgmt = bwfm_send_mgmt;
 	ic->ic_recv_mgmt = bwfm_recv_mgmt;
 	ic->ic_crypto.cs_key_set = bwfm_key_set;
@@ -725,6 +727,13 @@ bwfm_newstate_cb(struct bwfm_softc *sc, 
 }
 
 void
+bwfm_newassoc(struct ieee80211_node *ni, int isnew)
+{
+	/* Firmware handles rate adaptation for us */
+	ni->ni_txrate = 0;
+}
+
+void
 bwfm_task(struct work *wk, void *arg)
 {
 	struct bwfm_task *t = (struct bwfm_task *)wk;

Reply via email to