aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmsmac
diff options
context:
space:
mode:
authorHauke Mehrtens2013-03-24 01:45:57 +0100
committerJohn W. Linville2013-03-27 13:37:35 -0400
commitee9794ff49d60bb0f363704c4e03f7eed511ed3b (patch)
tree26c2c1913aaec4485ff4e9476b1b7ae4c7083b49 /drivers/net/wireless/brcm80211/brcmsmac
parent0627fe3d51f2b44f028bff1a593c85d05d629206 (diff)
brcmsmac: write beacon period to hardware
Make brcms_c_set_beacon_period() write the beacon period to the hardware if a new one is set. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 7e192955b5c9..4ffb0c6d1a0c 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -5551,10 +5551,20 @@ static void brcms_c_time_unlock(struct brcms_c_info *wlc)
int brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period)
{
+ u32 bcnint_us;
+
if (period == 0)
return -EINVAL;
wlc->default_bss->beacon_period = period;
+
+ bcnint_us = period << 10;
+ brcms_c_time_lock(wlc);
+ bcma_write32(wlc->hw->d11core, D11REGOFFS(tsf_cfprep),
+ (bcnint_us << CFPREP_CBI_SHIFT));
+ bcma_write32(wlc->hw->d11core, D11REGOFFS(tsf_cfpstart), bcnint_us);
+ brcms_c_time_unlock(wlc);
+
return 0;
}