mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 15:22:34 -04:00
LinuxKPI: 802.11: make sure AUTH frames are not being sent if BSS changed
iwlwifi keeps logging 'Invalid TXQ id' even after previous changes to catch the BSS changed. The reason for this is that we do not error in the SCAN -> AUTH path as otherwise we would not have the state machine get us back to SCAN to clear up firmware state before auth/assoc to the new BSS. If we are not in synch as net80211 just swapped the iv_bss from under us, disable the TX queue for the (old) lsta to prevent the AUTH frame sent from sta_newstate() reaching the driver. After all we are not trying to authenticate to that node (sta) anymore. Sponsored by: The FreeBSD Foundation PR: 274382 MFC after: 3 days
This commit is contained in:
parent
7080a0c170
commit
16d987fe78
1 changed files with 14 additions and 10 deletions
|
|
@ -2021,6 +2021,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
|
|||
struct ieee80211_prep_tx_info prep_tx_info;
|
||||
uint32_t changed;
|
||||
int error;
|
||||
bool synched;
|
||||
|
||||
/*
|
||||
* In here we use vap->iv_bss until lvif->lvif_bss is set.
|
||||
|
|
@ -2211,14 +2212,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
|
|||
__func__, ni, ni->ni_drv_data));
|
||||
lsta = ni->ni_drv_data;
|
||||
|
||||
/*
|
||||
* Make sure in case the sta did not change and we re-add it,
|
||||
* that we can tx again.
|
||||
*/
|
||||
LKPI_80211_LSTA_TXQ_LOCK(lsta);
|
||||
lsta->txq_ready = true;
|
||||
LKPI_80211_LSTA_TXQ_UNLOCK(lsta);
|
||||
|
||||
/* Insert the [l]sta into the list of known stations. */
|
||||
list_add_tail(&lsta->lsta_list, &lvif->lsta_list);
|
||||
|
||||
|
|
@ -2292,10 +2285,10 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
|
|||
ieee80211_ref_node(lsta->ni);
|
||||
lvif->lvif_bss = lsta;
|
||||
if (lsta->ni == vap->iv_bss) {
|
||||
lvif->lvif_bss_synched = true;
|
||||
lvif->lvif_bss_synched = synched = true;
|
||||
} else {
|
||||
/* Set to un-synched no matter what. */
|
||||
lvif->lvif_bss_synched = false;
|
||||
lvif->lvif_bss_synched = synched = false;
|
||||
/*
|
||||
* We do not error as someone has to take us down.
|
||||
* If we are followed by a 2nd, new net80211::join1() going to
|
||||
|
|
@ -2305,9 +2298,20 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
|
|||
* to net80211 as we never used the node beyond alloc()/free()
|
||||
* and we do not hold an extra reference for that anymore given
|
||||
* ni : lsta == 1:1.
|
||||
* Problem is if we do not error a MGMT/AUTH frame will be
|
||||
* sent from net80211::sta_newstate(); disable lsta queue below.
|
||||
*/
|
||||
}
|
||||
LKPI_80211_LVIF_UNLOCK(lvif);
|
||||
/*
|
||||
* Make sure in case the sta did not change and we re-added it,
|
||||
* that we can tx again but only if the vif/iv_bss are in sync.
|
||||
* Otherwise this should prevent the MGMT/AUTH frame from being
|
||||
* sent triggering a warning in iwlwifi.
|
||||
*/
|
||||
LKPI_80211_LSTA_TXQ_LOCK(lsta);
|
||||
lsta->txq_ready = synched;
|
||||
LKPI_80211_LSTA_TXQ_UNLOCK(lsta);
|
||||
goto out_relocked;
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Reference in a new issue