diff options
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 4ee68f7d20f4..de38ec481f60 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2272,17 +2272,34 @@ struct mwl8k_cmd_set_edca_params { | |||
2272 | /* TX opportunity in units of 32 us */ | 2272 | /* TX opportunity in units of 32 us */ |
2273 | __le16 txop; | 2273 | __le16 txop; |
2274 | 2274 | ||
2275 | /* Log exponent of max contention period: 0...15*/ | 2275 | union { |
2276 | __u8 log_cw_max; | 2276 | struct { |
2277 | /* Log exponent of max contention period: 0...15 */ | ||
2278 | __le32 log_cw_max; | ||
2279 | |||
2280 | /* Log exponent of min contention period: 0...15 */ | ||
2281 | __le32 log_cw_min; | ||
2282 | |||
2283 | /* Adaptive interframe spacing in units of 32us */ | ||
2284 | __u8 aifs; | ||
2285 | |||
2286 | /* TX queue to configure */ | ||
2287 | __u8 txq; | ||
2288 | } ap; | ||
2289 | struct { | ||
2290 | /* Log exponent of max contention period: 0...15 */ | ||
2291 | __u8 log_cw_max; | ||
2277 | 2292 | ||
2278 | /* Log exponent of min contention period: 0...15 */ | 2293 | /* Log exponent of min contention period: 0...15 */ |
2279 | __u8 log_cw_min; | 2294 | __u8 log_cw_min; |
2280 | 2295 | ||
2281 | /* Adaptive interframe spacing in units of 32us */ | 2296 | /* Adaptive interframe spacing in units of 32us */ |
2282 | __u8 aifs; | 2297 | __u8 aifs; |
2283 | 2298 | ||
2284 | /* TX queue to configure */ | 2299 | /* TX queue to configure */ |
2285 | __u8 txq; | 2300 | __u8 txq; |
2301 | } sta; | ||
2302 | }; | ||
2286 | } __attribute__((packed)); | 2303 | } __attribute__((packed)); |
2287 | 2304 | ||
2288 | #define MWL8K_SET_EDCA_CW 0x01 | 2305 | #define MWL8K_SET_EDCA_CW 0x01 |
@@ -2298,6 +2315,7 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum, | |||
2298 | __u16 cw_min, __u16 cw_max, | 2315 | __u16 cw_min, __u16 cw_max, |
2299 | __u8 aifs, __u16 txop) | 2316 | __u8 aifs, __u16 txop) |
2300 | { | 2317 | { |
2318 | struct mwl8k_priv *priv = hw->priv; | ||
2301 | struct mwl8k_cmd_set_edca_params *cmd; | 2319 | struct mwl8k_cmd_set_edca_params *cmd; |
2302 | int rc; | 2320 | int rc; |
2303 | 2321 | ||
@@ -2315,10 +2333,17 @@ mwl8k_set_edca_params(struct ieee80211_hw *hw, __u8 qnum, | |||
2315 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); | 2333 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); |
2316 | cmd->action = cpu_to_le16(MWL8K_SET_EDCA_ALL); | 2334 | cmd->action = cpu_to_le16(MWL8K_SET_EDCA_ALL); |
2317 | cmd->txop = cpu_to_le16(txop); | 2335 | cmd->txop = cpu_to_le16(txop); |
2318 | cmd->log_cw_max = (u8)ilog2(cw_max + 1); | 2336 | if (priv->ap_fw) { |
2319 | cmd->log_cw_min = (u8)ilog2(cw_min + 1); | 2337 | cmd->ap.log_cw_max = cpu_to_le32(ilog2(cw_max + 1)); |
2320 | cmd->aifs = aifs; | 2338 | cmd->ap.log_cw_min = cpu_to_le32(ilog2(cw_min + 1)); |
2321 | cmd->txq = qnum; | 2339 | cmd->ap.aifs = aifs; |
2340 | cmd->ap.txq = qnum; | ||
2341 | } else { | ||
2342 | cmd->sta.log_cw_max = (u8)ilog2(cw_max + 1); | ||
2343 | cmd->sta.log_cw_min = (u8)ilog2(cw_min + 1); | ||
2344 | cmd->sta.aifs = aifs; | ||
2345 | cmd->sta.txq = qnum; | ||
2346 | } | ||
2322 | 2347 | ||
2323 | rc = mwl8k_post_cmd(hw, &cmd->header); | 2348 | rc = mwl8k_post_cmd(hw, &cmd->header); |
2324 | kfree(cmd); | 2349 | kfree(cmd); |