diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2014-03-01 15:16:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-17 13:13:09 -0400 |
commit | 5f667642f4b290b04d88d5ca926fba81fed6180d (patch) | |
tree | f6ce88b4d324121a506f283dcb2f52caa6300333 /drivers/net/wireless/ath | |
parent | 4b2d841f5bc3143f5a019b6a441c19bf2986bdf4 (diff) |
ath9k_htc: move DEFAULT_SWBA_RESPONSE check to ath9k_htc_beacon_init
... to remove some more dups.
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')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c index cbaf4e0429f0..e8b6ec3c1dbb 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | |||
@@ -74,6 +74,11 @@ static void ath9k_htc_beacon_init(struct ath9k_htc_priv *priv, | |||
74 | __be32 htc_imask = 0; | 74 | __be32 htc_imask = 0; |
75 | u8 cmd_rsp; | 75 | u8 cmd_rsp; |
76 | 76 | ||
77 | if (conf->intval >= TU_TO_USEC(DEFAULT_SWBA_RESPONSE)) | ||
78 | ah->config.sw_beacon_response_time = DEFAULT_SWBA_RESPONSE; | ||
79 | else | ||
80 | ah->config.sw_beacon_response_time = MIN_SWBA_RESPONSE; | ||
81 | |||
77 | WMI_CMD(WMI_DISABLE_INTR_CMDID); | 82 | WMI_CMD(WMI_DISABLE_INTR_CMDID); |
78 | if (reset_tsf) | 83 | if (reset_tsf) |
79 | ath9k_hw_reset_tsf(ah); | 84 | ath9k_hw_reset_tsf(ah); |
@@ -110,15 +115,6 @@ static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv, | |||
110 | ah->imask = 0; | 115 | ah->imask = 0; |
111 | 116 | ||
112 | ath9k_cmn_beacon_config_ap(ah, conf, ATH9K_HTC_MAX_BCN_VIF); | 117 | ath9k_cmn_beacon_config_ap(ah, conf, ATH9K_HTC_MAX_BCN_VIF); |
113 | /* | ||
114 | * To reduce beacon misses under heavy TX load, | ||
115 | * set the beacon response time to a larger value. | ||
116 | */ | ||
117 | if (conf->intval >= TU_TO_USEC(DEFAULT_SWBA_RESPONSE)) | ||
118 | ah->config.sw_beacon_response_time = DEFAULT_SWBA_RESPONSE; | ||
119 | else | ||
120 | ah->config.sw_beacon_response_time = MIN_SWBA_RESPONSE; | ||
121 | |||
122 | ath9k_htc_beacon_init(priv, conf, false); | 118 | ath9k_htc_beacon_init(priv, conf, false); |
123 | } | 119 | } |
124 | 120 | ||
@@ -129,14 +125,6 @@ static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv, | |||
129 | ah->imask = 0; | 125 | ah->imask = 0; |
130 | 126 | ||
131 | ath9k_cmn_beacon_config_adhoc(ah, conf); | 127 | ath9k_cmn_beacon_config_adhoc(ah, conf); |
132 | /* | ||
133 | * Only one IBSS interfce is allowed. | ||
134 | */ | ||
135 | if (conf->intval >= TU_TO_USEC(DEFAULT_SWBA_RESPONSE)) | ||
136 | ah->config.sw_beacon_response_time = DEFAULT_SWBA_RESPONSE; | ||
137 | else | ||
138 | ah->config.sw_beacon_response_time = MIN_SWBA_RESPONSE; | ||
139 | |||
140 | ath9k_htc_beacon_init(priv, conf, conf->ibss_creator); | 128 | ath9k_htc_beacon_init(priv, conf, conf->ibss_creator); |
141 | } | 129 | } |
142 | 130 | ||