The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9597f7cb99b03ecb457b160de621ce3a90bb3e5b

commit 9597f7cb99b03ecb457b160de621ce3a90bb3e5b
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2022-06-26 18:50:36 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2022-06-26 18:50:36 +0000

    Revert "LinuxKPI: 802.11: fix iwlwifi fw assert with older chipsets"
    
    This reverts commit 013e516dc9b1b32e9422ab02a875a05fc2d32f39.
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c 
b/sys/compat/linuxkpi/common/src/linux_80211.c
index 6b265d0e4b2b..0328ff1c7c98 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -1509,14 +1509,23 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum 
ieee80211_state nstate, int
        vif = LVIF_TO_VIF(lvif);
 
        IEEE80211_UNLOCK(vap->iv_ic);
+       ni = NULL;
 
        IMPROVE("ponder some of this moved to ic_newassoc, scan_assoc_success, "
            "and to lesser extend ieee80211_notify_node_join");
 
+       /* Finish assoc. */
+       /* Update sta_state (AUTH to ASSOC) and set aid. */
        ni = ieee80211_ref_node(vap->iv_bss);
        lsta = ni->ni_drv_data;
        KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni));
+       KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not "
+           "AUTH: %#x\n", __func__, lsta, lsta->state));
        sta = LSTA_TO_STA(lsta);
+       sta->aid = IEEE80211_NODE_AID(ni);
+       error = lkpi_80211_mo_sta_state(hw, vif, sta, IEEE80211_STA_ASSOC);
+       if (error != 0)
+               goto out;
 
        IMPROVE("wme / conf_tx [all]");
 
@@ -1550,16 +1559,6 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum 
ieee80211_state nstate, int
 
        lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed);
 
-       /* This MUST come after the bss_info_changed. */
-       /* Finish assoc. */
-       /* Update sta_state (AUTH to ASSOC) and set aid. */
-       KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not "
-           "AUTH: %#x\n", __func__, lsta, lsta->state));
-       sta->aid = IEEE80211_NODE_AID(ni);
-       error = lkpi_80211_mo_sta_state(hw, vif, sta, IEEE80211_STA_ASSOC);
-       if (error != 0)
-               goto out;
-
        /* - change_chanctx (if needed)
         * - event_callback
         */

Reply via email to