aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iwm
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/iwm
parent5e20b96c6593c24e56a11e1f739dd2fb27cd22f3 (diff)
downloadsrc-c6167b4bf510d82035e8c8db3b0b074045b90916.tar.gz
src-c6167b4bf510d82035e8c8db3b0b074045b90916.zip
WiFi: fix ieee80211_media_change() callers
In r178354 with the introduction of multi-bss ("vap") support factoring out started and with r193340 ieee80211_media_change() no longer returned ENETRESET but only 0 or error. As ieee80211(9) tells the ieee80211_media_change() function should not be called directly but is registered with ieee80211_vap_attach() instead. Some drivers have not been fully converted. After fixing the return checking some of these functions were simply wrappers between ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra function, where possible as well. PR: 248955 Submitted by: Tong Zhang (ztong0001 gmail.com) (original) MFC after: 3 days Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=365419
Diffstat (limited to 'sys/dev/iwm')
-rw-r--r--sys/dev/iwm/if_iwm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index 6207cbc64094..614c75b32339 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -4426,8 +4426,8 @@ iwm_media_change(struct ifnet *ifp)
int error;
error = ieee80211_media_change(ifp);
- if (error != ENETRESET)
- return error;
+ if (error != 0)
+ return (error);
IWM_LOCK(sc);
if (ic->ic_nrunning > 0) {
@@ -4435,7 +4435,7 @@ iwm_media_change(struct ifnet *ifp)
iwm_init(sc);
}
IWM_UNLOCK(sc);
- return error;
+ return (0);
}
static void