aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-07-16 06:34:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 11:38:05 -0400
commit0439b1f55646ea944b0d58337f5065b79a1c1be0 (patch)
tree3b9b5021c1979fa8366be126d882f9b99796ba1c
parent68ce38845c23443b15e374fb7362916c1231278e (diff)
mwl8k: remove MWL8K_WMM_* defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwl8k.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 22500bf59d10..33d7ab517b33 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -188,9 +188,7 @@ struct mwl8k_priv {
188 188
189 bool radio_on; 189 bool radio_on;
190 bool radio_short_preamble; 190 bool radio_short_preamble;
191 191 bool wmm_enabled;
192 /* WMM MODE 1 for enabled; 0 for disabled */
193 bool wmm_mode;
194 192
195 /* Set if PHY config is in progress */ 193 /* Set if PHY config is in progress */
196 bool inconfig; 194 bool inconfig;
@@ -276,10 +274,6 @@ static const struct ieee80211_rate mwl8k_rates[] = {
276 { .bitrate = 540, .hw_value = 108, }, 274 { .bitrate = 540, .hw_value = 108, },
277}; 275};
278 276
279/* WMM */
280#define MWL8K_WMM_ENABLE 1
281#define MWL8K_WMM_DISABLE 0
282
283/* Slot time */ 277/* Slot time */
284 278
285/* Short Slot: 9us slot time */ 279/* Short Slot: 9us slot time */
@@ -2028,13 +2022,13 @@ static int mwl8k_set_wmm(struct ieee80211_hw *hw, bool enable)
2028 2022
2029 cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_WMM_MODE); 2023 cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_WMM_MODE);
2030 cmd->header.length = cpu_to_le16(sizeof(*cmd)); 2024 cmd->header.length = cpu_to_le16(sizeof(*cmd));
2031 cmd->action = enable ? cpu_to_le16(MWL8K_CMD_SET) : 0; 2025 cmd->action = cpu_to_le16(!!enable);
2032 2026
2033 rc = mwl8k_post_cmd(hw, &cmd->header); 2027 rc = mwl8k_post_cmd(hw, &cmd->header);
2034 kfree(cmd); 2028 kfree(cmd);
2035 2029
2036 if (!rc) 2030 if (!rc)
2037 priv->wmm_mode = enable; 2031 priv->wmm_enabled = enable;
2038 2032
2039 return rc; 2033 return rc;
2040} 2034}
@@ -2762,7 +2756,7 @@ static int mwl8k_start_wt(struct work_struct *wt)
2762 } 2756 }
2763 2757
2764 /* Disable WMM. WMM gets enabled when stack sends WMM parms */ 2758 /* Disable WMM. WMM gets enabled when stack sends WMM parms */
2765 if (mwl8k_set_wmm(hw, MWL8K_WMM_DISABLE)) { 2759 if (mwl8k_set_wmm(hw, 0)) {
2766 rc = -EIO; 2760 rc = -EIO;
2767 goto mwl8k_start_exit; 2761 goto mwl8k_start_exit;
2768 } 2762 }
@@ -3272,10 +3266,11 @@ static int mwl8k_conf_tx_wt(struct work_struct *wt)
3272 struct mwl8k_priv *priv = hw->priv; 3266 struct mwl8k_priv *priv = hw->priv;
3273 int rc = 0; 3267 int rc = 0;
3274 3268
3275 if (priv->wmm_mode == MWL8K_WMM_DISABLE) 3269 if (!priv->wmm_enabled) {
3276 if (mwl8k_set_wmm(hw, MWL8K_WMM_ENABLE)) { 3270 if (mwl8k_set_wmm(hw, 1)) {
3277 rc = -EINVAL; 3271 rc = -EINVAL;
3278 goto mwl8k_conf_tx_exit; 3272 goto mwl8k_conf_tx_exit;
3273 }
3279 } 3274 }
3280 3275
3281 if (mwl8k_set_edca_params(hw, GET_TXQ(queue), params->cw_min, 3276 if (mwl8k_set_edca_params(hw, GET_TXQ(queue), params->cw_min,
@@ -3446,7 +3441,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
3446 priv->hostcmd_wait = NULL; 3441 priv->hostcmd_wait = NULL;
3447 priv->tx_wait = NULL; 3442 priv->tx_wait = NULL;
3448 priv->inconfig = false; 3443 priv->inconfig = false;
3449 priv->wmm_mode = false; 3444 priv->wmm_enabled = false;
3450 priv->pending_tx_pkts = 0; 3445 priv->pending_tx_pkts = 0;
3451 strncpy(priv->name, MWL8K_NAME, sizeof(priv->name)); 3446 strncpy(priv->name, MWL8K_NAME, sizeof(priv->name));
3452 3447