Re: svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
On Fri, 11 Sep 2020 14:20:22 + "Bjoern A. Zeeb" wrote: > On 11 Sep 2020, at 14:02, Tomoaki AOKI wrote: > > > On Thu, 10 Sep 2020 10:22:05 + > > "Bjoern A. Zeeb" wrote: > > > >> On 9 Sep 2020, at 22:41, Tomoaki AOKI wrote: > >> > >>> This breaks at least iwm. (Other drivers not tested.) > >>> > >>> Messages below are repeatedly shown and no carrier detected. > >>> Manually reverting this commit fixes the issue. > >>> > >>> iwm0: failed to send antennas before calibration: 35 > >>> iwm_run_init_ucode: failed 35 > >>> iwm_init_hw failed 35 > >>> iwm0: could not initiate scan > >>> > >>> > >>> and lesser times messages below. > >>> > >>> iwm0: iwm_send_phy_db_data: Cannot send HCMD of Phy DB cfg section, > >>> 35 > >>> iwm_init_hw failed 35 > >>> iwm0: could not initiate scan > >>> > >> > >> > >> I’ll try to test iwm as well, in case you are faster, can you > >> please > >> try this instead of reverting; the previous version never made it > >> past > >> the first return anymore in the last years it seems, so we can remove > >> the function entirely to keep the status quo: > >> > >> Sorry for the oversight. > > > > Your patch (needed to fix some line wrapping, though) fixed the issue > > for me. Thanks! > > Committed in r365633 in HEAD. stable/12 already has the fix (#if 0ed > the code). > I’ll merged the change in 3 days to keep the code in sync. > > > Thanks a lot for reporting and testing! > > Bjoern Confirmed. Thanks! > ___ > freebsd-curr...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > -- Tomoaki AOKI ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
On 11 Sep 2020, at 14:02, Tomoaki AOKI wrote: On Thu, 10 Sep 2020 10:22:05 + "Bjoern A. Zeeb" wrote: On 9 Sep 2020, at 22:41, Tomoaki AOKI wrote: This breaks at least iwm. (Other drivers not tested.) Messages below are repeatedly shown and no carrier detected. Manually reverting this commit fixes the issue. iwm0: failed to send antennas before calibration: 35 iwm_run_init_ucode: failed 35 iwm_init_hw failed 35 iwm0: could not initiate scan and lesser times messages below. iwm0: iwm_send_phy_db_data: Cannot send HCMD of Phy DB cfg section, 35 iwm_init_hw failed 35 iwm0: could not initiate scan I’ll try to test iwm as well, in case you are faster, can you please try this instead of reverting; the previous version never made it past the first return anymore in the last years it seems, so we can remove the function entirely to keep the status quo: Sorry for the oversight. Your patch (needed to fix some line wrapping, though) fixed the issue for me. Thanks! Committed in r365633 in HEAD. stable/12 already has the fix (#if 0ed the code). I’ll merged the change in 3 days to keep the code in sync. Thanks a lot for reporting and testing! Bjoern ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
On Thu, 10 Sep 2020 10:22:05 + "Bjoern A. Zeeb" wrote: > On 9 Sep 2020, at 22:41, Tomoaki AOKI wrote: > > > This breaks at least iwm. (Other drivers not tested.) > > > > Messages below are repeatedly shown and no carrier detected. > > Manually reverting this commit fixes the issue. > > > > iwm0: failed to send antennas before calibration: 35 > > iwm_run_init_ucode: failed 35 > > iwm_init_hw failed 35 > > iwm0: could not initiate scan > > > > > > and lesser times messages below. > > > > iwm0: iwm_send_phy_db_data: Cannot send HCMD of Phy DB cfg section, 35 > > iwm_init_hw failed 35 > > iwm0: could not initiate scan > > > > > I’ll try to test iwm as well, in case you are faster, can you please > try this instead of reverting; the previous version never made it past > the first return anymore in the last years it seems, so we can remove > the function entirely to keep the status quo: > > Sorry for the oversight. Your patch (needed to fix some line wrapping, though) fixed the issue for me. Thanks! BTW, I also needed to revert r365549 [1] not to fail build, regardless your patch is applied or not. Just now, I noticed a fix is proposed [2] via phablicator by Alan Somers, but I've not tested it yet. [1] https://lists.freebsd.org/pipermail/svn-src-head/2020-September/139761.html [2] https://lists.freebsd.org/pipermail/freebsd-current/2020-September/077095.html Regards. > > > Index: if_iwm.c > === > --- if_iwm.c(revision 365559) > +++ if_iwm.c(working copy) > @@ -354,7 +354,6 @@ static struct ieee80211_node * > static uint8_t iwm_rate_from_ucode_rate(uint32_t); > static int iwm_rate2ridx(struct iwm_softc *, uint8_t); > static voidiwm_setrates(struct iwm_softc *, struct iwm_node *, > int); > -static int iwm_media_change(struct ifnet *); > static int iwm_newstate(struct ieee80211vap *, enum > ieee80211_state, int); > static voidiwm_endscan_cb(void *, int); > static int iwm_send_bt_init_conf(struct iwm_softc *); > @@ -4417,27 +4416,6 @@ iwm_setrates(struct iwm_softc *sc, struct > iwm_node > } > } > > -static int > -iwm_media_change(struct ifnet *ifp) > -{ > - struct ieee80211vap *vap = ifp->if_softc; > - struct ieee80211com *ic = vap->iv_ic; > - struct iwm_softc *sc = ic->ic_softc; > - int error; > - > - error = ieee80211_media_change(ifp); > - if (error != 0) > - return (error); > - > - IWM_LOCK(sc); > - if (ic->ic_nrunning > 0) { > - iwm_stop(sc); > - iwm_init(sc); > - } > - IWM_UNLOCK(sc); > - return (0); > -} > - > static void > iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap > *vap) > { > @@ -6432,8 +6410,8 @@ iwm_vap_create(struct ieee80211com *ic, const char > > ieee80211_ratectl_init(vap); > /* Complete setup. */ > - ieee80211_vap_attach(vap, iwm_media_change, > ieee80211_media_status, > - mac); > + ieee80211_vap_attach(vap, ieee80211_media_change, > + ieee80211_media_status, mac); > ic->ic_opmode = opmode; > > return vap; > > > > > > > >> Author: bz > >> Date: Mon Sep 7 15:35:40 2020 > >> New Revision: 365419 > >> URL: https://svnweb.freebsd.org/changeset/base/365419 > >> > >> Log: > >> 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 > >> > >> Modified: > >> head/sys/dev/ath/if_ath.c > >> head/sys/dev/bwi/if_bwi.c > >> head/sys/dev/iwm/if_iwm.c > >> head/sys/dev/iwn/if_iwn.c > >> head/sys/dev/mwl/if_mwl.c > >> head/sys/dev/otus/if_otus.c > >> head/sys/dev/usb/wlan/if_run.c > >> head/sys/dev/wtap/if_wtap.c > >> > >> Modified: head/sys/dev/ath/if_ath.c > >> == > >> --- head/sys/dev/ath/if_ath.c Mon Sep 7 14:40:33 2020 > >> (r365418) > >> +++ head/sys/dev/ath/if_ath.c Mon Sep 7 15:35:40 2020 > >> (r365419) > >> @@ -160,7 +160,6 @@ static int ath_init(struct ath_softc *); > >> static void ath_stop(struct ath_softc
Re: svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
On 9 Sep 2020, at 22:41, Tomoaki AOKI wrote: This breaks at least iwm. (Other drivers not tested.) Messages below are repeatedly shown and no carrier detected. Manually reverting this commit fixes the issue. iwm0: failed to send antennas before calibration: 35 iwm_run_init_ucode: failed 35 iwm_init_hw failed 35 iwm0: could not initiate scan and lesser times messages below. iwm0: iwm_send_phy_db_data: Cannot send HCMD of Phy DB cfg section, 35 iwm_init_hw failed 35 iwm0: could not initiate scan I’ll try to test iwm as well, in case you are faster, can you please try this instead of reverting; the previous version never made it past the first return anymore in the last years it seems, so we can remove the function entirely to keep the status quo: Sorry for the oversight. Index: if_iwm.c === --- if_iwm.c(revision 365559) +++ if_iwm.c(working copy) @@ -354,7 +354,6 @@ static struct ieee80211_node * static uint8_t iwm_rate_from_ucode_rate(uint32_t); static int iwm_rate2ridx(struct iwm_softc *, uint8_t); static voidiwm_setrates(struct iwm_softc *, struct iwm_node *, int); -static int iwm_media_change(struct ifnet *); static int iwm_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidiwm_endscan_cb(void *, int); static int iwm_send_bt_init_conf(struct iwm_softc *); @@ -4417,27 +4416,6 @@ iwm_setrates(struct iwm_softc *sc, struct iwm_node } } -static int -iwm_media_change(struct ifnet *ifp) -{ - struct ieee80211vap *vap = ifp->if_softc; - struct ieee80211com *ic = vap->iv_ic; - struct iwm_softc *sc = ic->ic_softc; - int error; - - error = ieee80211_media_change(ifp); - if (error != 0) - return (error); - - IWM_LOCK(sc); - if (ic->ic_nrunning > 0) { - iwm_stop(sc); - iwm_init(sc); - } - IWM_UNLOCK(sc); - return (0); -} - static void iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap) { @@ -6432,8 +6410,8 @@ iwm_vap_create(struct ieee80211com *ic, const char ieee80211_ratectl_init(vap); /* Complete setup. */ - ieee80211_vap_attach(vap, iwm_media_change, ieee80211_media_status, - mac); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status, mac); ic->ic_opmode = opmode; return vap; Author: bz Date: Mon Sep 7 15:35:40 2020 New Revision: 365419 URL: https://svnweb.freebsd.org/changeset/base/365419 Log: 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 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/bwi/if_bwi.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/mwl/if_mwl.c head/sys/dev/otus/if_otus.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/ath/if_ath.c Mon Sep 7 15:35:40 2020(r365419) @@ -160,7 +160,6 @@ static int ath_init(struct ath_softc *); static voidath_stop(struct ath_softc *); static int ath_reset_vap(struct ieee80211vap *, u_long); static int ath_transmit(struct ieee80211com *, struct mbuf *); -static int ath_media_change(struct ifnet *); static voidath_watchdog(void *); static voidath_parent(struct ieee80211com *); static voidath_fatal_proc(void *, int); (snip) Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 7 15:35:40 2020(r365419) @@ -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); }
Re: svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
This breaks at least iwm. (Other drivers not tested.) Messages below are repeatedly shown and no carrier detected. Manually reverting this commit fixes the issue. iwm0: failed to send antennas before calibration: 35 iwm_run_init_ucode: failed 35 iwm_init_hw failed 35 iwm0: could not initiate scan and lesser times messages below. iwm0: iwm_send_phy_db_data: Cannot send HCMD of Phy DB cfg section, 35 iwm_init_hw failed 35 iwm0: could not initiate scan > Author: bz > Date: Mon Sep 7 15:35:40 2020 > New Revision: 365419 > URL: https://svnweb.freebsd.org/changeset/base/365419 > > Log: > 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 > > Modified: > head/sys/dev/ath/if_ath.c > head/sys/dev/bwi/if_bwi.c > head/sys/dev/iwm/if_iwm.c > head/sys/dev/iwn/if_iwn.c > head/sys/dev/mwl/if_mwl.c > head/sys/dev/otus/if_otus.c > head/sys/dev/usb/wlan/if_run.c > head/sys/dev/wtap/if_wtap.c > > Modified: head/sys/dev/ath/if_ath.c > == > --- head/sys/dev/ath/if_ath.c Mon Sep 7 14:40:33 2020(r365418) > +++ head/sys/dev/ath/if_ath.c Mon Sep 7 15:35:40 2020(r365419) > @@ -160,7 +160,6 @@ static intath_init(struct ath_softc *); > static void ath_stop(struct ath_softc *); > static int ath_reset_vap(struct ieee80211vap *, u_long); > static int ath_transmit(struct ieee80211com *, struct mbuf *); > -static int ath_media_change(struct ifnet *); > static void ath_watchdog(void *); > static void ath_parent(struct ieee80211com *); > static void ath_fatal_proc(void *, int); (snip) > Modified: head/sys/dev/iwm/if_iwm.c > == > --- head/sys/dev/iwm/if_iwm.c Mon Sep 7 14:40:33 2020(r365418) > +++ head/sys/dev/iwm/if_iwm.c Mon Sep 7 15:35:40 2020(r365419) > @@ -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 (snip) -- Tomoaki AOKI ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
Author: bz Date: Mon Sep 7 15:35:40 2020 New Revision: 365419 URL: https://svnweb.freebsd.org/changeset/base/365419 Log: 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 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/bwi/if_bwi.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/mwl/if_mwl.c head/sys/dev/otus/if_otus.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/ath/if_ath.c Mon Sep 7 15:35:40 2020(r365419) @@ -160,7 +160,6 @@ static int ath_init(struct ath_softc *); static voidath_stop(struct ath_softc *); static int ath_reset_vap(struct ieee80211vap *, u_long); static int ath_transmit(struct ieee80211com *, struct mbuf *); -static int ath_media_change(struct ifnet *); static voidath_watchdog(void *); static voidath_parent(struct ieee80211com *); static voidath_fatal_proc(void *, int); @@ -1766,8 +1765,8 @@ ath_vap_create(struct ieee80211com *ic, const char nam ATH_UNLOCK(sc); /* complete setup */ - ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status, - mac); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status, mac); return vap; bad2: reclaim_address(sc, mac); @@ -3541,14 +3540,6 @@ finish: ATH_KTR(sc, ATH_KTR_TX, 0, "ath_transmit: finished"); return (retval); -} - -static int -ath_media_change(struct ifnet *ifp) -{ - int error = ieee80211_media_change(ifp); - /* NB: only the fixed rate can change and that doesn't need a reset */ - return (error == ENETRESET ? 0 : error); } /* Modified: head/sys/dev/bwi/if_bwi.c == --- head/sys/dev/bwi/if_bwi.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/bwi/if_bwi.c Mon Sep 7 15:35:40 2020(r365419) @@ -118,7 +118,6 @@ static void bwi_set_channel(struct ieee80211com *); static voidbwi_scan_end(struct ieee80211com *); static int bwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidbwi_updateslot(struct ieee80211com *); -static int bwi_media_change(struct ifnet *); static voidbwi_calibrate(void *); @@ -607,8 +606,8 @@ bwi_vap_create(struct ieee80211com *ic, const char nam ieee80211_ratectl_init(vap); /* complete setup */ - ieee80211_vap_attach(vap, bwi_media_change, ieee80211_media_status, - mac); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status, mac); ic->ic_opmode = opmode; return vap; } @@ -1807,14 +1806,6 @@ back: BWI_UNLOCK(sc); return error; -} - -static int -bwi_media_change(struct ifnet *ifp) -{ - int error = ieee80211_media_change(ifp); - /* NB: only the fixed rate can change and that doesn't need a reset */ - return (error == ENETRESET ? 0 : error); } static int Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 7 15:35:40 2020(r365419) @@ -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 Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/iwn/if_iwn.c Mon Sep 7 15:35:40 2020(r365419) @@ -194,7 +194,6 @@ static void iwn_read_eeprom_enhinfo(struct