hw.c (0005baf4a31efe6de6f922f73ccbd3762a110062) | hw.c (e239d8591843945630521ec85edca08289f1a751) |
---|---|
1/* 2 * Copyright (c) 2008-2009 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1181 unchanged lines hidden (view full) --- 1190 return true; 1191 } 1192} 1193 1194void ath9k_hw_init_global_settings(struct ath_hw *ah) 1195{ 1196 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf; 1197 int acktimeout; | 1/* 2 * Copyright (c) 2008-2009 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1181 unchanged lines hidden (view full) --- 1190 return true; 1191 } 1192} 1193 1194void ath9k_hw_init_global_settings(struct ath_hw *ah) 1195{ 1196 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf; 1197 int acktimeout; |
1198 int slottime; |
|
1198 int sifstime; 1199 1200 ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n", 1201 ah->misc_mode); 1202 1203 if (ah->misc_mode != 0) 1204 REG_WRITE(ah, AR_PCU_MISC, 1205 REG_READ(ah, AR_PCU_MISC) | ah->misc_mode); 1206 1207 if (conf->channel && conf->channel->band == IEEE80211_BAND_5GHZ) 1208 sifstime = 16; 1209 else 1210 sifstime = 10; 1211 | 1199 int sifstime; 1200 1201 ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n", 1202 ah->misc_mode); 1203 1204 if (ah->misc_mode != 0) 1205 REG_WRITE(ah, AR_PCU_MISC, 1206 REG_READ(ah, AR_PCU_MISC) | ah->misc_mode); 1207 1208 if (conf->channel && conf->channel->band == IEEE80211_BAND_5GHZ) 1209 sifstime = 16; 1210 else 1211 sifstime = 10; 1212 |
1212 acktimeout = ah->slottime + sifstime; 1213 ath9k_hw_setslottime(ah, ah->slottime); | 1213 /* As defined by IEEE 802.11-2007 17.3.8.6 */ 1214 slottime = ah->slottime + 3 * ah->coverage_class; 1215 acktimeout = slottime + sifstime; 1216 ath9k_hw_setslottime(ah, slottime); |
1214 ath9k_hw_set_ack_timeout(ah, acktimeout); 1215 ath9k_hw_set_cts_timeout(ah, acktimeout); 1216 if (ah->globaltxtimeout != (u32) -1) 1217 ath9k_hw_set_global_txtimeout(ah, ah->globaltxtimeout); 1218} 1219EXPORT_SYMBOL(ath9k_hw_init_global_settings); 1220 1221void ath9k_hw_deinit(struct ath_hw *ah) --- 2705 unchanged lines hidden --- | 1217 ath9k_hw_set_ack_timeout(ah, acktimeout); 1218 ath9k_hw_set_cts_timeout(ah, acktimeout); 1219 if (ah->globaltxtimeout != (u32) -1) 1220 ath9k_hw_set_global_txtimeout(ah, ah->globaltxtimeout); 1221} 1222EXPORT_SYMBOL(ath9k_hw_init_global_settings); 1223 1224void ath9k_hw_deinit(struct ath_hw *ah) --- 2705 unchanged lines hidden --- |