diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-03-26 06:53:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:39:15 -0400 |
commit | 60e84c2ebb7b04361cf1ba0d325cc93366bd04a6 (patch) | |
tree | bbe48b596b33bdb009cd8215b7d0e653b92d8425 /drivers | |
parent | 5da11dcde3d2a91688e02f032062fa26877eacb0 (diff) |
wl1271: Update beacon interval properly for ad-hoc
Configure the hardware beacon interval to whatever requested by the
mac80211.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 10 |
3 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index 37ad5cd0b82f..c5559efcf5a7 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
@@ -452,6 +452,9 @@ struct wl1271 { | |||
452 | /* The current band */ | 452 | /* The current band */ |
453 | enum ieee80211_band band; | 453 | enum ieee80211_band band; |
454 | 454 | ||
455 | /* Beaconing interval (needed for ad-hoc) */ | ||
456 | u32 beacon_int; | ||
457 | |||
455 | /* Default key (for WEP) */ | 458 | /* Default key (for WEP) */ |
456 | u32 default_key; | 459 | u32 default_key; |
457 | 460 | ||
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 0aa2422982d3..0dcb3c2afe07 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -323,7 +323,7 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type) | |||
323 | CONF_HW_BIT_RATE_24MBPS); | 323 | CONF_HW_BIT_RATE_24MBPS); |
324 | } | 324 | } |
325 | 325 | ||
326 | join->beacon_interval = cpu_to_le16(WL1271_DEFAULT_BEACON_INT); | 326 | join->beacon_interval = cpu_to_le16(wl->beacon_int); |
327 | join->dtim_interval = WL1271_DEFAULT_DTIM_PERIOD; | 327 | join->dtim_interval = WL1271_DEFAULT_DTIM_PERIOD; |
328 | 328 | ||
329 | join->channel = wl->channel; | 329 | join->channel = wl->channel; |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 49f37b0183ac..523e051d62dd 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -1575,6 +1575,15 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1575 | if (ret < 0) | 1575 | if (ret < 0) |
1576 | goto out; | 1576 | goto out; |
1577 | 1577 | ||
1578 | if ((changed && BSS_CHANGED_BEACON_INT) && | ||
1579 | (wl->bss_type == BSS_TYPE_IBSS)) { | ||
1580 | wl1271_debug(DEBUG_ADHOC, "ad-hoc beacon interval updated: %d", | ||
1581 | bss_conf->beacon_int); | ||
1582 | |||
1583 | wl->beacon_int = bss_conf->beacon_int; | ||
1584 | do_join = true; | ||
1585 | } | ||
1586 | |||
1578 | if ((changed && BSS_CHANGED_BEACON) && | 1587 | if ((changed && BSS_CHANGED_BEACON) && |
1579 | (wl->bss_type == BSS_TYPE_IBSS)) { | 1588 | (wl->bss_type == BSS_TYPE_IBSS)) { |
1580 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); | 1589 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); |
@@ -2193,6 +2202,7 @@ struct ieee80211_hw *wl1271_alloc_hw(void) | |||
2193 | 2202 | ||
2194 | INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work); | 2203 | INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work); |
2195 | wl->channel = WL1271_DEFAULT_CHANNEL; | 2204 | wl->channel = WL1271_DEFAULT_CHANNEL; |
2205 | wl->beacon_int = WL1271_DEFAULT_BEACON_INT; | ||
2196 | wl->default_key = 0; | 2206 | wl->default_key = 0; |
2197 | wl->rx_counter = 0; | 2207 | wl->rx_counter = 0; |
2198 | wl->rx_config = WL1271_DEFAULT_RX_CONFIG; | 2208 | wl->rx_config = WL1271_DEFAULT_RX_CONFIG; |