diff options
Diffstat (limited to 'drivers')
27 files changed, 292 insertions, 91 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d4b7a168f7c0..ebc12c521fe0 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -3858,12 +3858,16 @@ void __ath10k_scan_finish(struct ath10k *ar) | |||
3858 | break; | 3858 | break; |
3859 | case ATH10K_SCAN_RUNNING: | 3859 | case ATH10K_SCAN_RUNNING: |
3860 | case ATH10K_SCAN_ABORTING: | 3860 | case ATH10K_SCAN_ABORTING: |
3861 | if (!ar->scan.is_roc) | 3861 | if (!ar->scan.is_roc) { |
3862 | ieee80211_scan_completed(ar->hw, | 3862 | struct cfg80211_scan_info info = { |
3863 | (ar->scan.state == | 3863 | .aborted = (ar->scan.state == |
3864 | ATH10K_SCAN_ABORTING)); | 3864 | ATH10K_SCAN_ABORTING), |
3865 | else if (ar->scan.roc_notify) | 3865 | }; |
3866 | |||
3867 | ieee80211_scan_completed(ar->hw, &info); | ||
3868 | } else if (ar->scan.roc_notify) { | ||
3866 | ieee80211_remain_on_channel_expired(ar->hw); | 3869 | ieee80211_remain_on_channel_expired(ar->hw); |
3870 | } | ||
3867 | /* fall through */ | 3871 | /* fall through */ |
3868 | case ATH10K_SCAN_STARTING: | 3872 | case ATH10K_SCAN_STARTING: |
3869 | ar->scan.state = ATH10K_SCAN_IDLE; | 3873 | ar->scan.state = ATH10K_SCAN_IDLE; |
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 4e11ba06f089..ef5b40ef6d67 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -859,7 +859,11 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason, | |||
859 | struct ath6kl *ar = vif->ar; | 859 | struct ath6kl *ar = vif->ar; |
860 | 860 | ||
861 | if (vif->scan_req) { | 861 | if (vif->scan_req) { |
862 | cfg80211_scan_done(vif->scan_req, true); | 862 | struct cfg80211_scan_info info = { |
863 | .aborted = true, | ||
864 | }; | ||
865 | |||
866 | cfg80211_scan_done(vif->scan_req, &info); | ||
863 | vif->scan_req = NULL; | 867 | vif->scan_req = NULL; |
864 | } | 868 | } |
865 | 869 | ||
@@ -1069,6 +1073,9 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, | |||
1069 | void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted) | 1073 | void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted) |
1070 | { | 1074 | { |
1071 | struct ath6kl *ar = vif->ar; | 1075 | struct ath6kl *ar = vif->ar; |
1076 | struct cfg80211_scan_info info = { | ||
1077 | .aborted = aborted, | ||
1078 | }; | ||
1072 | int i; | 1079 | int i; |
1073 | 1080 | ||
1074 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status%s\n", __func__, | 1081 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status%s\n", __func__, |
@@ -1089,7 +1096,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted) | |||
1089 | } | 1096 | } |
1090 | 1097 | ||
1091 | out: | 1098 | out: |
1092 | cfg80211_scan_done(vif->scan_req, aborted); | 1099 | cfg80211_scan_done(vif->scan_req, &info); |
1093 | vif->scan_req = NULL; | 1100 | vif->scan_req = NULL; |
1094 | } | 1101 | } |
1095 | 1102 | ||
@@ -3614,7 +3621,11 @@ void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready) | |||
3614 | } | 3621 | } |
3615 | 3622 | ||
3616 | if (vif->scan_req) { | 3623 | if (vif->scan_req) { |
3617 | cfg80211_scan_done(vif->scan_req, true); | 3624 | struct cfg80211_scan_info info = { |
3625 | .aborted = true, | ||
3626 | }; | ||
3627 | |||
3628 | cfg80211_scan_done(vif->scan_req, &info); | ||
3618 | vif->scan_req = NULL; | 3629 | vif->scan_req = NULL; |
3619 | } | 3630 | } |
3620 | 3631 | ||
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index e56bafcf5864..57e26a640477 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c | |||
@@ -960,6 +960,9 @@ void ath_roc_complete(struct ath_softc *sc, enum ath_roc_complete_reason reason) | |||
960 | void ath_scan_complete(struct ath_softc *sc, bool abort) | 960 | void ath_scan_complete(struct ath_softc *sc, bool abort) |
961 | { | 961 | { |
962 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 962 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
963 | struct cfg80211_scan_info info = { | ||
964 | .aborted = abort, | ||
965 | }; | ||
963 | 966 | ||
964 | if (abort) | 967 | if (abort) |
965 | ath_dbg(common, CHAN_CTX, "HW scan aborted\n"); | 968 | ath_dbg(common, CHAN_CTX, "HW scan aborted\n"); |
@@ -969,7 +972,7 @@ void ath_scan_complete(struct ath_softc *sc, bool abort) | |||
969 | sc->offchannel.scan_req = NULL; | 972 | sc->offchannel.scan_req = NULL; |
970 | sc->offchannel.scan_vif = NULL; | 973 | sc->offchannel.scan_vif = NULL; |
971 | sc->offchannel.state = ATH_OFFCHANNEL_IDLE; | 974 | sc->offchannel.state = ATH_OFFCHANNEL_IDLE; |
972 | ieee80211_scan_completed(sc->hw, abort); | 975 | ieee80211_scan_completed(sc->hw, &info); |
973 | clear_bit(ATH_OP_SCANNING, &common->op_flags); | 976 | clear_bit(ATH_OP_SCANNING, &common->op_flags); |
974 | spin_lock_bh(&sc->chan_lock); | 977 | spin_lock_bh(&sc->chan_lock); |
975 | if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags)) | 978 | if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags)) |
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 62bf9331bd7f..f0e1175fb76a 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c | |||
@@ -1369,7 +1369,11 @@ static void wil_cfg80211_stop_p2p_device(struct wiphy *wiphy, | |||
1369 | mutex_lock(&wil->mutex); | 1369 | mutex_lock(&wil->mutex); |
1370 | started = wil_p2p_stop_discovery(wil); | 1370 | started = wil_p2p_stop_discovery(wil); |
1371 | if (started && wil->scan_request) { | 1371 | if (started && wil->scan_request) { |
1372 | cfg80211_scan_done(wil->scan_request, 1); | 1372 | struct cfg80211_scan_info info = { |
1373 | .aborted = true, | ||
1374 | }; | ||
1375 | |||
1376 | cfg80211_scan_done(wil->scan_request, &info); | ||
1373 | wil->scan_request = NULL; | 1377 | wil->scan_request = NULL; |
1374 | wil->radio_wdev = wil->wdev; | 1378 | wil->radio_wdev = wil->wdev; |
1375 | } | 1379 | } |
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index 8e31d755bbee..4bc92e54984a 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c | |||
@@ -850,10 +850,14 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw) | |||
850 | mutex_unlock(&wil->wmi_mutex); | 850 | mutex_unlock(&wil->wmi_mutex); |
851 | 851 | ||
852 | if (wil->scan_request) { | 852 | if (wil->scan_request) { |
853 | struct cfg80211_scan_info info = { | ||
854 | .aborted = true, | ||
855 | }; | ||
856 | |||
853 | wil_dbg_misc(wil, "Abort scan_request 0x%p\n", | 857 | wil_dbg_misc(wil, "Abort scan_request 0x%p\n", |
854 | wil->scan_request); | 858 | wil->scan_request); |
855 | del_timer_sync(&wil->scan_timer); | 859 | del_timer_sync(&wil->scan_timer); |
856 | cfg80211_scan_done(wil->scan_request, true); | 860 | cfg80211_scan_done(wil->scan_request, &info); |
857 | wil->scan_request = NULL; | 861 | wil->scan_request = NULL; |
858 | } | 862 | } |
859 | 863 | ||
@@ -1049,10 +1053,14 @@ int __wil_down(struct wil6210_priv *wil) | |||
1049 | (void)wil_p2p_stop_discovery(wil); | 1053 | (void)wil_p2p_stop_discovery(wil); |
1050 | 1054 | ||
1051 | if (wil->scan_request) { | 1055 | if (wil->scan_request) { |
1056 | struct cfg80211_scan_info info = { | ||
1057 | .aborted = true, | ||
1058 | }; | ||
1059 | |||
1052 | wil_dbg_misc(wil, "Abort scan_request 0x%p\n", | 1060 | wil_dbg_misc(wil, "Abort scan_request 0x%p\n", |
1053 | wil->scan_request); | 1061 | wil->scan_request); |
1054 | del_timer_sync(&wil->scan_timer); | 1062 | del_timer_sync(&wil->scan_timer); |
1055 | cfg80211_scan_done(wil->scan_request, true); | 1063 | cfg80211_scan_done(wil->scan_request, &info); |
1056 | wil->scan_request = NULL; | 1064 | wil->scan_request = NULL; |
1057 | } | 1065 | } |
1058 | 1066 | ||
diff --git a/drivers/net/wireless/ath/wil6210/p2p.c b/drivers/net/wireless/ath/wil6210/p2p.c index 213b8259638c..e0f8aa0ebfac 100644 --- a/drivers/net/wireless/ath/wil6210/p2p.c +++ b/drivers/net/wireless/ath/wil6210/p2p.c | |||
@@ -252,8 +252,12 @@ void wil_p2p_search_expired(struct work_struct *work) | |||
252 | mutex_unlock(&wil->mutex); | 252 | mutex_unlock(&wil->mutex); |
253 | 253 | ||
254 | if (started) { | 254 | if (started) { |
255 | struct cfg80211_scan_info info = { | ||
256 | .aborted = false, | ||
257 | }; | ||
258 | |||
255 | mutex_lock(&wil->p2p_wdev_mutex); | 259 | mutex_lock(&wil->p2p_wdev_mutex); |
256 | cfg80211_scan_done(wil->scan_request, 0); | 260 | cfg80211_scan_done(wil->scan_request, &info); |
257 | wil->scan_request = NULL; | 261 | wil->scan_request = NULL; |
258 | wil->radio_wdev = wil->wdev; | 262 | wil->radio_wdev = wil->wdev; |
259 | mutex_unlock(&wil->p2p_wdev_mutex); | 263 | mutex_unlock(&wil->p2p_wdev_mutex); |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index b80c5d850e1e..4d92541913c0 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -426,15 +426,17 @@ static void wmi_evt_scan_complete(struct wil6210_priv *wil, int id, | |||
426 | { | 426 | { |
427 | if (wil->scan_request) { | 427 | if (wil->scan_request) { |
428 | struct wmi_scan_complete_event *data = d; | 428 | struct wmi_scan_complete_event *data = d; |
429 | bool aborted = (data->status != WMI_SCAN_SUCCESS); | 429 | struct cfg80211_scan_info info = { |
430 | .aborted = (data->status != WMI_SCAN_SUCCESS), | ||
431 | }; | ||
430 | 432 | ||
431 | wil_dbg_wmi(wil, "SCAN_COMPLETE(0x%08x)\n", data->status); | 433 | wil_dbg_wmi(wil, "SCAN_COMPLETE(0x%08x)\n", data->status); |
432 | wil_dbg_misc(wil, "Complete scan_request 0x%p aborted %d\n", | 434 | wil_dbg_misc(wil, "Complete scan_request 0x%p aborted %d\n", |
433 | wil->scan_request, aborted); | 435 | wil->scan_request, info.aborted); |
434 | 436 | ||
435 | del_timer_sync(&wil->scan_timer); | 437 | del_timer_sync(&wil->scan_timer); |
436 | mutex_lock(&wil->p2p_wdev_mutex); | 438 | mutex_lock(&wil->p2p_wdev_mutex); |
437 | cfg80211_scan_done(wil->scan_request, aborted); | 439 | cfg80211_scan_done(wil->scan_request, &info); |
438 | wil->radio_wdev = wil->wdev; | 440 | wil->radio_wdev = wil->wdev; |
439 | mutex_unlock(&wil->p2p_wdev_mutex); | 441 | mutex_unlock(&wil->p2p_wdev_mutex); |
440 | wil->scan_request = NULL; | 442 | wil->scan_request = NULL; |
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index 7c108047fb46..0e180677c7fc 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c | |||
@@ -1922,6 +1922,9 @@ static void at76_dwork_hw_scan(struct work_struct *work) | |||
1922 | { | 1922 | { |
1923 | struct at76_priv *priv = container_of(work, struct at76_priv, | 1923 | struct at76_priv *priv = container_of(work, struct at76_priv, |
1924 | dwork_hw_scan.work); | 1924 | dwork_hw_scan.work); |
1925 | struct cfg80211_scan_info info = { | ||
1926 | .aborted = false, | ||
1927 | }; | ||
1925 | int ret; | 1928 | int ret; |
1926 | 1929 | ||
1927 | if (priv->device_unplugged) | 1930 | if (priv->device_unplugged) |
@@ -1948,7 +1951,7 @@ static void at76_dwork_hw_scan(struct work_struct *work) | |||
1948 | 1951 | ||
1949 | mutex_unlock(&priv->mtx); | 1952 | mutex_unlock(&priv->mtx); |
1950 | 1953 | ||
1951 | ieee80211_scan_completed(priv->hw, false); | 1954 | ieee80211_scan_completed(priv->hw, &info); |
1952 | 1955 | ||
1953 | ieee80211_wake_queues(priv->hw); | 1956 | ieee80211_wake_queues(priv->hw); |
1954 | } | 1957 | } |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 264bd638a3d9..afe2b202040a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | |||
@@ -775,9 +775,13 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, | |||
775 | if (!aborted) | 775 | if (!aborted) |
776 | cfg80211_sched_scan_results(cfg_to_wiphy(cfg)); | 776 | cfg80211_sched_scan_results(cfg_to_wiphy(cfg)); |
777 | } else if (scan_request) { | 777 | } else if (scan_request) { |
778 | struct cfg80211_scan_info info = { | ||
779 | .aborted = aborted, | ||
780 | }; | ||
781 | |||
778 | brcmf_dbg(SCAN, "ESCAN Completed scan: %s\n", | 782 | brcmf_dbg(SCAN, "ESCAN Completed scan: %s\n", |
779 | aborted ? "Aborted" : "Done"); | 783 | aborted ? "Aborted" : "Done"); |
780 | cfg80211_scan_done(scan_request, aborted); | 784 | cfg80211_scan_done(scan_request, &info); |
781 | } | 785 | } |
782 | if (!test_and_clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) | 786 | if (!test_and_clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) |
783 | brcmf_dbg(SCAN, "Scan complete, probably P2P scan\n"); | 787 | brcmf_dbg(SCAN, "Scan complete, probably P2P scan\n"); |
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c index eb24b9241bb2..140b6ea8f7cc 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.c +++ b/drivers/net/wireless/intel/iwlegacy/common.c | |||
@@ -1305,10 +1305,14 @@ il_send_scan_abort(struct il_priv *il) | |||
1305 | static void | 1305 | static void |
1306 | il_complete_scan(struct il_priv *il, bool aborted) | 1306 | il_complete_scan(struct il_priv *il, bool aborted) |
1307 | { | 1307 | { |
1308 | struct cfg80211_scan_info info = { | ||
1309 | .aborted = aborted, | ||
1310 | }; | ||
1311 | |||
1308 | /* check if scan was requested from mac80211 */ | 1312 | /* check if scan was requested from mac80211 */ |
1309 | if (il->scan_request) { | 1313 | if (il->scan_request) { |
1310 | D_SCAN("Complete scan in mac80211\n"); | 1314 | D_SCAN("Complete scan in mac80211\n"); |
1311 | ieee80211_scan_completed(il->hw, aborted); | 1315 | ieee80211_scan_completed(il->hw, &info); |
1312 | } | 1316 | } |
1313 | 1317 | ||
1314 | il->scan_vif = NULL; | 1318 | il->scan_vif = NULL; |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c index d01766f16175..17e6a32384d3 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c | |||
@@ -94,10 +94,14 @@ static int iwl_send_scan_abort(struct iwl_priv *priv) | |||
94 | 94 | ||
95 | static void iwl_complete_scan(struct iwl_priv *priv, bool aborted) | 95 | static void iwl_complete_scan(struct iwl_priv *priv, bool aborted) |
96 | { | 96 | { |
97 | struct cfg80211_scan_info info = { | ||
98 | .aborted = aborted, | ||
99 | }; | ||
100 | |||
97 | /* check if scan was requested from mac80211 */ | 101 | /* check if scan was requested from mac80211 */ |
98 | if (priv->scan_request) { | 102 | if (priv->scan_request) { |
99 | IWL_DEBUG_SCAN(priv, "Complete scan in mac80211\n"); | 103 | IWL_DEBUG_SCAN(priv, "Complete scan in mac80211\n"); |
100 | ieee80211_scan_completed(priv->hw, aborted); | 104 | ieee80211_scan_completed(priv->hw, &info); |
101 | } | 105 | } |
102 | 106 | ||
103 | priv->scan_type = IWL_SCAN_NORMAL; | 107 | priv->scan_type = IWL_SCAN_NORMAL; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index e78fc567ff7d..1cac10c5d818 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |||
@@ -391,13 +391,16 @@ void iwl_mvm_rx_lmac_scan_complete_notif(struct iwl_mvm *mvm, | |||
391 | ieee80211_sched_scan_stopped(mvm->hw); | 391 | ieee80211_sched_scan_stopped(mvm->hw); |
392 | mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED; | 392 | mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED; |
393 | } else if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) { | 393 | } else if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) { |
394 | struct cfg80211_scan_info info = { | ||
395 | .aborted = aborted, | ||
396 | }; | ||
397 | |||
394 | IWL_DEBUG_SCAN(mvm, "Regular scan %s, EBS status %s (FW)\n", | 398 | IWL_DEBUG_SCAN(mvm, "Regular scan %s, EBS status %s (FW)\n", |
395 | aborted ? "aborted" : "completed", | 399 | aborted ? "aborted" : "completed", |
396 | iwl_mvm_ebs_status_str(scan_notif->ebs_status)); | 400 | iwl_mvm_ebs_status_str(scan_notif->ebs_status)); |
397 | 401 | ||
398 | mvm->scan_status &= ~IWL_MVM_SCAN_REGULAR; | 402 | mvm->scan_status &= ~IWL_MVM_SCAN_REGULAR; |
399 | ieee80211_scan_completed(mvm->hw, | 403 | ieee80211_scan_completed(mvm->hw, &info); |
400 | scan_notif->status == IWL_SCAN_OFFLOAD_ABORTED); | ||
401 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); | 404 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); |
402 | del_timer(&mvm->scan_timer); | 405 | del_timer(&mvm->scan_timer); |
403 | } else { | 406 | } else { |
@@ -1430,7 +1433,11 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm, | |||
1430 | 1433 | ||
1431 | /* if the scan is already stopping, we don't need to notify mac80211 */ | 1434 | /* if the scan is already stopping, we don't need to notify mac80211 */ |
1432 | if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_REGULAR) { | 1435 | if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_REGULAR) { |
1433 | ieee80211_scan_completed(mvm->hw, aborted); | 1436 | struct cfg80211_scan_info info = { |
1437 | .aborted = aborted, | ||
1438 | }; | ||
1439 | |||
1440 | ieee80211_scan_completed(mvm->hw, &info); | ||
1434 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); | 1441 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); |
1435 | del_timer(&mvm->scan_timer); | 1442 | del_timer(&mvm->scan_timer); |
1436 | } else if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_SCHED) { | 1443 | } else if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_SCHED) { |
@@ -1564,7 +1571,11 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm) | |||
1564 | 1571 | ||
1565 | uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_REGULAR); | 1572 | uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_REGULAR); |
1566 | if (uid >= 0) { | 1573 | if (uid >= 0) { |
1567 | ieee80211_scan_completed(mvm->hw, true); | 1574 | struct cfg80211_scan_info info = { |
1575 | .aborted = true, | ||
1576 | }; | ||
1577 | |||
1578 | ieee80211_scan_completed(mvm->hw, &info); | ||
1568 | mvm->scan_uid_status[uid] = 0; | 1579 | mvm->scan_uid_status[uid] = 0; |
1569 | } | 1580 | } |
1570 | uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_SCHED); | 1581 | uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_SCHED); |
@@ -1585,8 +1596,13 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm) | |||
1585 | mvm->scan_uid_status[i] = 0; | 1596 | mvm->scan_uid_status[i] = 0; |
1586 | } | 1597 | } |
1587 | } else { | 1598 | } else { |
1588 | if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) | 1599 | if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) { |
1589 | ieee80211_scan_completed(mvm->hw, true); | 1600 | struct cfg80211_scan_info info = { |
1601 | .aborted = true, | ||
1602 | }; | ||
1603 | |||
1604 | ieee80211_scan_completed(mvm->hw, &info); | ||
1605 | } | ||
1590 | 1606 | ||
1591 | /* Sched scan will be restarted by mac80211 in | 1607 | /* Sched scan will be restarted by mac80211 in |
1592 | * restart_hw, so do not report if FW is about to be | 1608 | * restart_hw, so do not report if FW is about to be |
@@ -1629,8 +1645,13 @@ out: | |||
1629 | */ | 1645 | */ |
1630 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); | 1646 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); |
1631 | del_timer(&mvm->scan_timer); | 1647 | del_timer(&mvm->scan_timer); |
1632 | if (notify) | 1648 | if (notify) { |
1633 | ieee80211_scan_completed(mvm->hw, true); | 1649 | struct cfg80211_scan_info info = { |
1650 | .aborted = true, | ||
1651 | }; | ||
1652 | |||
1653 | ieee80211_scan_completed(mvm->hw, &info); | ||
1654 | } | ||
1634 | } else if (notify) { | 1655 | } else if (notify) { |
1635 | ieee80211_sched_scan_stopped(mvm->hw); | 1656 | ieee80211_sched_scan_stopped(mvm->hw); |
1636 | mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED; | 1657 | mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED; |
diff --git a/drivers/net/wireless/intersil/orinoco/scan.c b/drivers/net/wireless/intersil/orinoco/scan.c index d0ceb06c72d0..6d1d084854fb 100644 --- a/drivers/net/wireless/intersil/orinoco/scan.c +++ b/drivers/net/wireless/intersil/orinoco/scan.c | |||
@@ -237,7 +237,11 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv, | |||
237 | 237 | ||
238 | scan_abort: | 238 | scan_abort: |
239 | if (priv->scan_request) { | 239 | if (priv->scan_request) { |
240 | cfg80211_scan_done(priv->scan_request, abort); | 240 | struct cfg80211_scan_info info = { |
241 | .aborted = abort, | ||
242 | }; | ||
243 | |||
244 | cfg80211_scan_done(priv->scan_request, &info); | ||
241 | priv->scan_request = NULL; | 245 | priv->scan_request = NULL; |
242 | } | 246 | } |
243 | } | 247 | } |
@@ -245,7 +249,11 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv, | |||
245 | void orinoco_scan_done(struct orinoco_private *priv, bool abort) | 249 | void orinoco_scan_done(struct orinoco_private *priv, bool abort) |
246 | { | 250 | { |
247 | if (priv->scan_request) { | 251 | if (priv->scan_request) { |
248 | cfg80211_scan_done(priv->scan_request, abort); | 252 | struct cfg80211_scan_info info = { |
253 | .aborted = abort, | ||
254 | }; | ||
255 | |||
256 | cfg80211_scan_done(priv->scan_request, &info); | ||
249 | priv->scan_request = NULL; | 257 | priv->scan_request = NULL; |
250 | } | 258 | } |
251 | } | 259 | } |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index a1e28a4fd658..8c35ac838fce 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -41,8 +41,6 @@ MODULE_AUTHOR("Jouni Malinen"); | |||
41 | MODULE_DESCRIPTION("Software simulator of 802.11 radio(s) for mac80211"); | 41 | MODULE_DESCRIPTION("Software simulator of 802.11 radio(s) for mac80211"); |
42 | MODULE_LICENSE("GPL"); | 42 | MODULE_LICENSE("GPL"); |
43 | 43 | ||
44 | static u32 wmediumd_portid; | ||
45 | |||
46 | static int radios = 2; | 44 | static int radios = 2; |
47 | module_param(radios, int, 0444); | 45 | module_param(radios, int, 0444); |
48 | MODULE_PARM_DESC(radios, "Number of simulated radios"); | 46 | MODULE_PARM_DESC(radios, "Number of simulated radios"); |
@@ -252,12 +250,13 @@ static inline void hwsim_clear_chanctx_magic(struct ieee80211_chanctx_conf *c) | |||
252 | cp->magic = 0; | 250 | cp->magic = 0; |
253 | } | 251 | } |
254 | 252 | ||
255 | static unsigned int hwsim_net_id; | 253 | static int hwsim_net_id; |
256 | 254 | ||
257 | static int hwsim_netgroup; | 255 | static int hwsim_netgroup; |
258 | 256 | ||
259 | struct hwsim_net { | 257 | struct hwsim_net { |
260 | int netgroup; | 258 | int netgroup; |
259 | u32 wmediumd; | ||
261 | }; | 260 | }; |
262 | 261 | ||
263 | static inline int hwsim_net_get_netgroup(struct net *net) | 262 | static inline int hwsim_net_get_netgroup(struct net *net) |
@@ -274,6 +273,20 @@ static inline void hwsim_net_set_netgroup(struct net *net) | |||
274 | hwsim_net->netgroup = hwsim_netgroup++; | 273 | hwsim_net->netgroup = hwsim_netgroup++; |
275 | } | 274 | } |
276 | 275 | ||
276 | static inline u32 hwsim_net_get_wmediumd(struct net *net) | ||
277 | { | ||
278 | struct hwsim_net *hwsim_net = net_generic(net, hwsim_net_id); | ||
279 | |||
280 | return hwsim_net->wmediumd; | ||
281 | } | ||
282 | |||
283 | static inline void hwsim_net_set_wmediumd(struct net *net, u32 portid) | ||
284 | { | ||
285 | struct hwsim_net *hwsim_net = net_generic(net, hwsim_net_id); | ||
286 | |||
287 | hwsim_net->wmediumd = portid; | ||
288 | } | ||
289 | |||
277 | static struct class *hwsim_class; | 290 | static struct class *hwsim_class; |
278 | 291 | ||
279 | static struct net_device *hwsim_mon; /* global monitor netdev */ | 292 | static struct net_device *hwsim_mon; /* global monitor netdev */ |
@@ -444,10 +457,6 @@ static const struct ieee80211_iface_limit hwsim_if_limits[] = { | |||
444 | { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_DEVICE) } | 457 | { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_DEVICE) } |
445 | }; | 458 | }; |
446 | 459 | ||
447 | static const struct ieee80211_iface_limit hwsim_if_dfs_limits[] = { | ||
448 | { .max = 8, .types = BIT(NL80211_IFTYPE_AP) }, | ||
449 | }; | ||
450 | |||
451 | static const struct ieee80211_iface_combination hwsim_if_comb[] = { | 460 | static const struct ieee80211_iface_combination hwsim_if_comb[] = { |
452 | { | 461 | { |
453 | .limits = hwsim_if_limits, | 462 | .limits = hwsim_if_limits, |
@@ -455,18 +464,12 @@ static const struct ieee80211_iface_combination hwsim_if_comb[] = { | |||
455 | .n_limits = ARRAY_SIZE(hwsim_if_limits) - 1, | 464 | .n_limits = ARRAY_SIZE(hwsim_if_limits) - 1, |
456 | .max_interfaces = 2048, | 465 | .max_interfaces = 2048, |
457 | .num_different_channels = 1, | 466 | .num_different_channels = 1, |
458 | }, | ||
459 | { | ||
460 | .limits = hwsim_if_dfs_limits, | ||
461 | .n_limits = ARRAY_SIZE(hwsim_if_dfs_limits), | ||
462 | .max_interfaces = 8, | ||
463 | .num_different_channels = 1, | ||
464 | .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | | 467 | .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | |
465 | BIT(NL80211_CHAN_WIDTH_20) | | 468 | BIT(NL80211_CHAN_WIDTH_20) | |
466 | BIT(NL80211_CHAN_WIDTH_40) | | 469 | BIT(NL80211_CHAN_WIDTH_40) | |
467 | BIT(NL80211_CHAN_WIDTH_80) | | 470 | BIT(NL80211_CHAN_WIDTH_80) | |
468 | BIT(NL80211_CHAN_WIDTH_160), | 471 | BIT(NL80211_CHAN_WIDTH_160), |
469 | } | 472 | }, |
470 | }; | 473 | }; |
471 | 474 | ||
472 | static const struct ieee80211_iface_combination hwsim_if_comb_p2p_dev[] = { | 475 | static const struct ieee80211_iface_combination hwsim_if_comb_p2p_dev[] = { |
@@ -475,18 +478,12 @@ static const struct ieee80211_iface_combination hwsim_if_comb_p2p_dev[] = { | |||
475 | .n_limits = ARRAY_SIZE(hwsim_if_limits), | 478 | .n_limits = ARRAY_SIZE(hwsim_if_limits), |
476 | .max_interfaces = 2048, | 479 | .max_interfaces = 2048, |
477 | .num_different_channels = 1, | 480 | .num_different_channels = 1, |
478 | }, | ||
479 | { | ||
480 | .limits = hwsim_if_dfs_limits, | ||
481 | .n_limits = ARRAY_SIZE(hwsim_if_dfs_limits), | ||
482 | .max_interfaces = 8, | ||
483 | .num_different_channels = 1, | ||
484 | .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | | 481 | .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | |
485 | BIT(NL80211_CHAN_WIDTH_20) | | 482 | BIT(NL80211_CHAN_WIDTH_20) | |
486 | BIT(NL80211_CHAN_WIDTH_40) | | 483 | BIT(NL80211_CHAN_WIDTH_40) | |
487 | BIT(NL80211_CHAN_WIDTH_80) | | 484 | BIT(NL80211_CHAN_WIDTH_80) | |
488 | BIT(NL80211_CHAN_WIDTH_160), | 485 | BIT(NL80211_CHAN_WIDTH_160), |
489 | } | 486 | }, |
490 | }; | 487 | }; |
491 | 488 | ||
492 | static spinlock_t hwsim_radio_lock; | 489 | static spinlock_t hwsim_radio_lock; |
@@ -552,6 +549,8 @@ struct mac80211_hwsim_data { | |||
552 | 549 | ||
553 | /* group shared by radios created in the same netns */ | 550 | /* group shared by radios created in the same netns */ |
554 | int netgroup; | 551 | int netgroup; |
552 | /* wmediumd portid responsible for netgroup of this radio */ | ||
553 | u32 wmediumd; | ||
555 | 554 | ||
556 | int power_level; | 555 | int power_level; |
557 | 556 | ||
@@ -983,6 +982,29 @@ static bool hwsim_ps_rx_ok(struct mac80211_hwsim_data *data, | |||
983 | return true; | 982 | return true; |
984 | } | 983 | } |
985 | 984 | ||
985 | static int hwsim_unicast_netgroup(struct mac80211_hwsim_data *data, | ||
986 | struct sk_buff *skb, int portid) | ||
987 | { | ||
988 | struct net *net; | ||
989 | bool found = false; | ||
990 | int res = -ENOENT; | ||
991 | |||
992 | rcu_read_lock(); | ||
993 | for_each_net_rcu(net) { | ||
994 | if (data->netgroup == hwsim_net_get_netgroup(net)) { | ||
995 | res = genlmsg_unicast(net, skb, portid); | ||
996 | found = true; | ||
997 | break; | ||
998 | } | ||
999 | } | ||
1000 | rcu_read_unlock(); | ||
1001 | |||
1002 | if (!found) | ||
1003 | nlmsg_free(skb); | ||
1004 | |||
1005 | return res; | ||
1006 | } | ||
1007 | |||
986 | static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw, | 1008 | static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw, |
987 | struct sk_buff *my_skb, | 1009 | struct sk_buff *my_skb, |
988 | int dst_portid) | 1010 | int dst_portid) |
@@ -1062,7 +1084,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw, | |||
1062 | goto nla_put_failure; | 1084 | goto nla_put_failure; |
1063 | 1085 | ||
1064 | genlmsg_end(skb, msg_head); | 1086 | genlmsg_end(skb, msg_head); |
1065 | if (genlmsg_unicast(&init_net, skb, dst_portid)) | 1087 | if (hwsim_unicast_netgroup(data, skb, dst_portid)) |
1066 | goto err_free_txskb; | 1088 | goto err_free_txskb; |
1067 | 1089 | ||
1068 | /* Enqueue the packet */ | 1090 | /* Enqueue the packet */ |
@@ -1355,7 +1377,7 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, | |||
1355 | mac80211_hwsim_monitor_rx(hw, skb, channel); | 1377 | mac80211_hwsim_monitor_rx(hw, skb, channel); |
1356 | 1378 | ||
1357 | /* wmediumd mode check */ | 1379 | /* wmediumd mode check */ |
1358 | _portid = ACCESS_ONCE(wmediumd_portid); | 1380 | _portid = ACCESS_ONCE(data->wmediumd); |
1359 | 1381 | ||
1360 | if (_portid) | 1382 | if (_portid) |
1361 | return mac80211_hwsim_tx_frame_nl(hw, skb, _portid); | 1383 | return mac80211_hwsim_tx_frame_nl(hw, skb, _portid); |
@@ -1451,7 +1473,8 @@ static void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw, | |||
1451 | struct sk_buff *skb, | 1473 | struct sk_buff *skb, |
1452 | struct ieee80211_channel *chan) | 1474 | struct ieee80211_channel *chan) |
1453 | { | 1475 | { |
1454 | u32 _pid = ACCESS_ONCE(wmediumd_portid); | 1476 | struct mac80211_hwsim_data *data = hw->priv; |
1477 | u32 _pid = ACCESS_ONCE(data->wmediumd); | ||
1455 | 1478 | ||
1456 | if (ieee80211_hw_check(hw, SUPPORTS_RC_TABLE)) { | 1479 | if (ieee80211_hw_check(hw, SUPPORTS_RC_TABLE)) { |
1457 | struct ieee80211_tx_info *txi = IEEE80211_SKB_CB(skb); | 1480 | struct ieee80211_tx_info *txi = IEEE80211_SKB_CB(skb); |
@@ -1918,8 +1941,12 @@ static void hw_scan_work(struct work_struct *work) | |||
1918 | 1941 | ||
1919 | mutex_lock(&hwsim->mutex); | 1942 | mutex_lock(&hwsim->mutex); |
1920 | if (hwsim->scan_chan_idx >= req->n_channels) { | 1943 | if (hwsim->scan_chan_idx >= req->n_channels) { |
1944 | struct cfg80211_scan_info info = { | ||
1945 | .aborted = false, | ||
1946 | }; | ||
1947 | |||
1921 | wiphy_debug(hwsim->hw->wiphy, "hw scan complete\n"); | 1948 | wiphy_debug(hwsim->hw->wiphy, "hw scan complete\n"); |
1922 | ieee80211_scan_completed(hwsim->hw, false); | 1949 | ieee80211_scan_completed(hwsim->hw, &info); |
1923 | hwsim->hw_scan_request = NULL; | 1950 | hwsim->hw_scan_request = NULL; |
1924 | hwsim->hw_scan_vif = NULL; | 1951 | hwsim->hw_scan_vif = NULL; |
1925 | hwsim->tmp_chan = NULL; | 1952 | hwsim->tmp_chan = NULL; |
@@ -2004,13 +2031,16 @@ static void mac80211_hwsim_cancel_hw_scan(struct ieee80211_hw *hw, | |||
2004 | struct ieee80211_vif *vif) | 2031 | struct ieee80211_vif *vif) |
2005 | { | 2032 | { |
2006 | struct mac80211_hwsim_data *hwsim = hw->priv; | 2033 | struct mac80211_hwsim_data *hwsim = hw->priv; |
2034 | struct cfg80211_scan_info info = { | ||
2035 | .aborted = true, | ||
2036 | }; | ||
2007 | 2037 | ||
2008 | wiphy_debug(hw->wiphy, "hwsim cancel_hw_scan\n"); | 2038 | wiphy_debug(hw->wiphy, "hwsim cancel_hw_scan\n"); |
2009 | 2039 | ||
2010 | cancel_delayed_work_sync(&hwsim->hw_scan); | 2040 | cancel_delayed_work_sync(&hwsim->hw_scan); |
2011 | 2041 | ||
2012 | mutex_lock(&hwsim->mutex); | 2042 | mutex_lock(&hwsim->mutex); |
2013 | ieee80211_scan_completed(hwsim->hw, true); | 2043 | ieee80211_scan_completed(hwsim->hw, &info); |
2014 | hwsim->tmp_chan = NULL; | 2044 | hwsim->tmp_chan = NULL; |
2015 | hwsim->hw_scan_request = NULL; | 2045 | hwsim->hw_scan_request = NULL; |
2016 | hwsim->hw_scan_vif = NULL; | 2046 | hwsim->hw_scan_vif = NULL; |
@@ -2448,13 +2478,14 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, | |||
2448 | hw->wiphy->max_scan_ssids = 255; | 2478 | hw->wiphy->max_scan_ssids = 255; |
2449 | hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; | 2479 | hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; |
2450 | hw->wiphy->max_remain_on_channel_duration = 1000; | 2480 | hw->wiphy->max_remain_on_channel_duration = 1000; |
2451 | /* For channels > 1 DFS is not allowed */ | ||
2452 | hw->wiphy->n_iface_combinations = 1; | ||
2453 | hw->wiphy->iface_combinations = &data->if_combination; | 2481 | hw->wiphy->iface_combinations = &data->if_combination; |
2454 | if (param->p2p_device) | 2482 | if (param->p2p_device) |
2455 | data->if_combination = hwsim_if_comb_p2p_dev[0]; | 2483 | data->if_combination = hwsim_if_comb_p2p_dev[0]; |
2456 | else | 2484 | else |
2457 | data->if_combination = hwsim_if_comb[0]; | 2485 | data->if_combination = hwsim_if_comb[0]; |
2486 | hw->wiphy->n_iface_combinations = 1; | ||
2487 | /* For channels > 1 DFS is not allowed */ | ||
2488 | data->if_combination.radar_detect_widths = 0; | ||
2458 | data->if_combination.num_different_channels = data->channels; | 2489 | data->if_combination.num_different_channels = data->channels; |
2459 | } else if (param->p2p_device) { | 2490 | } else if (param->p2p_device) { |
2460 | hw->wiphy->iface_combinations = hwsim_if_comb_p2p_dev; | 2491 | hw->wiphy->iface_combinations = hwsim_if_comb_p2p_dev; |
@@ -2796,6 +2827,20 @@ static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *addr) | |||
2796 | return data; | 2827 | return data; |
2797 | } | 2828 | } |
2798 | 2829 | ||
2830 | static void hwsim_register_wmediumd(struct net *net, u32 portid) | ||
2831 | { | ||
2832 | struct mac80211_hwsim_data *data; | ||
2833 | |||
2834 | hwsim_net_set_wmediumd(net, portid); | ||
2835 | |||
2836 | spin_lock_bh(&hwsim_radio_lock); | ||
2837 | list_for_each_entry(data, &hwsim_radios, list) { | ||
2838 | if (data->netgroup == hwsim_net_get_netgroup(net)) | ||
2839 | data->wmediumd = portid; | ||
2840 | } | ||
2841 | spin_unlock_bh(&hwsim_radio_lock); | ||
2842 | } | ||
2843 | |||
2799 | static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, | 2844 | static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, |
2800 | struct genl_info *info) | 2845 | struct genl_info *info) |
2801 | { | 2846 | { |
@@ -2811,9 +2856,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, | |||
2811 | int i; | 2856 | int i; |
2812 | bool found = false; | 2857 | bool found = false; |
2813 | 2858 | ||
2814 | if (info->snd_portid != wmediumd_portid) | ||
2815 | return -EINVAL; | ||
2816 | |||
2817 | if (!info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER] || | 2859 | if (!info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER] || |
2818 | !info->attrs[HWSIM_ATTR_FLAGS] || | 2860 | !info->attrs[HWSIM_ATTR_FLAGS] || |
2819 | !info->attrs[HWSIM_ATTR_COOKIE] || | 2861 | !info->attrs[HWSIM_ATTR_COOKIE] || |
@@ -2829,6 +2871,12 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, | |||
2829 | if (!data2) | 2871 | if (!data2) |
2830 | goto out; | 2872 | goto out; |
2831 | 2873 | ||
2874 | if (hwsim_net_get_netgroup(genl_info_net(info)) != data2->netgroup) | ||
2875 | goto out; | ||
2876 | |||
2877 | if (info->snd_portid != data2->wmediumd) | ||
2878 | goto out; | ||
2879 | |||
2832 | /* look for the skb matching the cookie passed back from user */ | 2880 | /* look for the skb matching the cookie passed back from user */ |
2833 | skb_queue_walk_safe(&data2->pending, skb, tmp) { | 2881 | skb_queue_walk_safe(&data2->pending, skb, tmp) { |
2834 | u64 skb_cookie; | 2882 | u64 skb_cookie; |
@@ -2892,9 +2940,6 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2, | |||
2892 | void *frame_data; | 2940 | void *frame_data; |
2893 | struct sk_buff *skb = NULL; | 2941 | struct sk_buff *skb = NULL; |
2894 | 2942 | ||
2895 | if (info->snd_portid != wmediumd_portid) | ||
2896 | return -EINVAL; | ||
2897 | |||
2898 | if (!info->attrs[HWSIM_ATTR_ADDR_RECEIVER] || | 2943 | if (!info->attrs[HWSIM_ATTR_ADDR_RECEIVER] || |
2899 | !info->attrs[HWSIM_ATTR_FRAME] || | 2944 | !info->attrs[HWSIM_ATTR_FRAME] || |
2900 | !info->attrs[HWSIM_ATTR_RX_RATE] || | 2945 | !info->attrs[HWSIM_ATTR_RX_RATE] || |
@@ -2920,6 +2965,12 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2, | |||
2920 | if (!data2) | 2965 | if (!data2) |
2921 | goto out; | 2966 | goto out; |
2922 | 2967 | ||
2968 | if (hwsim_net_get_netgroup(genl_info_net(info)) != data2->netgroup) | ||
2969 | goto out; | ||
2970 | |||
2971 | if (info->snd_portid != data2->wmediumd) | ||
2972 | goto out; | ||
2973 | |||
2923 | /* check if radio is configured properly */ | 2974 | /* check if radio is configured properly */ |
2924 | 2975 | ||
2925 | if (data2->idle || !data2->started) | 2976 | if (data2->idle || !data2->started) |
@@ -2966,6 +3017,7 @@ out: | |||
2966 | static int hwsim_register_received_nl(struct sk_buff *skb_2, | 3017 | static int hwsim_register_received_nl(struct sk_buff *skb_2, |
2967 | struct genl_info *info) | 3018 | struct genl_info *info) |
2968 | { | 3019 | { |
3020 | struct net *net = genl_info_net(info); | ||
2969 | struct mac80211_hwsim_data *data; | 3021 | struct mac80211_hwsim_data *data; |
2970 | int chans = 1; | 3022 | int chans = 1; |
2971 | 3023 | ||
@@ -2982,10 +3034,10 @@ static int hwsim_register_received_nl(struct sk_buff *skb_2, | |||
2982 | if (chans > 1) | 3034 | if (chans > 1) |
2983 | return -EOPNOTSUPP; | 3035 | return -EOPNOTSUPP; |
2984 | 3036 | ||
2985 | if (wmediumd_portid) | 3037 | if (hwsim_net_get_wmediumd(net)) |
2986 | return -EBUSY; | 3038 | return -EBUSY; |
2987 | 3039 | ||
2988 | wmediumd_portid = info->snd_portid; | 3040 | hwsim_register_wmediumd(net, info->snd_portid); |
2989 | 3041 | ||
2990 | printk(KERN_DEBUG "mac80211_hwsim: received a REGISTER, " | 3042 | printk(KERN_DEBUG "mac80211_hwsim: received a REGISTER, " |
2991 | "switching to wmediumd mode with pid %d\n", info->snd_portid); | 3043 | "switching to wmediumd mode with pid %d\n", info->snd_portid); |
@@ -3152,7 +3204,7 @@ static const struct genl_ops hwsim_ops[] = { | |||
3152 | .cmd = HWSIM_CMD_REGISTER, | 3204 | .cmd = HWSIM_CMD_REGISTER, |
3153 | .policy = hwsim_genl_policy, | 3205 | .policy = hwsim_genl_policy, |
3154 | .doit = hwsim_register_received_nl, | 3206 | .doit = hwsim_register_received_nl, |
3155 | .flags = GENL_ADMIN_PERM, | 3207 | .flags = GENL_UNS_ADMIN_PERM, |
3156 | }, | 3208 | }, |
3157 | { | 3209 | { |
3158 | .cmd = HWSIM_CMD_FRAME, | 3210 | .cmd = HWSIM_CMD_FRAME, |
@@ -3218,10 +3270,10 @@ static int mac80211_hwsim_netlink_notify(struct notifier_block *nb, | |||
3218 | 3270 | ||
3219 | remove_user_radios(notify->portid); | 3271 | remove_user_radios(notify->portid); |
3220 | 3272 | ||
3221 | if (notify->portid == wmediumd_portid) { | 3273 | if (notify->portid == hwsim_net_get_wmediumd(notify->net)) { |
3222 | printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink" | 3274 | printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink" |
3223 | " socket, switching to perfect channel medium\n"); | 3275 | " socket, switching to perfect channel medium\n"); |
3224 | wmediumd_portid = 0; | 3276 | hwsim_register_wmediumd(notify->net, 0); |
3225 | } | 3277 | } |
3226 | return NOTIFY_DONE; | 3278 | return NOTIFY_DONE; |
3227 | 3279 | ||
diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c index 776b44bfd93a..ea4802446618 100644 --- a/drivers/net/wireless/marvell/libertas/cfg.c +++ b/drivers/net/wireless/marvell/libertas/cfg.c | |||
@@ -796,10 +796,15 @@ void lbs_scan_done(struct lbs_private *priv) | |||
796 | { | 796 | { |
797 | WARN_ON(!priv->scan_req); | 797 | WARN_ON(!priv->scan_req); |
798 | 798 | ||
799 | if (priv->internal_scan) | 799 | if (priv->internal_scan) { |
800 | kfree(priv->scan_req); | 800 | kfree(priv->scan_req); |
801 | else | 801 | } else { |
802 | cfg80211_scan_done(priv->scan_req, false); | 802 | struct cfg80211_scan_info info = { |
803 | .aborted = false, | ||
804 | }; | ||
805 | |||
806 | cfg80211_scan_done(priv->scan_req, &info); | ||
807 | } | ||
803 | 808 | ||
804 | priv->scan_req = NULL; | 809 | priv->scan_req = NULL; |
805 | } | 810 | } |
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c index 6bc2011d8609..e7a21443647e 100644 --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c | |||
@@ -1057,8 +1057,12 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter) | |||
1057 | if (!priv) | 1057 | if (!priv) |
1058 | continue; | 1058 | continue; |
1059 | if (priv->scan_request) { | 1059 | if (priv->scan_request) { |
1060 | struct cfg80211_scan_info info = { | ||
1061 | .aborted = true, | ||
1062 | }; | ||
1063 | |||
1060 | mwifiex_dbg(adapter, WARN, "info: aborting scan\n"); | 1064 | mwifiex_dbg(adapter, WARN, "info: aborting scan\n"); |
1061 | cfg80211_scan_done(priv->scan_request, 1); | 1065 | cfg80211_scan_done(priv->scan_request, &info); |
1062 | priv->scan_request = NULL; | 1066 | priv->scan_request = NULL; |
1063 | } | 1067 | } |
1064 | } | 1068 | } |
@@ -1112,8 +1116,12 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter) | |||
1112 | if (!priv) | 1116 | if (!priv) |
1113 | continue; | 1117 | continue; |
1114 | if (priv->scan_request) { | 1118 | if (priv->scan_request) { |
1119 | struct cfg80211_scan_info info = { | ||
1120 | .aborted = true, | ||
1121 | }; | ||
1122 | |||
1115 | mwifiex_dbg(adapter, WARN, "info: aborting scan\n"); | 1123 | mwifiex_dbg(adapter, WARN, "info: aborting scan\n"); |
1116 | cfg80211_scan_done(priv->scan_request, 1); | 1124 | cfg80211_scan_done(priv->scan_request, &info); |
1117 | priv->scan_request = NULL; | 1125 | priv->scan_request = NULL; |
1118 | } | 1126 | } |
1119 | } | 1127 | } |
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index 0e280f879b58..db4925db39aa 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c | |||
@@ -697,9 +697,13 @@ mwifiex_close(struct net_device *dev) | |||
697 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | 697 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); |
698 | 698 | ||
699 | if (priv->scan_request) { | 699 | if (priv->scan_request) { |
700 | struct cfg80211_scan_info info = { | ||
701 | .aborted = true, | ||
702 | }; | ||
703 | |||
700 | mwifiex_dbg(priv->adapter, INFO, | 704 | mwifiex_dbg(priv->adapter, INFO, |
701 | "aborting scan on ndo_stop\n"); | 705 | "aborting scan on ndo_stop\n"); |
702 | cfg80211_scan_done(priv->scan_request, 1); | 706 | cfg80211_scan_done(priv->scan_request, &info); |
703 | priv->scan_request = NULL; | 707 | priv->scan_request = NULL; |
704 | priv->scan_aborting = true; | 708 | priv->scan_aborting = true; |
705 | } | 709 | } |
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c index bc5e52cebce1..fdd749110fcb 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c | |||
@@ -1956,9 +1956,13 @@ static void mwifiex_check_next_scan_command(struct mwifiex_private *priv) | |||
1956 | mwifiex_complete_scan(priv); | 1956 | mwifiex_complete_scan(priv); |
1957 | 1957 | ||
1958 | if (priv->scan_request) { | 1958 | if (priv->scan_request) { |
1959 | struct cfg80211_scan_info info = { | ||
1960 | .aborted = false, | ||
1961 | }; | ||
1962 | |||
1959 | mwifiex_dbg(adapter, INFO, | 1963 | mwifiex_dbg(adapter, INFO, |
1960 | "info: notifying scan done\n"); | 1964 | "info: notifying scan done\n"); |
1961 | cfg80211_scan_done(priv->scan_request, 0); | 1965 | cfg80211_scan_done(priv->scan_request, &info); |
1962 | priv->scan_request = NULL; | 1966 | priv->scan_request = NULL; |
1963 | } else { | 1967 | } else { |
1964 | priv->scan_aborting = false; | 1968 | priv->scan_aborting = false; |
@@ -1977,9 +1981,13 @@ static void mwifiex_check_next_scan_command(struct mwifiex_private *priv) | |||
1977 | 1981 | ||
1978 | if (!adapter->active_scan_triggered) { | 1982 | if (!adapter->active_scan_triggered) { |
1979 | if (priv->scan_request) { | 1983 | if (priv->scan_request) { |
1984 | struct cfg80211_scan_info info = { | ||
1985 | .aborted = true, | ||
1986 | }; | ||
1987 | |||
1980 | mwifiex_dbg(adapter, INFO, | 1988 | mwifiex_dbg(adapter, INFO, |
1981 | "info: aborting scan\n"); | 1989 | "info: aborting scan\n"); |
1982 | cfg80211_scan_done(priv->scan_request, 1); | 1990 | cfg80211_scan_done(priv->scan_request, &info); |
1983 | priv->scan_request = NULL; | 1991 | priv->scan_request = NULL; |
1984 | } else { | 1992 | } else { |
1985 | priv->scan_aborting = false; | 1993 | priv->scan_aborting = false; |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 569918c485b4..603c90470225 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -2134,6 +2134,7 @@ static void rndis_get_scan_results(struct work_struct *work) | |||
2134 | struct rndis_wlan_private *priv = | 2134 | struct rndis_wlan_private *priv = |
2135 | container_of(work, struct rndis_wlan_private, scan_work.work); | 2135 | container_of(work, struct rndis_wlan_private, scan_work.work); |
2136 | struct usbnet *usbdev = priv->usbdev; | 2136 | struct usbnet *usbdev = priv->usbdev; |
2137 | struct cfg80211_scan_info info = {}; | ||
2137 | int ret; | 2138 | int ret; |
2138 | 2139 | ||
2139 | netdev_dbg(usbdev->net, "get_scan_results\n"); | 2140 | netdev_dbg(usbdev->net, "get_scan_results\n"); |
@@ -2143,7 +2144,8 @@ static void rndis_get_scan_results(struct work_struct *work) | |||
2143 | 2144 | ||
2144 | ret = rndis_check_bssid_list(usbdev, NULL, NULL); | 2145 | ret = rndis_check_bssid_list(usbdev, NULL, NULL); |
2145 | 2146 | ||
2146 | cfg80211_scan_done(priv->scan_request, ret < 0); | 2147 | info.aborted = ret < 0; |
2148 | cfg80211_scan_done(priv->scan_request, &info); | ||
2147 | 2149 | ||
2148 | priv->scan_request = NULL; | 2150 | priv->scan_request = NULL; |
2149 | } | 2151 | } |
@@ -3574,7 +3576,11 @@ static int rndis_wlan_stop(struct usbnet *usbdev) | |||
3574 | flush_workqueue(priv->workqueue); | 3576 | flush_workqueue(priv->workqueue); |
3575 | 3577 | ||
3576 | if (priv->scan_request) { | 3578 | if (priv->scan_request) { |
3577 | cfg80211_scan_done(priv->scan_request, true); | 3579 | struct cfg80211_scan_info info = { |
3580 | .aborted = true, | ||
3581 | }; | ||
3582 | |||
3583 | cfg80211_scan_done(priv->scan_request, &info); | ||
3578 | priv->scan_request = NULL; | 3584 | priv->scan_request = NULL; |
3579 | } | 3585 | } |
3580 | 3586 | ||
diff --git a/drivers/net/wireless/st/cw1200/scan.c b/drivers/net/wireless/st/cw1200/scan.c index 983788156bb0..0a0ff7e31f5b 100644 --- a/drivers/net/wireless/st/cw1200/scan.c +++ b/drivers/net/wireless/st/cw1200/scan.c | |||
@@ -167,6 +167,10 @@ void cw1200_scan_work(struct work_struct *work) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | if (!priv->scan.req || (priv->scan.curr == priv->scan.end)) { | 169 | if (!priv->scan.req || (priv->scan.curr == priv->scan.end)) { |
170 | struct cfg80211_scan_info info = { | ||
171 | .aborted = priv->scan.status ? 1 : 0, | ||
172 | }; | ||
173 | |||
170 | if (priv->scan.output_power != priv->output_power) | 174 | if (priv->scan.output_power != priv->output_power) |
171 | wsm_set_output_power(priv, priv->output_power * 10); | 175 | wsm_set_output_power(priv, priv->output_power * 10); |
172 | if (priv->join_status == CW1200_JOIN_STATUS_STA && | 176 | if (priv->join_status == CW1200_JOIN_STATUS_STA && |
@@ -188,7 +192,7 @@ void cw1200_scan_work(struct work_struct *work) | |||
188 | cw1200_scan_restart_delayed(priv); | 192 | cw1200_scan_restart_delayed(priv); |
189 | wsm_unlock_tx(priv); | 193 | wsm_unlock_tx(priv); |
190 | mutex_unlock(&priv->conf_mutex); | 194 | mutex_unlock(&priv->conf_mutex); |
191 | ieee80211_scan_completed(priv->hw, priv->scan.status ? 1 : 0); | 195 | ieee80211_scan_completed(priv->hw, &info); |
192 | up(&priv->scan.lock); | 196 | up(&priv->scan.lock); |
193 | return; | 197 | return; |
194 | } else { | 198 | } else { |
diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c index c98630394a1a..d0593bc1f1a9 100644 --- a/drivers/net/wireless/ti/wl1251/event.c +++ b/drivers/net/wireless/ti/wl1251/event.c | |||
@@ -36,7 +36,11 @@ static int wl1251_event_scan_complete(struct wl1251 *wl, | |||
36 | mbox->scheduled_scan_channels); | 36 | mbox->scheduled_scan_channels); |
37 | 37 | ||
38 | if (wl->scanning) { | 38 | if (wl->scanning) { |
39 | ieee80211_scan_completed(wl->hw, false); | 39 | struct cfg80211_scan_info info = { |
40 | .aborted = false, | ||
41 | }; | ||
42 | |||
43 | ieee80211_scan_completed(wl->hw, &info); | ||
40 | wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed"); | 44 | wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed"); |
41 | wl->scanning = false; | 45 | wl->scanning = false; |
42 | if (wl->hw->conf.flags & IEEE80211_CONF_IDLE) | 46 | if (wl->hw->conf.flags & IEEE80211_CONF_IDLE) |
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 56384a4e2a35..bbf7604889b7 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
@@ -448,7 +448,11 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) | |||
448 | WARN_ON(wl->state != WL1251_STATE_ON); | 448 | WARN_ON(wl->state != WL1251_STATE_ON); |
449 | 449 | ||
450 | if (wl->scanning) { | 450 | if (wl->scanning) { |
451 | ieee80211_scan_completed(wl->hw, true); | 451 | struct cfg80211_scan_info info = { |
452 | .aborted = true, | ||
453 | }; | ||
454 | |||
455 | ieee80211_scan_completed(wl->hw, &info); | ||
452 | wl->scanning = false; | 456 | wl->scanning = false; |
453 | } | 457 | } |
454 | 458 | ||
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 10fd24c28ece..69267d592504 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -2615,6 +2615,10 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl, | |||
2615 | 2615 | ||
2616 | if (wl->scan.state != WL1271_SCAN_STATE_IDLE && | 2616 | if (wl->scan.state != WL1271_SCAN_STATE_IDLE && |
2617 | wl->scan_wlvif == wlvif) { | 2617 | wl->scan_wlvif == wlvif) { |
2618 | struct cfg80211_scan_info info = { | ||
2619 | .aborted = true, | ||
2620 | }; | ||
2621 | |||
2618 | /* | 2622 | /* |
2619 | * Rearm the tx watchdog just before idling scan. This | 2623 | * Rearm the tx watchdog just before idling scan. This |
2620 | * prevents just-finished scans from triggering the watchdog | 2624 | * prevents just-finished scans from triggering the watchdog |
@@ -2625,7 +2629,7 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl, | |||
2625 | memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch)); | 2629 | memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch)); |
2626 | wl->scan_wlvif = NULL; | 2630 | wl->scan_wlvif = NULL; |
2627 | wl->scan.req = NULL; | 2631 | wl->scan.req = NULL; |
2628 | ieee80211_scan_completed(wl->hw, true); | 2632 | ieee80211_scan_completed(wl->hw, &info); |
2629 | } | 2633 | } |
2630 | 2634 | ||
2631 | if (wl->sched_vif == wlvif) | 2635 | if (wl->sched_vif == wlvif) |
@@ -3649,6 +3653,9 @@ static void wl1271_op_cancel_hw_scan(struct ieee80211_hw *hw, | |||
3649 | { | 3653 | { |
3650 | struct wl1271 *wl = hw->priv; | 3654 | struct wl1271 *wl = hw->priv; |
3651 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); | 3655 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); |
3656 | struct cfg80211_scan_info info = { | ||
3657 | .aborted = true, | ||
3658 | }; | ||
3652 | int ret; | 3659 | int ret; |
3653 | 3660 | ||
3654 | wl1271_debug(DEBUG_MAC80211, "mac80211 cancel hw scan"); | 3661 | wl1271_debug(DEBUG_MAC80211, "mac80211 cancel hw scan"); |
@@ -3681,7 +3688,7 @@ static void wl1271_op_cancel_hw_scan(struct ieee80211_hw *hw, | |||
3681 | memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch)); | 3688 | memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch)); |
3682 | wl->scan_wlvif = NULL; | 3689 | wl->scan_wlvif = NULL; |
3683 | wl->scan.req = NULL; | 3690 | wl->scan.req = NULL; |
3684 | ieee80211_scan_completed(wl->hw, true); | 3691 | ieee80211_scan_completed(wl->hw, &info); |
3685 | 3692 | ||
3686 | out_sleep: | 3693 | out_sleep: |
3687 | wl1271_ps_elp_sleep(wl); | 3694 | wl1271_ps_elp_sleep(wl); |
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c index 23343643207a..5612f5916b4e 100644 --- a/drivers/net/wireless/ti/wlcore/scan.c +++ b/drivers/net/wireless/ti/wlcore/scan.c | |||
@@ -36,6 +36,9 @@ void wl1271_scan_complete_work(struct work_struct *work) | |||
36 | struct delayed_work *dwork; | 36 | struct delayed_work *dwork; |
37 | struct wl1271 *wl; | 37 | struct wl1271 *wl; |
38 | struct wl12xx_vif *wlvif; | 38 | struct wl12xx_vif *wlvif; |
39 | struct cfg80211_scan_info info = { | ||
40 | .aborted = false, | ||
41 | }; | ||
39 | int ret; | 42 | int ret; |
40 | 43 | ||
41 | dwork = to_delayed_work(work); | 44 | dwork = to_delayed_work(work); |
@@ -82,7 +85,7 @@ void wl1271_scan_complete_work(struct work_struct *work) | |||
82 | 85 | ||
83 | wlcore_cmd_regdomain_config_locked(wl); | 86 | wlcore_cmd_regdomain_config_locked(wl); |
84 | 87 | ||
85 | ieee80211_scan_completed(wl->hw, false); | 88 | ieee80211_scan_completed(wl->hw, &info); |
86 | 89 | ||
87 | out: | 90 | out: |
88 | mutex_unlock(&wl->mutex); | 91 | mutex_unlock(&wl->mutex); |
diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 0da559d929bc..d0ba3778990e 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | |||
@@ -1256,10 +1256,15 @@ void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, | |||
1256 | DBG_8723A("%s with scan req\n", __func__); | 1256 | DBG_8723A("%s with scan req\n", __func__); |
1257 | 1257 | ||
1258 | if (pwdev_priv->scan_request->wiphy != | 1258 | if (pwdev_priv->scan_request->wiphy != |
1259 | pwdev_priv->rtw_wdev->wiphy) | 1259 | pwdev_priv->rtw_wdev->wiphy) { |
1260 | DBG_8723A("error wiphy compare\n"); | 1260 | DBG_8723A("error wiphy compare\n"); |
1261 | else | 1261 | } else { |
1262 | cfg80211_scan_done(pwdev_priv->scan_request, aborted); | 1262 | struct cfg80211_scan_info info = { |
1263 | .aborted = aborted, | ||
1264 | }; | ||
1265 | |||
1266 | cfg80211_scan_done(pwdev_priv->scan_request, &info); | ||
1267 | } | ||
1263 | 1268 | ||
1264 | pwdev_priv->scan_request = NULL; | 1269 | pwdev_priv->scan_request = NULL; |
1265 | } else { | 1270 | } else { |
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 51aff4ff7d7c..a0d8e22e575b 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |||
@@ -454,7 +454,11 @@ static void CfgScanResult(enum scan_event scan_event, | |||
454 | mutex_lock(&priv->scan_req_lock); | 454 | mutex_lock(&priv->scan_req_lock); |
455 | 455 | ||
456 | if (priv->pstrScanReq) { | 456 | if (priv->pstrScanReq) { |
457 | cfg80211_scan_done(priv->pstrScanReq, false); | 457 | struct cfg80211_scan_info info = { |
458 | .aborted = false, | ||
459 | }; | ||
460 | |||
461 | cfg80211_scan_done(priv->pstrScanReq, &info); | ||
458 | priv->u32RcvdChCount = 0; | 462 | priv->u32RcvdChCount = 0; |
459 | priv->bCfgScanning = false; | 463 | priv->bCfgScanning = false; |
460 | priv->pstrScanReq = NULL; | 464 | priv->pstrScanReq = NULL; |
@@ -464,10 +468,14 @@ static void CfgScanResult(enum scan_event scan_event, | |||
464 | mutex_lock(&priv->scan_req_lock); | 468 | mutex_lock(&priv->scan_req_lock); |
465 | 469 | ||
466 | if (priv->pstrScanReq) { | 470 | if (priv->pstrScanReq) { |
471 | struct cfg80211_scan_info info = { | ||
472 | .aborted = false, | ||
473 | }; | ||
474 | |||
467 | update_scan_time(); | 475 | update_scan_time(); |
468 | refresh_scan(priv, 1, false); | 476 | refresh_scan(priv, 1, false); |
469 | 477 | ||
470 | cfg80211_scan_done(priv->pstrScanReq, false); | 478 | cfg80211_scan_done(priv->pstrScanReq, &info); |
471 | priv->bCfgScanning = false; | 479 | priv->bCfgScanning = false; |
472 | priv->pstrScanReq = NULL; | 480 | priv->pstrScanReq = NULL; |
473 | } | 481 | } |
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index a6e6fb9f42e1..f46dfe6b24e8 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c | |||
@@ -338,6 +338,8 @@ static int prism2_scan(struct wiphy *wiphy, | |||
338 | struct p80211msg_dot11req_scan msg1; | 338 | struct p80211msg_dot11req_scan msg1; |
339 | struct p80211msg_dot11req_scan_results msg2; | 339 | struct p80211msg_dot11req_scan_results msg2; |
340 | struct cfg80211_bss *bss; | 340 | struct cfg80211_bss *bss; |
341 | struct cfg80211_scan_info info = {}; | ||
342 | |||
341 | int result; | 343 | int result; |
342 | int err = 0; | 344 | int err = 0; |
343 | int numbss = 0; | 345 | int numbss = 0; |
@@ -440,7 +442,8 @@ static int prism2_scan(struct wiphy *wiphy, | |||
440 | err = prism2_result2err(msg2.resultcode.data); | 442 | err = prism2_result2err(msg2.resultcode.data); |
441 | 443 | ||
442 | exit: | 444 | exit: |
443 | cfg80211_scan_done(request, err ? 1 : 0); | 445 | info.aborted = !!(err); |
446 | cfg80211_scan_done(request, &info); | ||
444 | priv->scan_request = NULL; | 447 | priv->scan_request = NULL; |
445 | return err; | 448 | return err; |
446 | } | 449 | } |