File tree Expand file tree Collapse file tree
drivers/net/wireless/ath/ath9k Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,36 @@ void ar9003_paprd_enable(struct ath_hw *ah, bool val)
2121{
2222 struct ath_regulatory * regulatory = ath9k_hw_regulatory (ah );
2323 struct ath9k_channel * chan = ah -> curchan ;
24+ struct ar9300_eeprom * eep = & ah -> eeprom .ar9300_eep ;
25+
26+ /*
27+ * 3 bits for modalHeader5G.papdRateMaskHt20
28+ * is used for sub-band disabling of PAPRD.
29+ * 5G band is divided into 3 sub-bands -- upper,
30+ * middle, lower.
31+ * if bit 30 of modalHeader5G.papdRateMaskHt20 is set
32+ * -- disable PAPRD for upper band 5GHz
33+ * if bit 29 of modalHeader5G.papdRateMaskHt20 is set
34+ * -- disable PAPRD for middle band 5GHz
35+ * if bit 28 of modalHeader5G.papdRateMaskHt20 is set
36+ * -- disable PAPRD for lower band 5GHz
37+ */
38+
39+ if (IS_CHAN_5GHZ (chan )) {
40+ if (chan -> channel >= UPPER_5G_SUB_BAND_START ) {
41+ if (le32_to_cpu (eep -> modalHeader5G .papdRateMaskHt20 )
42+ & BIT (30 ))
43+ val = false;
44+ } else if (chan -> channel >= MID_5G_SUB_BAND_START ) {
45+ if (le32_to_cpu (eep -> modalHeader5G .papdRateMaskHt20 )
46+ & BIT (29 ))
47+ val = false;
48+ } else {
49+ if (le32_to_cpu (eep -> modalHeader5G .papdRateMaskHt20 )
50+ & BIT (28 ))
51+ val = false;
52+ }
53+ }
2454
2555 if (val ) {
2656 ah -> paprd_table_write_done = true;
Original file line number Diff line number Diff line change 143143#define AR_KEYTABLE_SIZE 128
144144#define POWER_UP_TIME 10000
145145#define SPUR_RSSI_THRESH 40
146+ #define UPPER_5G_SUB_BAND_START 5700
147+ #define MID_5G_SUB_BAND_START 5400
146148
147149#define CAB_TIMEOUT_VAL 10
148150#define BEACON_TIMEOUT_VAL 10
You can’t perform that action at this time.
0 commit comments