diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_cmd.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index f11f9f47ffd5..5cee59fb8c5e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -317,18 +317,10 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type) | |||
317 | join->rx_config_options = cpu_to_le32(wl->rx_config); | 317 | join->rx_config_options = cpu_to_le32(wl->rx_config); |
318 | join->rx_filter_options = cpu_to_le32(wl->rx_filter); | 318 | join->rx_filter_options = cpu_to_le32(wl->rx_filter); |
319 | join->bss_type = bss_type; | 319 | join->bss_type = bss_type; |
320 | join->basic_rate_set = wl->basic_rate_set; | ||
320 | 321 | ||
321 | if (wl->band == IEEE80211_BAND_2GHZ) | 322 | if (wl->band == IEEE80211_BAND_5GHZ) |
322 | join->basic_rate_set = cpu_to_le32(CONF_HW_BIT_RATE_1MBPS | | ||
323 | CONF_HW_BIT_RATE_2MBPS | | ||
324 | CONF_HW_BIT_RATE_5_5MBPS | | ||
325 | CONF_HW_BIT_RATE_11MBPS); | ||
326 | else { | ||
327 | join->bss_type |= WL1271_JOIN_CMD_BSS_TYPE_5GHZ; | 323 | join->bss_type |= WL1271_JOIN_CMD_BSS_TYPE_5GHZ; |
328 | join->basic_rate_set = cpu_to_le32(CONF_HW_BIT_RATE_6MBPS | | ||
329 | CONF_HW_BIT_RATE_12MBPS | | ||
330 | CONF_HW_BIT_RATE_24MBPS); | ||
331 | } | ||
332 | 324 | ||
333 | join->beacon_interval = cpu_to_le16(wl->beacon_int); | 325 | join->beacon_interval = cpu_to_le16(wl->beacon_int); |
334 | join->dtim_interval = WL1271_DEFAULT_DTIM_PERIOD; | 326 | join->dtim_interval = WL1271_DEFAULT_DTIM_PERIOD; |
@@ -581,17 +573,21 @@ int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len, | |||
581 | struct wl1271_cmd_trigger_scan_to *trigger = NULL; | 573 | struct wl1271_cmd_trigger_scan_to *trigger = NULL; |
582 | struct wl1271_cmd_scan *params = NULL; | 574 | struct wl1271_cmd_scan *params = NULL; |
583 | struct ieee80211_channel *channels; | 575 | struct ieee80211_channel *channels; |
576 | u32 rate; | ||
584 | int i, j, n_ch, ret; | 577 | int i, j, n_ch, ret; |
585 | u16 scan_options = 0; | 578 | u16 scan_options = 0; |
586 | u8 ieee_band; | 579 | u8 ieee_band; |
587 | 580 | ||
588 | if (band == WL1271_SCAN_BAND_2_4_GHZ) | 581 | if (band == WL1271_SCAN_BAND_2_4_GHZ) { |
589 | ieee_band = IEEE80211_BAND_2GHZ; | 582 | ieee_band = IEEE80211_BAND_2GHZ; |
590 | else if (band == WL1271_SCAN_BAND_DUAL && wl1271_11a_enabled()) | 583 | rate = wl->conf.tx.basic_rate; |
584 | } else if (band == WL1271_SCAN_BAND_DUAL && wl1271_11a_enabled()) { | ||
591 | ieee_band = IEEE80211_BAND_2GHZ; | 585 | ieee_band = IEEE80211_BAND_2GHZ; |
592 | else if (band == WL1271_SCAN_BAND_5_GHZ && wl1271_11a_enabled()) | 586 | rate = wl->conf.tx.basic_rate; |
587 | } else if (band == WL1271_SCAN_BAND_5_GHZ && wl1271_11a_enabled()) { | ||
593 | ieee_band = IEEE80211_BAND_5GHZ; | 588 | ieee_band = IEEE80211_BAND_5GHZ; |
594 | else | 589 | rate = wl->conf.tx.basic_rate_5; |
590 | } else | ||
595 | return -EINVAL; | 591 | return -EINVAL; |
596 | 592 | ||
597 | if (wl->hw->wiphy->bands[ieee_band]->channels == NULL) | 593 | if (wl->hw->wiphy->bands[ieee_band]->channels == NULL) |
@@ -618,8 +614,7 @@ int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len, | |||
618 | params->params.scan_options = cpu_to_le16(scan_options); | 614 | params->params.scan_options = cpu_to_le16(scan_options); |
619 | 615 | ||
620 | params->params.num_probe_requests = probe_requests; | 616 | params->params.num_probe_requests = probe_requests; |
621 | /* Let the fw autodetect suitable tx_rate for probes */ | 617 | params->params.tx_rate = rate; |
622 | params->params.tx_rate = 0; | ||
623 | params->params.tid_trigger = 0; | 618 | params->params.tid_trigger = 0; |
624 | params->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; | 619 | params->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; |
625 | 620 | ||