Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: drop the connection if firmware crashed while in CSA

Don't bother keeping the link in that case. It is way
too complicated to keep the connection.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210409123755.a126c8833398.I677bdac314dd50d90474a90593902c17f9410cc4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Naftali Goldstein and committed by
Johannes Berg
7dd231eb f12ce9f6

+12 -3
+2
net/mac80211/ieee80211_i.h
··· 1660 1660 void ieee80211_mgd_quiesce(struct ieee80211_sub_if_data *sdata); 1661 1661 void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata); 1662 1662 void ieee80211_sta_handle_tspec_ac_params(struct ieee80211_sub_if_data *sdata); 1663 + void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, 1664 + u8 *bssid, u8 reason, bool tx); 1663 1665 1664 1666 /* IBSS code */ 1665 1667 void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local);
+8 -1
net/mac80211/main.c
··· 5 5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 6 6 * Copyright 2013-2014 Intel Mobile Communications GmbH 7 7 * Copyright (C) 2017 Intel Deutschland GmbH 8 - * Copyright (C) 2018 - 2019 Intel Corporation 8 + * Copyright (C) 2018-2021 Intel Corporation 9 9 */ 10 10 11 11 #include <net/mac80211.h> ··· 282 282 * Then we can have a race... 283 283 */ 284 284 cancel_work_sync(&sdata->u.mgd.csa_connection_drop_work); 285 + if (sdata->vif.csa_active) { 286 + sdata_lock(sdata); 287 + ieee80211_sta_connection_lost(sdata, 288 + sdata->u.mgd.associated->bssid, 289 + WLAN_REASON_UNSPECIFIED, false); 290 + sdata_unlock(sdata); 291 + } 285 292 } 286 293 flush_delayed_work(&sdata->dec_tailroom_needed_wk); 287 294 }
+2 -2
net/mac80211/mlme.c
··· 4384 4384 ieee80211_queue_work(&sdata->local->hw, &sdata->work); 4385 4385 } 4386 4386 4387 - static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, 4388 - u8 *bssid, u8 reason, bool tx) 4387 + void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, 4388 + u8 *bssid, u8 reason, bool tx) 4389 4389 { 4390 4390 u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; 4391 4391