diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2014-03-01 21:15:58 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-17 18:13:07 +0100 |
commit | 4c9a1f32600b9181558737dede31403c1ca05291 (patch) | |
tree | 9b10247f5e64da9dd4a74842fa355838f6e93951 /drivers/net/wireless/ath/ath9k/common-beacon.c | |
parent | ath9k_htc: use ath9k_cmn_beacon_config_sta (diff) | |
download | linux-4c9a1f32600b9181558737dede31403c1ca05291.tar.xz linux-4c9a1f32600b9181558737dede31403c1ca05291.zip |
ath9k: move ath9k_beacon_config_adhoc to common
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common-beacon.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/common-beacon.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common-beacon.c b/drivers/net/wireless/ath/ath9k/common-beacon.c index 35cc9fddfb35..45bc899cbeb0 100644 --- a/drivers/net/wireless/ath/ath9k/common-beacon.c +++ b/drivers/net/wireless/ath/ath9k/common-beacon.c @@ -124,3 +124,28 @@ int ath9k_cmn_beacon_config_sta(struct ath_hw *ah, return 0; } EXPORT_SYMBOL(ath9k_cmn_beacon_config_sta); + +void ath9k_cmn_beacon_config_adhoc(struct ath_hw *ah, + struct ath_beacon_config *conf) +{ + struct ath_common *common = ath9k_hw_common(ah); + + conf->intval = TU_TO_USEC(conf->beacon_interval); + + if (conf->ibss_creator) + conf->nexttbtt = conf->intval; + else + conf->nexttbtt = ath9k_get_next_tbtt(ah, ath9k_hw_gettsf64(ah), + conf->beacon_interval); + + if (conf->enable_beacon) + ah->imask |= ATH9K_INT_SWBA; + else + ah->imask &= ~ATH9K_INT_SWBA; + + ath_dbg(common, BEACON, + "IBSS (%s) nexttbtt: %u intval: %u conf_intval: %u\n", + (conf->enable_beacon) ? "Enable" : "Disable", + conf->nexttbtt, conf->intval, conf->beacon_interval); +} +EXPORT_SYMBOL(ath9k_cmn_beacon_config_adhoc); |