Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of /home/cero1/src/openwrt
- Loading branch information
Showing
10 changed files
with
131 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
package/mac80211/patches/561-ath9k_antenna_mask_validate.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- a/drivers/net/wireless/ath/ath9k/main.c | ||
+++ b/drivers/net/wireless/ath/ath9k/main.c | ||
@@ -1929,12 +1929,29 @@ static u32 fill_chainmask(u32 cap, u32 n | ||
return filled; | ||
} | ||
|
||
+static bool validate_antenna_mask(struct ath_hw *ah, u32 val) | ||
+{ | ||
+ switch (val & ah->caps.rx_chainmask) { | ||
+ case 0x1: | ||
+ case 0x3: | ||
+ case 0x7: | ||
+ return true; | ||
+ case 0x2: | ||
+ return (ah->caps.rx_chainmask == 1); | ||
+ default: | ||
+ return false; | ||
+ } | ||
+} | ||
+ | ||
static int ath9k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) | ||
{ | ||
struct ath_softc *sc = hw->priv; | ||
struct ath_hw *ah = sc->sc_ah; | ||
|
||
- if (!rx_ant || !tx_ant) | ||
+ if (ah->caps.rx_chainmask != 1) | ||
+ rx_ant |= tx_ant; | ||
+ | ||
+ if (!validate_antenna_mask(ah, rx_ant) || !tx_ant) | ||
return -EINVAL; | ||
|
||
sc->ant_rx = rx_ant; |
11 changes: 11 additions & 0 deletions
11
package/mac80211/patches/562-ath9k_reduce_ani_interval.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/drivers/net/wireless/ath/ath9k/ani.h | ||
+++ b/drivers/net/wireless/ath/ath9k/ani.h | ||
@@ -51,7 +51,7 @@ | ||
#define ATH9K_ANI_PERIOD 300 | ||
|
||
/* in ms */ | ||
-#define ATH9K_ANI_POLLINTERVAL 1000 | ||
+#define ATH9K_ANI_POLLINTERVAL 100 | ||
|
||
#define HAL_NOISE_IMMUNE_MAX 4 | ||
#define HAL_SPUR_IMMUNE_MAX 7 |
13 changes: 13 additions & 0 deletions
13
package/mac80211/patches/563-ath9k_enable_ar9340_ani.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- a/drivers/net/wireless/ath/ath9k/hw.c | ||
+++ b/drivers/net/wireless/ath/ath9k/hw.c | ||
@@ -676,10 +676,6 @@ static int __ath9k_hw_init(struct ath_hw | ||
if (!AR_SREV_9300_20_OR_LATER(ah)) | ||
ah->ani_function &= ~ATH9K_ANI_MRC_CCK; | ||
|
||
- /* disable ANI for 9340 */ | ||
- if (AR_SREV_9340(ah)) | ||
- ah->config.enable_ani = false; | ||
- | ||
ath9k_hw_init_mode_regs(ah); | ||
|
||
if (!ah->is_pciexpress) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- a/drivers/net/wireless/ath/ath9k/ani.c | ||
+++ b/drivers/net/wireless/ath/ath9k/ani.c | ||
@@ -153,9 +153,7 @@ static void ath9k_hw_set_ofdm_nil(struct | ||
immunityLevel, BEACON_RSSI(ah), | ||
aniState->rssiThrLow, aniState->rssiThrHigh); | ||
|
||
- if (aniState->update_ani) | ||
- aniState->ofdmNoiseImmunityLevel = immunityLevel; | ||
- | ||
+ aniState->ofdmNoiseImmunityLevel = immunityLevel; | ||
entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; | ||
entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; | ||
|
||
@@ -222,9 +220,7 @@ static void ath9k_hw_set_cck_nil(struct | ||
immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI) | ||
immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI; | ||
|
||
- if (aniState->update_ani) | ||
- aniState->cckNoiseImmunityLevel = immunityLevel; | ||
- | ||
+ aniState->cckNoiseImmunityLevel = immunityLevel; | ||
entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; | ||
entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; | ||
|
||
@@ -338,7 +334,6 @@ void ath9k_ani_reset(struct ath_hw *ah, | ||
aniState->ofdmNoiseImmunityLevel, | ||
aniState->cckNoiseImmunityLevel); | ||
|
||
- aniState->update_ani = false; | ||
ofdm_nil = ATH9K_ANI_OFDM_DEF_LEVEL; | ||
cck_nil = ATH9K_ANI_CCK_DEF_LEVEL; | ||
} | ||
@@ -354,8 +349,6 @@ void ath9k_ani_reset(struct ath_hw *ah, | ||
is_scanning, | ||
aniState->ofdmNoiseImmunityLevel, | ||
aniState->cckNoiseImmunityLevel); | ||
- | ||
- aniState->update_ani = true; | ||
} | ||
ath9k_hw_set_ofdm_nil(ah, ofdm_nil); | ||
ath9k_hw_set_cck_nil(ah, cck_nil); | ||
@@ -538,7 +531,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah | ||
ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; | ||
ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL; | ||
ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL; | ||
- ani->update_ani = false; | ||
} | ||
|
||
/* | ||
--- a/drivers/net/wireless/ath/ath9k/ani.h | ||
+++ b/drivers/net/wireless/ath/ath9k/ani.h | ||
@@ -116,7 +116,6 @@ struct ar5416AniState { | ||
u8 firstepLevel; | ||
u8 ofdmWeakSigDetect; | ||
u8 cckWeakSigThreshold; | ||
- bool update_ani; | ||
u32 listenTime; | ||
int32_t rssiThrLow; | ||
int32_t rssiThrHigh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters