diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-02-12 11:06:52 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-12 11:06:52 -0500 |
commit | 4fe0c75eedb15af13859ef123db17fefed5af7ae (patch) | |
tree | 6ed38d8e2e0ae457d10a2af2e496e9ecb4d34e08 /drivers/net/wireless/ti | |
parent | 8457703f1e86aaf0f134402dd1e09e1f13e65222 (diff) | |
parent | 9c35d7d2368f54313b988a01c408e5cf863ffd9e (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'drivers/net/wireless/ti')
-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 |
3 files changed, 24 insertions, 7 deletions
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; |