aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2014-03-01 21:16:01 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-03-17 13:13:08 -0400
commitf7197924d5187201e1a6e1617ad7a8c81f333330 (patch)
tree42f097f58453d45585f6a23f2b7b9911ce63d3be /drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
parentath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_ap (diff)
downloadlinux-dev-f7197924d5187201e1a6e1617ad7a8c81f333330.tar.xz
linux-dev-f7197924d5187201e1a6e1617ad7a8c81f333330.zip
ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_adhoc
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/htc_drv_beacon.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_beacon.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index b23231fea02c..81237155a1e0 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -152,16 +152,13 @@ static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,
static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv,
struct ath_beacon_config *bss_conf)
{
- struct ath_common *common = ath9k_hw_common(priv->ah);
- enum ath9k_int imask = 0;
- u32 nexttbtt, intval, tsftu;
- __be32 htc_imask = 0;
- int ret __attribute__ ((unused));
- u8 cmd_rsp;
+ struct ath_hw *ah = priv->ah;
+ struct ath_common *common = ath9k_hw_common(ah);
+ u32 tsftu;
u64 tsf;
- intval = bss_conf->beacon_interval;
- nexttbtt = intval;
+ bss_conf->intval = bss_conf->beacon_interval;
+ bss_conf->nexttbtt = bss_conf->intval;
/*
* Pull nexttbtt forward to reflect the current TSF.
@@ -169,30 +166,26 @@ static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv,
tsf = ath9k_hw_gettsf64(priv->ah);
tsftu = TSF_TO_TU(tsf >> 32, tsf) + FUDGE;
do {
- nexttbtt += intval;
- } while (nexttbtt < tsftu);
+ bss_conf->nexttbtt += bss_conf->intval;
+ } while (bss_conf->nexttbtt < tsftu);
/*
* Only one IBSS interfce is allowed.
*/
- if (intval > DEFAULT_SWBA_RESPONSE)
+ if (bss_conf->intval > DEFAULT_SWBA_RESPONSE)
priv->ah->config.sw_beacon_response_time = DEFAULT_SWBA_RESPONSE;
else
priv->ah->config.sw_beacon_response_time = MIN_SWBA_RESPONSE;
if (bss_conf->enable_beacon)
- imask |= ATH9K_INT_SWBA;
+ ah->imask = ATH9K_INT_SWBA;
ath_dbg(common, CONFIG,
"IBSS Beacon config, intval: %d, nexttbtt: %u, resp_time: %d, imask: 0x%x\n",
- bss_conf->beacon_interval, nexttbtt,
- priv->ah->config.sw_beacon_response_time, imask);
+ bss_conf->beacon_interval, bss_conf->nexttbtt,
+ priv->ah->config.sw_beacon_response_time, ah->imask);
- WMI_CMD(WMI_DISABLE_INTR_CMDID);
- ath9k_hw_beaconinit(priv->ah, TU_TO_USEC(nexttbtt), TU_TO_USEC(intval));
- priv->beacon.bmisscnt = 0;
- htc_imask = cpu_to_be32(imask);
- WMI_CMD_BUF(WMI_ENABLE_INTR_CMDID, &htc_imask);
+ ath9k_htc_beacon_init(priv, bss_conf, bss_conf->ibss_creator);
}
void ath9k_htc_beaconep(void *drv_priv, struct sk_buff *skb,