diff options
author | Yoni Divinsky <yoni.divinsky@ti.com> | 2012-05-16 04:34:17 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-06 12:33:27 -0400 |
commit | 78f85f5066b721666f869d537eaca6a0818aa301 (patch) | |
tree | 5defc13083649dc6660caadd22f15c887581b0a8 /drivers | |
parent | 186b5a7c938b13b9f6ee2532a13596556c224df0 (diff) |
wlcore: add role_id to all the sched_scan commands
Due to a need by the firmware when working in multirole
the role id needs to be added to the structs of the
following commands:
CMD_CONNECTION_SCAN_CFG, CMD_CONNECTION_SCAN_SSID_CFG,
CMD_START_PERIODIC_SCAN, CMD_STOP_PERIODIC_SCAN
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/scan.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/scan.h | 14 |
3 files changed, 19 insertions, 9 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 54da16501e42..8800a63539e3 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -2421,7 +2421,7 @@ static int wl1271_sta_handle_idle(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
2421 | } else { | 2421 | } else { |
2422 | /* The current firmware only supports sched_scan in idle */ | 2422 | /* The current firmware only supports sched_scan in idle */ |
2423 | if (wl->sched_scanning) { | 2423 | if (wl->sched_scanning) { |
2424 | wl1271_scan_sched_scan_stop(wl); | 2424 | wl1271_scan_sched_scan_stop(wl, wlvif); |
2425 | ieee80211_sched_scan_stopped(wl->hw); | 2425 | ieee80211_sched_scan_stopped(wl->hw); |
2426 | } | 2426 | } |
2427 | 2427 | ||
@@ -3152,6 +3152,7 @@ static void wl1271_op_sched_scan_stop(struct ieee80211_hw *hw, | |||
3152 | struct ieee80211_vif *vif) | 3152 | struct ieee80211_vif *vif) |
3153 | { | 3153 | { |
3154 | struct wl1271 *wl = hw->priv; | 3154 | struct wl1271 *wl = hw->priv; |
3155 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); | ||
3155 | int ret; | 3156 | int ret; |
3156 | 3157 | ||
3157 | wl1271_debug(DEBUG_MAC80211, "wl1271_op_sched_scan_stop"); | 3158 | wl1271_debug(DEBUG_MAC80211, "wl1271_op_sched_scan_stop"); |
@@ -3165,7 +3166,7 @@ static void wl1271_op_sched_scan_stop(struct ieee80211_hw *hw, | |||
3165 | if (ret < 0) | 3166 | if (ret < 0) |
3166 | goto out; | 3167 | goto out; |
3167 | 3168 | ||
3168 | wl1271_scan_sched_scan_stop(wl); | 3169 | wl1271_scan_sched_scan_stop(wl, wlvif); |
3169 | 3170 | ||
3170 | wl1271_ps_elp_sleep(wl); | 3171 | wl1271_ps_elp_sleep(wl); |
3171 | out: | 3172 | out: |
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c index ade21a011c45..94668d8ba14e 100644 --- a/drivers/net/wireless/ti/wlcore/scan.c +++ b/drivers/net/wireless/ti/wlcore/scan.c | |||
@@ -537,6 +537,7 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl, | |||
537 | /* Returns the scan type to be used or a negative value on error */ | 537 | /* Returns the scan type to be used or a negative value on error */ |
538 | static int | 538 | static int |
539 | wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl, | 539 | wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl, |
540 | struct wl12xx_vif *wlvif, | ||
540 | struct cfg80211_sched_scan_request *req) | 541 | struct cfg80211_sched_scan_request *req) |
541 | { | 542 | { |
542 | struct wl1271_cmd_sched_scan_ssid_list *cmd = NULL; | 543 | struct wl1271_cmd_sched_scan_ssid_list *cmd = NULL; |
@@ -565,6 +566,7 @@ wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl, | |||
565 | goto out; | 566 | goto out; |
566 | } | 567 | } |
567 | 568 | ||
569 | cmd->role_id = wlvif->dev_role_id; | ||
568 | if (!n_match_ssids) { | 570 | if (!n_match_ssids) { |
569 | /* No filter, with ssids */ | 571 | /* No filter, with ssids */ |
570 | type = SCAN_SSID_FILTER_DISABLED; | 572 | type = SCAN_SSID_FILTER_DISABLED; |
@@ -652,6 +654,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
652 | if (!cfg) | 654 | if (!cfg) |
653 | return -ENOMEM; | 655 | return -ENOMEM; |
654 | 656 | ||
657 | cfg->role_id = wlvif->dev_role_id; | ||
655 | cfg->rssi_threshold = c->rssi_threshold; | 658 | cfg->rssi_threshold = c->rssi_threshold; |
656 | cfg->snr_threshold = c->snr_threshold; | 659 | cfg->snr_threshold = c->snr_threshold; |
657 | cfg->n_probe_reqs = c->num_probe_reqs; | 660 | cfg->n_probe_reqs = c->num_probe_reqs; |
@@ -669,7 +672,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
669 | cfg->intervals[i] = cpu_to_le32(req->interval); | 672 | cfg->intervals[i] = cpu_to_le32(req->interval); |
670 | 673 | ||
671 | cfg->ssid_len = 0; | 674 | cfg->ssid_len = 0; |
672 | ret = wl12xx_scan_sched_scan_ssid_list(wl, req); | 675 | ret = wl12xx_scan_sched_scan_ssid_list(wl, wlvif, req); |
673 | if (ret < 0) | 676 | if (ret < 0) |
674 | goto out; | 677 | goto out; |
675 | 678 | ||
@@ -741,6 +744,7 @@ int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
741 | if (!start) | 744 | if (!start) |
742 | return -ENOMEM; | 745 | return -ENOMEM; |
743 | 746 | ||
747 | start->role_id = wlvif->dev_role_id; | ||
744 | start->tag = WL1271_SCAN_DEFAULT_TAG; | 748 | start->tag = WL1271_SCAN_DEFAULT_TAG; |
745 | 749 | ||
746 | ret = wl1271_cmd_send(wl, CMD_START_PERIODIC_SCAN, start, | 750 | ret = wl1271_cmd_send(wl, CMD_START_PERIODIC_SCAN, start, |
@@ -762,7 +766,7 @@ void wl1271_scan_sched_scan_results(struct wl1271 *wl) | |||
762 | ieee80211_sched_scan_results(wl->hw); | 766 | ieee80211_sched_scan_results(wl->hw); |
763 | } | 767 | } |
764 | 768 | ||
765 | void wl1271_scan_sched_scan_stop(struct wl1271 *wl) | 769 | void wl1271_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
766 | { | 770 | { |
767 | struct wl1271_cmd_sched_scan_stop *stop; | 771 | struct wl1271_cmd_sched_scan_stop *stop; |
768 | int ret = 0; | 772 | int ret = 0; |
@@ -776,6 +780,7 @@ void wl1271_scan_sched_scan_stop(struct wl1271 *wl) | |||
776 | return; | 780 | return; |
777 | } | 781 | } |
778 | 782 | ||
783 | stop->role_id = wlvif->dev_role_id; | ||
779 | stop->tag = WL1271_SCAN_DEFAULT_TAG; | 784 | stop->tag = WL1271_SCAN_DEFAULT_TAG; |
780 | 785 | ||
781 | ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop, | 786 | ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop, |
diff --git a/drivers/net/wireless/ti/wlcore/scan.h b/drivers/net/wireless/ti/wlcore/scan.h index 81ee36ac2078..5b6a609fb460 100644 --- a/drivers/net/wireless/ti/wlcore/scan.h +++ b/drivers/net/wireless/ti/wlcore/scan.h | |||
@@ -40,7 +40,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
40 | struct cfg80211_sched_scan_request *req, | 40 | struct cfg80211_sched_scan_request *req, |
41 | struct ieee80211_sched_scan_ies *ies); | 41 | struct ieee80211_sched_scan_ies *ies); |
42 | int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 42 | int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
43 | void wl1271_scan_sched_scan_stop(struct wl1271 *wl); | 43 | void wl1271_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
44 | void wl1271_scan_sched_scan_results(struct wl1271 *wl); | 44 | void wl1271_scan_sched_scan_results(struct wl1271 *wl); |
45 | 45 | ||
46 | #define WL1271_SCAN_MAX_CHANNELS 24 | 46 | #define WL1271_SCAN_MAX_CHANNELS 24 |
@@ -185,7 +185,8 @@ struct wl1271_cmd_sched_scan_config { | |||
185 | 185 | ||
186 | u8 dfs; | 186 | u8 dfs; |
187 | 187 | ||
188 | u8 padding[3]; | 188 | u8 role_id; |
189 | u8 padding[2]; | ||
189 | 190 | ||
190 | struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ]; | 191 | struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ]; |
191 | struct conn_scan_ch_params channels_5[MAX_CHANNELS_5GHZ]; | 192 | struct conn_scan_ch_params channels_5[MAX_CHANNELS_5GHZ]; |
@@ -212,21 +213,24 @@ struct wl1271_cmd_sched_scan_ssid_list { | |||
212 | 213 | ||
213 | u8 n_ssids; | 214 | u8 n_ssids; |
214 | struct wl1271_ssid ssids[SCHED_SCAN_MAX_SSIDS]; | 215 | struct wl1271_ssid ssids[SCHED_SCAN_MAX_SSIDS]; |
215 | u8 padding[3]; | 216 | u8 role_id; |
217 | u8 padding[2]; | ||
216 | } __packed; | 218 | } __packed; |
217 | 219 | ||
218 | struct wl1271_cmd_sched_scan_start { | 220 | struct wl1271_cmd_sched_scan_start { |
219 | struct wl1271_cmd_header header; | 221 | struct wl1271_cmd_header header; |
220 | 222 | ||
221 | u8 tag; | 223 | u8 tag; |
222 | u8 padding[3]; | 224 | u8 role_id; |
225 | u8 padding[2]; | ||
223 | } __packed; | 226 | } __packed; |
224 | 227 | ||
225 | struct wl1271_cmd_sched_scan_stop { | 228 | struct wl1271_cmd_sched_scan_stop { |
226 | struct wl1271_cmd_header header; | 229 | struct wl1271_cmd_header header; |
227 | 230 | ||
228 | u8 tag; | 231 | u8 tag; |
229 | u8 padding[3]; | 232 | u8 role_id; |
233 | u8 padding[2]; | ||
230 | } __packed; | 234 | } __packed; |
231 | 235 | ||
232 | 236 | ||