diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-07-16 06:26:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:38:04 -0400 |
commit | 68ce38845c23443b15e374fb7362916c1231278e (patch) | |
tree | 9b3fa8d5183f26df9bbc9bf66402e4b7f1e21be0 /drivers | |
parent | c46563b714b09d44eec4d1fd8a0f53e79ddaa3aa (diff) |
mwl8k: remove MWL8K_RADIO_*_PREAMBLE defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 78183c8b5f0d..22500bf59d10 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -187,9 +187,7 @@ struct mwl8k_priv { | |||
187 | struct ieee80211_rate rates[12]; | 187 | struct ieee80211_rate rates[12]; |
188 | 188 | ||
189 | bool radio_on; | 189 | bool radio_on; |
190 | 190 | bool radio_short_preamble; | |
191 | /* RF preamble: Short, Long or Auto */ | ||
192 | u8 radio_preamble; | ||
193 | 191 | ||
194 | /* WMM MODE 1 for enabled; 0 for disabled */ | 192 | /* WMM MODE 1 for enabled; 0 for disabled */ |
195 | bool wmm_mode; | 193 | bool wmm_mode; |
@@ -278,17 +276,10 @@ static const struct ieee80211_rate mwl8k_rates[] = { | |||
278 | { .bitrate = 540, .hw_value = 108, }, | 276 | { .bitrate = 540, .hw_value = 108, }, |
279 | }; | 277 | }; |
280 | 278 | ||
281 | /* Radio settings */ | ||
282 | #define MWL8K_RADIO_AUTO_PREAMBLE 0x0005 | ||
283 | #define MWL8K_RADIO_SHORT_PREAMBLE 0x0003 | ||
284 | #define MWL8K_RADIO_LONG_PREAMBLE 0x0001 | ||
285 | |||
286 | /* WMM */ | 279 | /* WMM */ |
287 | #define MWL8K_WMM_ENABLE 1 | 280 | #define MWL8K_WMM_ENABLE 1 |
288 | #define MWL8K_WMM_DISABLE 0 | 281 | #define MWL8K_WMM_DISABLE 0 |
289 | 282 | ||
290 | #define MWL8K_RADIO_DEFAULT_PREAMBLE MWL8K_RADIO_LONG_PREAMBLE | ||
291 | |||
292 | /* Slot time */ | 283 | /* Slot time */ |
293 | 284 | ||
294 | /* Short Slot: 9us slot time */ | 285 | /* Short Slot: 9us slot time */ |
@@ -1741,7 +1732,7 @@ mwl8k_cmd_802_11_radio_control(struct ieee80211_hw *hw, bool enable, bool force) | |||
1741 | cmd->header.code = cpu_to_le16(MWL8K_CMD_RADIO_CONTROL); | 1732 | cmd->header.code = cpu_to_le16(MWL8K_CMD_RADIO_CONTROL); |
1742 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); | 1733 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); |
1743 | cmd->action = cpu_to_le16(MWL8K_CMD_SET); | 1734 | cmd->action = cpu_to_le16(MWL8K_CMD_SET); |
1744 | cmd->control = cpu_to_le16(priv->radio_preamble); | 1735 | cmd->control = cpu_to_le16(priv->radio_short_preamble ? 3 : 1); |
1745 | cmd->radio_on = cpu_to_le16(enable ? 0x0001 : 0x0000); | 1736 | cmd->radio_on = cpu_to_le16(enable ? 0x0001 : 0x0000); |
1746 | 1737 | ||
1747 | rc = mwl8k_post_cmd(hw, &cmd->header); | 1738 | rc = mwl8k_post_cmd(hw, &cmd->header); |
@@ -1772,9 +1763,7 @@ mwl8k_set_radio_preamble(struct ieee80211_hw *hw, bool short_preamble) | |||
1772 | return -EINVAL; | 1763 | return -EINVAL; |
1773 | priv = hw->priv; | 1764 | priv = hw->priv; |
1774 | 1765 | ||
1775 | priv->radio_preamble = (short_preamble ? | 1766 | priv->radio_short_preamble = short_preamble; |
1776 | MWL8K_RADIO_SHORT_PREAMBLE : | ||
1777 | MWL8K_RADIO_LONG_PREAMBLE); | ||
1778 | 1767 | ||
1779 | return mwl8k_cmd_802_11_radio_control(hw, 1, 1); | 1768 | return mwl8k_cmd_802_11_radio_control(hw, 1, 1); |
1780 | } | 1769 | } |
@@ -3051,8 +3040,7 @@ static int mwl8k_bss_info_changed_wt(struct work_struct *wt) | |||
3051 | goto mwl8k_bss_info_changed_exit; | 3040 | goto mwl8k_bss_info_changed_exit; |
3052 | 3041 | ||
3053 | /* Set radio preamble */ | 3042 | /* Set radio preamble */ |
3054 | if (mwl8k_set_radio_preamble(hw, | 3043 | if (mwl8k_set_radio_preamble(hw, info->use_short_preamble)) |
3055 | info->use_short_preamble)) | ||
3056 | goto mwl8k_bss_info_changed_exit; | 3044 | goto mwl8k_bss_info_changed_exit; |
3057 | 3045 | ||
3058 | /* Set slot time */ | 3046 | /* Set slot time */ |
@@ -3504,8 +3492,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, | |||
3504 | priv->vif = NULL; | 3492 | priv->vif = NULL; |
3505 | 3493 | ||
3506 | /* Set default radio state and preamble */ | 3494 | /* Set default radio state and preamble */ |
3507 | priv->radio_preamble = MWL8K_RADIO_DEFAULT_PREAMBLE; | ||
3508 | priv->radio_on = 0; | 3495 | priv->radio_on = 0; |
3496 | priv->radio_short_preamble = 0; | ||
3509 | 3497 | ||
3510 | /* Finalize join worker */ | 3498 | /* Finalize join worker */ |
3511 | INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker); | 3499 | INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker); |