01e55d35d441cb2f7e1631bf5cfcd254b229f1b2
[openwrt.git] / package / mac80211 / patches / 463-ath9k_fix_slottime.patch
1 --- a/drivers/net/wireless/ath/ath5k/ath5k.h
2 +++ b/drivers/net/wireless/ath/ath5k/ath5k.h
3 @@ -1057,6 +1057,7 @@ struct ath5k_hw {
4 u8 ah_coverage_class;
5 bool ah_ack_bitrate_high;
6 u8 ah_bwmode;
7 + bool ah_short_slot;
8
9 /* Antenna Control */
10 u32 ah_ant_ctl[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX];
11 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
12 +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
13 @@ -282,6 +282,15 @@ ath5k_bss_info_changed(struct ieee80211_
14 if (changes & BSS_CHANGED_BEACON_INT)
15 sc->bintval = bss_conf->beacon_int;
16
17 + if (changes & BSS_CHANGED_ERP_SLOT) {
18 + int slot_time;
19 +
20 + ah->ah_short_slot = bss_conf->use_short_slot;
21 + slot_time = ath5k_hw_get_default_slottime(ah) +
22 + 3 * ah->ah_coverage_class;
23 + ath5k_hw_set_ifs_intervals(ah, slot_time);
24 + }
25 +
26 if (changes & BSS_CHANGED_ASSOC) {
27 avf->assoc = bss_conf->assoc;
28 if (bss_conf->assoc)
29 --- a/drivers/net/wireless/ath/ath5k/pcu.c
30 +++ b/drivers/net/wireless/ath/ath5k/pcu.c
31 @@ -151,9 +151,9 @@ unsigned int ath5k_hw_get_default_slotti
32 slot_time = AR5K_INIT_SLOT_TIME_QUARTER_RATE;
33 break;
34 case AR5K_BWMODE_DEFAULT:
35 - slot_time = AR5K_INIT_SLOT_TIME_DEFAULT;
36 default:
37 - if (channel->hw_value & CHANNEL_CCK)
38 + slot_time = AR5K_INIT_SLOT_TIME_DEFAULT;
39 + if ((channel->hw_value & CHANNEL_CCK) && !ah->ah_short_slot)
40 slot_time = AR5K_INIT_SLOT_TIME_B;
41 break;
42 }
This page took 0.040359 seconds and 3 git commands to generate.