Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111641
b: refs/heads/master
c: 3d35f7c
h: refs/heads/master
i:
  111639: 5201bbc
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 11, 2008
1 parent 41b9e7c commit 331509a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 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: ef422bc0ae934e6a46dfa63f0e27cad83b94234f
refs/heads/master: 3d35f7c6874d83063d19de0cdb4e503ff4471098
48 changes: 27 additions & 21 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,38 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da
}

/* MLME */
static void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_tx_queue_params qparam;
int i;

if (!local->ops->conf_tx)
return;

memset(&qparam, 0, sizeof(qparam));

qparam.aifs = 2;

if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ &&
!(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE))
qparam.cw_min = 31;
else
qparam.cw_min = 15;

qparam.cw_max = 1023;
qparam.txop = 0;

for (i = 0; i < local_to_hw(local)->queues; i++)
local->ops->conf_tx(local_to_hw(local), i, &qparam);
}

static void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta_bss *bss)
{
struct ieee80211_local *local = sdata->local;
int i, have_higher_than_11mbit = 0;


/* cf. IEEE 802.11 9.2.12 */
for (i = 0; i < bss->supp_rates_len; i++)
if ((bss->supp_rates[i] & 0x7f) * 5 > 110)
Expand All @@ -557,26 +582,7 @@ static void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
else
sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;


if (local->ops->conf_tx) {
struct ieee80211_tx_queue_params qparam;

memset(&qparam, 0, sizeof(qparam));

qparam.aifs = 2;

if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ &&
!(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE))
qparam.cw_min = 31;
else
qparam.cw_min = 15;

qparam.cw_max = 1023;
qparam.txop = 0;

for (i = 0; i < local_to_hw(local)->queues; i++)
local->ops->conf_tx(local_to_hw(local), i, &qparam);
}
ieee80211_set_wmm_default(sdata);
}

static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
Expand Down

0 comments on commit 331509a

Please sign in to comment.