Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134834
b: refs/heads/master
c: e421c7b
h: refs/heads/master
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Feb 27, 2009
1 parent f486a8a commit 6e4457c
Show file tree
Hide file tree
Showing 3 changed files with 19 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: 469002983fc90c2ff0959e2b03335c0fe2e4d5a9
refs/heads/master: e421c7b35c17752dbe6d26d910eb2d6814073355
15 changes: 15 additions & 0 deletions trunk/drivers/net/wireless/ath9k/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -2615,6 +2615,21 @@ static int ath9k_hw_def_set_txpower(struct ath_hw *ah,
else
ah->regulatory.max_power_level = ratesArray[i];

switch(ar5416_get_ntxchains(ah->txchainmask)) {
case 1:
break;
case 2:
ah->regulatory.max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
break;
case 3:
ah->regulatory.max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
break;
default:
DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
"Invalid chainmask configuration\n");
break;
}

return 0;
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ath9k/eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
#define SUB_NUM_CTL_MODES_AT_5G_40 2
#define SUB_NUM_CTL_MODES_AT_2G_40 3

#define INCREASE_MAXPOW_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */
#define INCREASE_MAXPOW_BY_THREE_CHAIN 10 /* 10*log10(3)*2 */

#define AR_EEPROM_MAC(i) (0x1d+(i))
#define ATH9K_POW_SM(_r, _s) (((_r) & 0x3f) << (_s))
#define FREQ2FBIN(x, y) ((y) ? ((x) - 2300) : (((x) - 4800) / 5))
Expand Down

0 comments on commit 6e4457c

Please sign in to comment.