aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mwl
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2020-09-07 15:35:40 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2020-09-07 15:35:40 +0000
commitc6167b4bf510d82035e8c8db3b0b074045b90916 (patch)
tree90ea109be3f420769bc4954b03001a21ed71d76c /sys/dev/mwl
parent5e20b96c6593c24e56a11e1f739dd2fb27cd22f3 (diff)
Notes
Diffstat (limited to 'sys/dev/mwl')
-rw-r--r--sys/dev/mwl/if_mwl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index ba80824af2bf..145d12bc4481 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -1471,16 +1471,17 @@ mwl_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
static int
mwl_media_change(struct ifnet *ifp)
{
- struct ieee80211vap *vap = ifp->if_softc;
+ struct ieee80211vap *vap;
int error;
- error = ieee80211_media_change(ifp);
/* NB: only the fixed rate can change and that doesn't need a reset */
- if (error == ENETRESET) {
- mwl_setrates(vap);
- error = 0;
- }
- return error;
+ error = ieee80211_media_change(ifp);
+ if (error != 0)
+ return (error);
+
+ vap = ifp->if_softc;
+ mwl_setrates(vap);
+ return (0);
}
#ifdef MWL_DEBUG