提交 2e484c89 编写于 作者: L Lennert Buytenhek 提交者: John W. Linville

mwl8k: implement AP firmware EDCA parameter configuration

Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 259a8e7d
...@@ -2272,17 +2272,34 @@ struct mwl8k_cmd_set_edca_params { ...@@ -2272,17 +2272,34 @@ struct mwl8k_cmd_set_edca_params {
/* TX opportunity in units of 32 us */ /* TX opportunity in units of 32 us */
__le16 txop; __le16 txop;
/* Log exponent of max contention period: 0...15*/ union {
__u8 log_cw_max; 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 */ /* Log exponent of min contention period: 0...15 */
__u8 log_cw_min; __u8 log_cw_min;
/* Adaptive interframe spacing in units of 32us */ /* Adaptive interframe spacing in units of 32us */
__u8 aifs; __u8 aifs;
/* TX queue to configure */ /* TX queue to configure */
__u8 txq; __u8 txq;
} sta;
};
} __attribute__((packed)); } __attribute__((packed));
#define MWL8K_SET_EDCA_CW 0x01 #define MWL8K_SET_EDCA_CW 0x01
...@@ -2298,6 +2315,7 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum, ...@@ -2298,6 +2315,7 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum,
__u16 cw_min, __u16 cw_max, __u16 cw_min, __u16 cw_max,
__u8 aifs, __u16 txop) __u8 aifs, __u16 txop)
{ {
struct mwl8k_priv *priv = hw->priv;
struct mwl8k_cmd_set_edca_params *cmd; struct mwl8k_cmd_set_edca_params *cmd;
int rc; int rc;
...@@ -2315,10 +2333,17 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum, ...@@ -2315,10 +2333,17 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum,
cmd->header.length = cpu_to_le16(sizeof(*cmd)); cmd->header.length = cpu_to_le16(sizeof(*cmd));
cmd->action = cpu_to_le16(MWL8K_SET_EDCA_ALL); cmd->action = cpu_to_le16(MWL8K_SET_EDCA_ALL);
cmd->txop = cpu_to_le16(txop); cmd->txop = cpu_to_le16(txop);
cmd->log_cw_max = (u8)ilog2(cw_max + 1); if (priv->ap_fw) {
cmd->log_cw_min = (u8)ilog2(cw_min + 1); cmd->ap.log_cw_max = cpu_to_le32(ilog2(cw_max + 1));
cmd->aifs = aifs; cmd->ap.log_cw_min = cpu_to_le32(ilog2(cw_min + 1));
cmd->txq = qnum; 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); rc = mwl8k_post_cmd(hw, &cmd->header);
kfree(cmd); kfree(cmd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册