diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/mac80211.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl1251/event.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl1251/main.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 1 | ||||
-rw-r--r-- | include/net/mac80211.h | 5 | ||||
-rw-r--r-- | net/mac80211/debugfs.c | 2 | ||||
-rw-r--r-- | net/mac80211/iface.c | 8 | ||||
-rw-r--r-- | net/mac80211/main.c | 3 |
9 files changed, 27 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index 75f6f6cfdd47..0fccf725a2e6 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c | |||
@@ -151,8 +151,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
151 | IEEE80211_HW_QUEUE_CONTROL | | 151 | IEEE80211_HW_QUEUE_CONTROL | |
152 | IEEE80211_HW_SUPPORTS_PS | | 152 | IEEE80211_HW_SUPPORTS_PS | |
153 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | | 153 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | |
154 | IEEE80211_HW_WANT_MONITOR_VIF | | 154 | IEEE80211_HW_WANT_MONITOR_VIF; |
155 | IEEE80211_HW_SCAN_WHILE_IDLE; | ||
156 | 155 | ||
157 | hw->offchannel_tx_hw_queue = IWL_AUX_QUEUE; | 156 | hw->offchannel_tx_hw_queue = IWL_AUX_QUEUE; |
158 | hw->radiotap_mcs_details |= IEEE80211_RADIOTAP_MCS_HAVE_FMT; | 157 | hw->radiotap_mcs_details |= IEEE80211_RADIOTAP_MCS_HAVE_FMT; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index ce6127caabdf..bbb8a5b35662 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -113,7 +113,6 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
113 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | | 113 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | |
114 | IEEE80211_HW_QUEUE_CONTROL | | 114 | IEEE80211_HW_QUEUE_CONTROL | |
115 | IEEE80211_HW_WANT_MONITOR_VIF | | 115 | IEEE80211_HW_WANT_MONITOR_VIF | |
116 | IEEE80211_HW_SCAN_WHILE_IDLE | | ||
117 | IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | | 116 | IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | |
118 | IEEE80211_HW_SUPPORTS_PS | | 117 | IEEE80211_HW_SUPPORTS_PS | |
119 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | | 118 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | |
diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c index 5ec50a476a69..74ae8e1c2e33 100644 --- a/drivers/net/wireless/ti/wl1251/event.c +++ b/drivers/net/wireless/ti/wl1251/event.c | |||
@@ -29,6 +29,8 @@ | |||
29 | static int wl1251_event_scan_complete(struct wl1251 *wl, | 29 | static int wl1251_event_scan_complete(struct wl1251 *wl, |
30 | struct event_mailbox *mbox) | 30 | struct event_mailbox *mbox) |
31 | { | 31 | { |
32 | int ret = 0; | ||
33 | |||
32 | wl1251_debug(DEBUG_EVENT, "status: 0x%x, channels: %d", | 34 | wl1251_debug(DEBUG_EVENT, "status: 0x%x, channels: %d", |
33 | mbox->scheduled_scan_status, | 35 | mbox->scheduled_scan_status, |
34 | mbox->scheduled_scan_channels); | 36 | mbox->scheduled_scan_channels); |
@@ -37,9 +39,11 @@ static int wl1251_event_scan_complete(struct wl1251 *wl, | |||
37 | ieee80211_scan_completed(wl->hw, false); | 39 | ieee80211_scan_completed(wl->hw, false); |
38 | wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed"); | 40 | wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed"); |
39 | wl->scanning = false; | 41 | wl->scanning = false; |
42 | if (wl->hw->conf.flags & IEEE80211_CONF_IDLE) | ||
43 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); | ||
40 | } | 44 | } |
41 | 45 | ||
42 | return 0; | 46 | return ret; |
43 | } | 47 | } |
44 | 48 | ||
45 | static void wl1251_event_mbox_dump(struct event_mailbox *mbox) | 49 | static void wl1251_event_mbox_dump(struct event_mailbox *mbox) |
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index f47e8b0482ad..bbbf68cf50a7 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
@@ -623,7 +623,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) | |||
623 | } | 623 | } |
624 | } | 624 | } |
625 | 625 | ||
626 | if (changed & IEEE80211_CONF_CHANGE_IDLE) { | 626 | if (changed & IEEE80211_CONF_CHANGE_IDLE && !wl->scanning) { |
627 | if (conf->flags & IEEE80211_CONF_IDLE) { | 627 | if (conf->flags & IEEE80211_CONF_IDLE) { |
628 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); | 628 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); |
629 | if (ret < 0) | 629 | if (ret < 0) |
@@ -895,11 +895,21 @@ static int wl1251_op_hw_scan(struct ieee80211_hw *hw, | |||
895 | if (ret < 0) | 895 | if (ret < 0) |
896 | goto out; | 896 | goto out; |
897 | 897 | ||
898 | if (hw->conf.flags & IEEE80211_CONF_IDLE) { | ||
899 | ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); | ||
900 | if (ret < 0) | ||
901 | goto out_sleep; | ||
902 | ret = wl1251_join(wl, wl->bss_type, wl->channel, | ||
903 | wl->beacon_int, wl->dtim_period); | ||
904 | if (ret < 0) | ||
905 | goto out_sleep; | ||
906 | } | ||
907 | |||
898 | skb = ieee80211_probereq_get(wl->hw, wl->vif, ssid, ssid_len, | 908 | skb = ieee80211_probereq_get(wl->hw, wl->vif, ssid, ssid_len, |
899 | req->ie_len); | 909 | req->ie_len); |
900 | if (!skb) { | 910 | if (!skb) { |
901 | ret = -ENOMEM; | 911 | ret = -ENOMEM; |
902 | goto out; | 912 | goto out_idle; |
903 | } | 913 | } |
904 | if (req->ie_len) | 914 | if (req->ie_len) |
905 | memcpy(skb_put(skb, req->ie_len), req->ie, req->ie_len); | 915 | memcpy(skb_put(skb, req->ie_len), req->ie, req->ie_len); |
@@ -908,11 +918,11 @@ static int wl1251_op_hw_scan(struct ieee80211_hw *hw, | |||
908 | skb->len); | 918 | skb->len); |
909 | dev_kfree_skb(skb); | 919 | dev_kfree_skb(skb); |
910 | if (ret < 0) | 920 | if (ret < 0) |
911 | goto out_sleep; | 921 | goto out_idle; |
912 | 922 | ||
913 | ret = wl1251_cmd_trigger_scan_to(wl, 0); | 923 | ret = wl1251_cmd_trigger_scan_to(wl, 0); |
914 | if (ret < 0) | 924 | if (ret < 0) |
915 | goto out_sleep; | 925 | goto out_idle; |
916 | 926 | ||
917 | wl->scanning = true; | 927 | wl->scanning = true; |
918 | 928 | ||
@@ -920,9 +930,13 @@ static int wl1251_op_hw_scan(struct ieee80211_hw *hw, | |||
920 | req->n_channels, WL1251_SCAN_NUM_PROBES); | 930 | req->n_channels, WL1251_SCAN_NUM_PROBES); |
921 | if (ret < 0) { | 931 | if (ret < 0) { |
922 | wl->scanning = false; | 932 | wl->scanning = false; |
923 | goto out_sleep; | 933 | goto out_idle; |
924 | } | 934 | } |
935 | goto out_sleep; | ||
925 | 936 | ||
937 | out_idle: | ||
938 | if (hw->conf.flags & IEEE80211_CONF_IDLE) | ||
939 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); | ||
926 | out_sleep: | 940 | out_sleep: |
927 | wl1251_ps_elp_sleep(wl); | 941 | wl1251_ps_elp_sleep(wl); |
928 | 942 | ||
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 28a37576d568..2c2ff3e1f849 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -5636,7 +5636,6 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) | |||
5636 | IEEE80211_HW_AP_LINK_PS | | 5636 | IEEE80211_HW_AP_LINK_PS | |
5637 | IEEE80211_HW_AMPDU_AGGREGATION | | 5637 | IEEE80211_HW_AMPDU_AGGREGATION | |
5638 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW | | 5638 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW | |
5639 | IEEE80211_HW_SCAN_WHILE_IDLE | | ||
5640 | IEEE80211_HW_QUEUE_CONTROL; | 5639 | IEEE80211_HW_QUEUE_CONTROL; |
5641 | 5640 | ||
5642 | wl->hw->wiphy->cipher_suites = cipher_suites; | 5641 | wl->hw->wiphy->cipher_suites = cipher_suites; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8d25769b3259..86ad2c341525 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1363,10 +1363,6 @@ struct ieee80211_tx_control { | |||
1363 | * setup strictly in HW. mac80211 should not attempt to do this in | 1363 | * setup strictly in HW. mac80211 should not attempt to do this in |
1364 | * software. | 1364 | * software. |
1365 | * | 1365 | * |
1366 | * @IEEE80211_HW_SCAN_WHILE_IDLE: The device can do hw scan while | ||
1367 | * being idle (i.e. mac80211 doesn't have to go idle-off during the | ||
1368 | * the scan). | ||
1369 | * | ||
1370 | * @IEEE80211_HW_WANT_MONITOR_VIF: The driver would like to be informed of | 1366 | * @IEEE80211_HW_WANT_MONITOR_VIF: The driver would like to be informed of |
1371 | * a virtual monitor interface when monitor interfaces are the only | 1367 | * a virtual monitor interface when monitor interfaces are the only |
1372 | * active interfaces. | 1368 | * active interfaces. |
@@ -1408,7 +1404,6 @@ enum ieee80211_hw_flags { | |||
1408 | IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, | 1404 | IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, |
1409 | IEEE80211_HW_AP_LINK_PS = 1<<22, | 1405 | IEEE80211_HW_AP_LINK_PS = 1<<22, |
1410 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, | 1406 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, |
1411 | IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, | ||
1412 | IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, | 1407 | IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, |
1413 | IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26, | 1408 | IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26, |
1414 | }; | 1409 | }; |
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 8e6040998ba6..b0e32d628114 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -151,8 +151,6 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf, | |||
151 | sf += snprintf(buf + sf, mxln - sf, "AP_LINK_PS\n"); | 151 | sf += snprintf(buf + sf, mxln - sf, "AP_LINK_PS\n"); |
152 | if (local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW) | 152 | if (local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW) |
153 | sf += snprintf(buf + sf, mxln - sf, "TX_AMPDU_SETUP_IN_HW\n"); | 153 | sf += snprintf(buf + sf, mxln - sf, "TX_AMPDU_SETUP_IN_HW\n"); |
154 | if (local->hw.flags & IEEE80211_HW_SCAN_WHILE_IDLE) | ||
155 | sf += snprintf(buf + sf, mxln - sf, "SCAN_WHILE_IDLE\n"); | ||
156 | 154 | ||
157 | rv = simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf)); | 155 | rv = simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf)); |
158 | kfree(buf); | 156 | kfree(buf); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index deb78e864af6..3ece8eb6d2df 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -151,12 +151,8 @@ static u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | sdata = rcu_dereference_protected(local->scan_sdata, | 154 | scanning = test_bit(SCAN_SW_SCANNING, &local->scanning) || |
155 | lockdep_is_held(&local->mtx)); | 155 | test_bit(SCAN_ONCHANNEL_SCANNING, &local->scanning); |
156 | if (sdata && !(local->hw.flags & IEEE80211_HW_SCAN_WHILE_IDLE)) { | ||
157 | scanning = true; | ||
158 | sdata->vif.bss_conf.idle = false; | ||
159 | } | ||
160 | 156 | ||
161 | list_for_each_entry(sdata, &local->interfaces, list) { | 157 | list_for_each_entry(sdata, &local->interfaces, list) { |
162 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR || | 158 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR || |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 2220331f4b7c..38b3468bc515 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -696,9 +696,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
696 | return -EINVAL; | 696 | return -EINVAL; |
697 | #endif | 697 | #endif |
698 | 698 | ||
699 | if ((hw->flags & IEEE80211_HW_SCAN_WHILE_IDLE) && !local->ops->hw_scan) | ||
700 | return -EINVAL; | ||
701 | |||
702 | if (!local->use_chanctx) { | 699 | if (!local->use_chanctx) { |
703 | for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { | 700 | for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { |
704 | const struct ieee80211_iface_combination *comb; | 701 | const struct ieee80211_iface_combination *comb; |