diff options
-rw-r--r-- | drivers/net/wireless/wl12xx/conf.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 18 |
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index d16094f2604f..5551d9d4016b 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
@@ -516,6 +516,13 @@ struct conf_rx_settings { | |||
516 | #define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \ | 516 | #define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \ |
517 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS) | 517 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS) |
518 | 518 | ||
519 | /* | ||
520 | * Default rates for working as IBSS. use 11b rates | ||
521 | */ | ||
522 | #define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \ | ||
523 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \ | ||
524 | CONF_HW_BIT_RATE_11MBPS); | ||
525 | |||
519 | struct conf_tx_rate_class { | 526 | struct conf_tx_rate_class { |
520 | 527 | ||
521 | /* | 528 | /* |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 1dd735cc38b1..53a8e2357ccf 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -2509,6 +2509,24 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl, | |||
2509 | } | 2509 | } |
2510 | } | 2510 | } |
2511 | 2511 | ||
2512 | if (changed & BSS_CHANGED_IBSS) { | ||
2513 | wl1271_debug(DEBUG_ADHOC, "ibss_joined: %d", | ||
2514 | bss_conf->ibss_joined); | ||
2515 | |||
2516 | if (bss_conf->ibss_joined) { | ||
2517 | u32 rates = bss_conf->basic_rates; | ||
2518 | wl->basic_rate_set = wl1271_tx_enabled_rates_get(wl, | ||
2519 | rates); | ||
2520 | wl->basic_rate = wl1271_tx_min_rate_get(wl); | ||
2521 | |||
2522 | /* by default, use 11b rates */ | ||
2523 | wl->rate_set = CONF_TX_IBSS_DEFAULT_RATES; | ||
2524 | ret = wl1271_acx_sta_rate_policies(wl); | ||
2525 | if (ret < 0) | ||
2526 | goto out; | ||
2527 | } | ||
2528 | } | ||
2529 | |||
2512 | ret = wl1271_bss_erp_info_changed(wl, bss_conf, changed); | 2530 | ret = wl1271_bss_erp_info_changed(wl, bss_conf, changed); |
2513 | if (ret < 0) | 2531 | if (ret < 0) |
2514 | goto out; | 2532 | goto out; |