Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183663
b: refs/heads/master
c: e239d85
h: refs/heads/master
i:
  183661: 0c8e3ed
  183659: dce7a55
  183655: b21ce5a
  183647: 35b7023
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jan 15, 2010
1 parent 82e7190 commit 0b4b6b0
Show file tree
Hide file tree
Showing 4 changed files with 20 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: 0005baf4a31efe6de6f922f73ccbd3762a110062
refs/heads/master: e239d8591843945630521ec85edca08289f1a751
7 changes: 5 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
{
struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
int acktimeout;
int slottime;
int sifstime;

ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n",
Expand All @@ -1209,8 +1210,10 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
else
sifstime = 10;

acktimeout = ah->slottime + sifstime;
ath9k_hw_setslottime(ah, ah->slottime);
/* As defined by IEEE 802.11-2007 17.3.8.6 */
slottime = ah->slottime + 3 * ah->coverage_class;
acktimeout = slottime + sifstime;
ath9k_hw_setslottime(ah, slottime);
ath9k_hw_set_ack_timeout(ah, acktimeout);
ath9k_hw_set_cts_timeout(ah, acktimeout);
if (ah->globaltxtimeout != (u32) -1)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ struct ath_hw {
u32 *bank6Temp;

int16_t txpower_indexoffset;
int coverage_class;
u32 beacon_interval;
u32 slottime;
u32 globaltxtimeout;
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,18 @@ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
mutex_unlock(&sc->mutex);
}

static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class)
{
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_hw *ah = sc->sc_ah;

mutex_lock(&sc->mutex);
ah->coverage_class = coverage_class;
ath9k_hw_init_global_settings(ah);
mutex_unlock(&sc->mutex);
}

struct ieee80211_ops ath9k_ops = {
.tx = ath9k_tx,
.start = ath9k_start,
Expand All @@ -2033,4 +2045,5 @@ struct ieee80211_ops ath9k_ops = {
.sw_scan_start = ath9k_sw_scan_start,
.sw_scan_complete = ath9k_sw_scan_complete,
.rfkill_poll = ath9k_rfkill_poll_state,
.set_coverage_class = ath9k_set_coverage_class,
};

0 comments on commit 0b4b6b0

Please sign in to comment.