diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-06-25 15:15:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-25 15:26:36 -0400 |
commit | 855df36de365fb3b49eb06c352015e3d215b43fe (patch) | |
tree | 2a76f128eb457e1bacb585260b3e03f72b03cc1e /drivers/net/wireless/iwlwifi/mvm/scan.c | |
parent | d6067f0e17eb1de7d9b1d792f67d17c6e894b770 (diff) | |
parent | 97dc94f1d933c9df2c0b327066ea130c0e92083f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 4b6c7d4bd199..3206fa097255 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c | |||
@@ -204,7 +204,8 @@ static void iwl_mvm_scan_fill_channels(struct iwl_scan_cmd *cmd, | |||
204 | */ | 204 | */ |
205 | static u16 iwl_mvm_fill_probe_req(struct ieee80211_mgmt *frame, const u8 *ta, | 205 | static u16 iwl_mvm_fill_probe_req(struct ieee80211_mgmt *frame, const u8 *ta, |
206 | int n_ssids, const u8 *ssid, int ssid_len, | 206 | int n_ssids, const u8 *ssid, int ssid_len, |
207 | const u8 *ie, int ie_len, | 207 | const u8 *band_ie, int band_ie_len, |
208 | const u8 *common_ie, int common_ie_len, | ||
208 | int left) | 209 | int left) |
209 | { | 210 | { |
210 | int len = 0; | 211 | int len = 0; |
@@ -244,12 +245,19 @@ static u16 iwl_mvm_fill_probe_req(struct ieee80211_mgmt *frame, const u8 *ta, | |||
244 | 245 | ||
245 | len += ssid_len + 2; | 246 | len += ssid_len + 2; |
246 | 247 | ||
247 | if (WARN_ON(left < ie_len)) | 248 | if (WARN_ON(left < band_ie_len + common_ie_len)) |
248 | return len; | 249 | return len; |
249 | 250 | ||
250 | if (ie && ie_len) { | 251 | if (band_ie && band_ie_len) { |
251 | memcpy(pos, ie, ie_len); | 252 | memcpy(pos, band_ie, band_ie_len); |
252 | len += ie_len; | 253 | pos += band_ie_len; |
254 | len += band_ie_len; | ||
255 | } | ||
256 | |||
257 | if (common_ie && common_ie_len) { | ||
258 | memcpy(pos, common_ie, common_ie_len); | ||
259 | pos += common_ie_len; | ||
260 | len += common_ie_len; | ||
253 | } | 261 | } |
254 | 262 | ||
255 | return (u16)len; | 263 | return (u16)len; |
@@ -382,7 +390,7 @@ int iwl_mvm_scan_request(struct iwl_mvm *mvm, | |||
382 | (struct ieee80211_mgmt *)cmd->data, | 390 | (struct ieee80211_mgmt *)cmd->data, |
383 | vif->addr, | 391 | vif->addr, |
384 | req->n_ssids, ssid, ssid_len, | 392 | req->n_ssids, ssid, ssid_len, |
385 | req->ie, req->ie_len, | 393 | req->ie, req->ie_len, NULL, 0, |
386 | mvm->fw->ucode_capa.max_probe_length)); | 394 | mvm->fw->ucode_capa.max_probe_length)); |
387 | 395 | ||
388 | iwl_mvm_scan_fill_channels(cmd, req, basic_ssid, ¶ms); | 396 | iwl_mvm_scan_fill_channels(cmd, req, basic_ssid, ¶ms); |
@@ -561,7 +569,7 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm, | |||
561 | 569 | ||
562 | static void iwl_scan_offload_build_tx_cmd(struct iwl_mvm *mvm, | 570 | static void iwl_scan_offload_build_tx_cmd(struct iwl_mvm *mvm, |
563 | struct ieee80211_vif *vif, | 571 | struct ieee80211_vif *vif, |
564 | struct ieee80211_sched_scan_ies *ies, | 572 | struct ieee80211_scan_ies *ies, |
565 | enum ieee80211_band band, | 573 | enum ieee80211_band band, |
566 | struct iwl_tx_cmd *cmd, | 574 | struct iwl_tx_cmd *cmd, |
567 | u8 *data) | 575 | u8 *data) |
@@ -577,7 +585,8 @@ static void iwl_scan_offload_build_tx_cmd(struct iwl_mvm *mvm, | |||
577 | cmd_len = iwl_mvm_fill_probe_req((struct ieee80211_mgmt *)data, | 585 | cmd_len = iwl_mvm_fill_probe_req((struct ieee80211_mgmt *)data, |
578 | vif->addr, | 586 | vif->addr, |
579 | 1, NULL, 0, | 587 | 1, NULL, 0, |
580 | ies->ie[band], ies->len[band], | 588 | ies->ies[band], ies->len[band], |
589 | ies->common_ies, ies->common_ie_len, | ||
581 | SCAN_OFFLOAD_PROBE_REQ_SIZE); | 590 | SCAN_OFFLOAD_PROBE_REQ_SIZE); |
582 | cmd->len = cpu_to_le16(cmd_len); | 591 | cmd->len = cpu_to_le16(cmd_len); |
583 | } | 592 | } |
@@ -735,7 +744,7 @@ static void iwl_build_channel_cfg(struct iwl_mvm *mvm, | |||
735 | int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm, | 744 | int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm, |
736 | struct ieee80211_vif *vif, | 745 | struct ieee80211_vif *vif, |
737 | struct cfg80211_sched_scan_request *req, | 746 | struct cfg80211_sched_scan_request *req, |
738 | struct ieee80211_sched_scan_ies *ies) | 747 | struct ieee80211_scan_ies *ies) |
739 | { | 748 | { |
740 | int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels; | 749 | int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels; |
741 | int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; | 750 | int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; |