Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Oleksij Rempel and committed by
John W. Linville
5f667642 4b2d841f

+5 -17
+5 -17
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
··· 74 74 __be32 htc_imask = 0; 75 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 82 WMI_CMD(WMI_DISABLE_INTR_CMDID); 78 83 if (reset_tsf) 79 84 ath9k_hw_reset_tsf(ah); ··· 115 110 ah->imask = 0; 116 111 117 112 ath9k_cmn_beacon_config_ap(ah, conf, ATH9K_HTC_MAX_BCN_VIF); 118 - /* 119 - * To reduce beacon misses under heavy TX load, 120 - * set the beacon response time to a larger value. 121 - */ 122 - if (conf->intval >= TU_TO_USEC(DEFAULT_SWBA_RESPONSE)) 123 - ah->config.sw_beacon_response_time = DEFAULT_SWBA_RESPONSE; 124 - else 125 - ah->config.sw_beacon_response_time = MIN_SWBA_RESPONSE; 126 - 127 113 ath9k_htc_beacon_init(priv, conf, false); 128 114 } 129 115 ··· 125 129 ah->imask = 0; 126 130 127 131 ath9k_cmn_beacon_config_adhoc(ah, conf); 128 - /* 129 - * Only one IBSS interfce is allowed. 130 - */ 131 - if (conf->intval >= TU_TO_USEC(DEFAULT_SWBA_RESPONSE)) 132 - ah->config.sw_beacon_response_time = DEFAULT_SWBA_RESPONSE; 133 - else 134 - ah->config.sw_beacon_response_time = MIN_SWBA_RESPONSE; 135 - 136 132 ath9k_htc_beacon_init(priv, conf, conf->ibss_creator); 137 133 } 138 134