Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171462
b: refs/heads/master
c: 2e484c8
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Nov 6, 2009
1 parent bdcd17b commit d4c36b6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 13 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: 259a8e7ddd55485b4a75ec39bc6716745c08fce0
refs/heads/master: 2e484c8964f7845d320eb1161c514dbfcafdda78
49 changes: 37 additions & 12 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -2272,17 +2272,34 @@ struct mwl8k_cmd_set_edca_params {
/* TX opportunity in units of 32 us */
__le16 txop;

/* Log exponent of max contention period: 0...15*/
__u8 log_cw_max;
union {
struct {
/* Log exponent of max contention period: 0...15 */
__le32 log_cw_max;

/* Log exponent of min contention period: 0...15 */
__le32 log_cw_min;

/* Adaptive interframe spacing in units of 32us */
__u8 aifs;

/* TX queue to configure */
__u8 txq;
} ap;
struct {
/* Log exponent of max contention period: 0...15 */
__u8 log_cw_max;

/* Log exponent of min contention period: 0...15 */
__u8 log_cw_min;
/* Log exponent of min contention period: 0...15 */
__u8 log_cw_min;

/* Adaptive interframe spacing in units of 32us */
__u8 aifs;
/* Adaptive interframe spacing in units of 32us */
__u8 aifs;

/* TX queue to configure */
__u8 txq;
/* TX queue to configure */
__u8 txq;
} sta;
};
} __attribute__((packed));

#define MWL8K_SET_EDCA_CW 0x01
Expand All @@ -2298,6 +2315,7 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum,
__u16 cw_min, __u16 cw_max,
__u8 aifs, __u16 txop)
{
struct mwl8k_priv *priv = hw->priv;
struct mwl8k_cmd_set_edca_params *cmd;
int rc;

Expand All @@ -2315,10 +2333,17 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum,
cmd->header.length = cpu_to_le16(sizeof(*cmd));
cmd->action = cpu_to_le16(MWL8K_SET_EDCA_ALL);
cmd->txop = cpu_to_le16(txop);
cmd->log_cw_max = (u8)ilog2(cw_max + 1);
cmd->log_cw_min = (u8)ilog2(cw_min + 1);
cmd->aifs = aifs;
cmd->txq = qnum;
if (priv->ap_fw) {
cmd->ap.log_cw_max = cpu_to_le32(ilog2(cw_max + 1));
cmd->ap.log_cw_min = cpu_to_le32(ilog2(cw_min + 1));
cmd->ap.aifs = aifs;
cmd->ap.txq = qnum;
} else {
cmd->sta.log_cw_max = (u8)ilog2(cw_max + 1);
cmd->sta.log_cw_min = (u8)ilog2(cw_min + 1);
cmd->sta.aifs = aifs;
cmd->sta.txq = qnum;
}

rc = mwl8k_post_cmd(hw, &cmd->header);
kfree(cmd);
Expand Down

0 comments on commit d4c36b6

Please sign in to comment.