Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256380
b: refs/heads/master
c: 331c5ea
h: refs/heads/master
v: v3
  • Loading branch information
Mohammed Shafi Shajakhan authored and John W. Linville committed Jul 8, 2011
1 parent 0006f0d commit 2201257
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e156103cee78a1dd1c0d14efe08aa36fc9285013
refs/heads/master: 331c5ea2d92c76bfe58a9bb5e6d21160850a29bc
30 changes: 30 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@ void ar9003_paprd_enable(struct ath_hw *ah, bool val)
{
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
struct ath9k_channel *chan = ah->curchan;
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;

/*
* 3 bits for modalHeader5G.papdRateMaskHt20
* is used for sub-band disabling of PAPRD.
* 5G band is divided into 3 sub-bands -- upper,
* middle, lower.
* if bit 30 of modalHeader5G.papdRateMaskHt20 is set
* -- disable PAPRD for upper band 5GHz
* if bit 29 of modalHeader5G.papdRateMaskHt20 is set
* -- disable PAPRD for middle band 5GHz
* if bit 28 of modalHeader5G.papdRateMaskHt20 is set
* -- disable PAPRD for lower band 5GHz
*/

if (IS_CHAN_5GHZ(chan)) {
if (chan->channel >= UPPER_5G_SUB_BAND_START) {
if (le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20)
& BIT(30))
val = false;
} else if (chan->channel >= MID_5G_SUB_BAND_START) {
if (le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20)
& BIT(29))
val = false;
} else {
if (le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20)
& BIT(28))
val = false;
}
}

if (val) {
ah->paprd_table_write_done = true;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
#define AR_KEYTABLE_SIZE 128
#define POWER_UP_TIME 10000
#define SPUR_RSSI_THRESH 40
#define UPPER_5G_SUB_BAND_START 5700
#define MID_5G_SUB_BAND_START 5400

#define CAB_TIMEOUT_VAL 10
#define BEACON_TIMEOUT_VAL 10
Expand Down

0 comments on commit 2201257

Please sign in to comment.