Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150137
b: refs/heads/master
c: 083c468
h: refs/heads/master
i:
  150135: 20538a7
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed May 6, 2009
1 parent 3257996 commit 786d0ff
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16cf438a1eca2b7206bd7ac7763637c2a87c00c6
refs/heads/master: 083c4687bc3abc315c73830b9c74ad67e005d8c2
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath/ar9170/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ enum ar9170_cmd {
#define AR9170_MAC_REG_AC1_AC0_TXOP (AR9170_MAC_REG_BASE + 0xB44)
#define AR9170_MAC_REG_AC3_AC2_TXOP (AR9170_MAC_REG_BASE + 0xB48)

#define AR9170_MAC_REG_AMPDU_SET (AR9170_MAC_REG_BASE + 0xba0)

#define AR9170_MAC_REG_ACK_TABLE (AR9170_MAC_REG_BASE + 0xC00)
#define AR9170_MAC_REG_AMPDU_RX_THRESH (AR9170_MAC_REG_BASE + 0xC50)

Expand Down
23 changes: 23 additions & 0 deletions trunk/drivers/net/wireless/ath/ar9170/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,24 @@ int ar9170_set_qos(struct ar9170 *ar)
return ar9170_regwrite_result();
}

static int ar9170_set_ampdu_density(struct ar9170 *ar, u8 mpdudensity)
{
u32 val;

/* don't allow AMPDU density > 8us */
if (mpdudensity > 6)
return -EINVAL;

/* Watch out! Otus uses slightly different density values. */
val = 0x140a00 | (mpdudensity ? (mpdudensity + 1) : 0);

ar9170_regwrite_begin(ar);
ar9170_regwrite(AR9170_MAC_REG_AMPDU_SET, val);
ar9170_regwrite_finish();

return ar9170_regwrite_result();
}

int ar9170_init_mac(struct ar9170 *ar)
{
ar9170_regwrite_begin(ar);
Expand Down Expand Up @@ -296,6 +314,11 @@ int ar9170_set_operating_mode(struct ar9170 *ar)
if (err)
return err;

/* set AMPDU density to 8us. */
err = ar9170_set_ampdu_density(ar, 6);
if (err)
return err;

ar9170_regwrite_begin(ar);

ar9170_regwrite(AR9170_MAC_REG_POWERMANAGEMENT, pm_mode);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/ath/ar9170/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ static struct ieee80211_channel ar9170_5ghz_chantable[] = {
IEEE80211_HT_CAP_SGI_40 | \
IEEE80211_HT_CAP_DSSSCCK40 | \
IEEE80211_HT_CAP_SM_PS, \
.ampdu_factor = 3, /* ?? */ \
.ampdu_density = 7, /* ?? */ \
.ampdu_factor = 3, \
.ampdu_density = 6, \
.mcs = { \
.rx_mask = { 0xFF, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, }, \
}, \
Expand Down

0 comments on commit 786d0ff

Please sign in to comment.