Commit 68ce3884 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by John W. Linville

mwl8k: remove MWL8K_RADIO_*_PREAMBLE defines

Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c46563b7
...@@ -187,9 +187,7 @@ struct mwl8k_priv { ...@@ -187,9 +187,7 @@ struct mwl8k_priv {
struct ieee80211_rate rates[12]; struct ieee80211_rate rates[12];
bool radio_on; bool radio_on;
bool radio_short_preamble;
/* RF preamble: Short, Long or Auto */
u8 radio_preamble;
/* WMM MODE 1 for enabled; 0 for disabled */ /* WMM MODE 1 for enabled; 0 for disabled */
bool wmm_mode; bool wmm_mode;
...@@ -278,17 +276,10 @@ static const struct ieee80211_rate mwl8k_rates[] = { ...@@ -278,17 +276,10 @@ static const struct ieee80211_rate mwl8k_rates[] = {
{ .bitrate = 540, .hw_value = 108, }, { .bitrate = 540, .hw_value = 108, },
}; };
/* Radio settings */
#define MWL8K_RADIO_AUTO_PREAMBLE 0x0005
#define MWL8K_RADIO_SHORT_PREAMBLE 0x0003
#define MWL8K_RADIO_LONG_PREAMBLE 0x0001
/* WMM */ /* WMM */
#define MWL8K_WMM_ENABLE 1 #define MWL8K_WMM_ENABLE 1
#define MWL8K_WMM_DISABLE 0 #define MWL8K_WMM_DISABLE 0
#define MWL8K_RADIO_DEFAULT_PREAMBLE MWL8K_RADIO_LONG_PREAMBLE
/* Slot time */ /* Slot time */
/* Short Slot: 9us slot time */ /* Short Slot: 9us slot time */
...@@ -1741,7 +1732,7 @@ mwl8k_cmd_802_11_radio_control(struct ieee80211_hw *hw, bool enable, bool force) ...@@ -1741,7 +1732,7 @@ mwl8k_cmd_802_11_radio_control(struct ieee80211_hw *hw, bool enable, bool force)
cmd->header.code = cpu_to_le16(MWL8K_CMD_RADIO_CONTROL); cmd->header.code = cpu_to_le16(MWL8K_CMD_RADIO_CONTROL);
cmd->header.length = cpu_to_le16(sizeof(*cmd)); cmd->header.length = cpu_to_le16(sizeof(*cmd));
cmd->action = cpu_to_le16(MWL8K_CMD_SET); cmd->action = cpu_to_le16(MWL8K_CMD_SET);
cmd->control = cpu_to_le16(priv->radio_preamble); cmd->control = cpu_to_le16(priv->radio_short_preamble ? 3 : 1);
cmd->radio_on = cpu_to_le16(enable ? 0x0001 : 0x0000); cmd->radio_on = cpu_to_le16(enable ? 0x0001 : 0x0000);
rc = mwl8k_post_cmd(hw, &cmd->header); rc = mwl8k_post_cmd(hw, &cmd->header);
...@@ -1772,9 +1763,7 @@ mwl8k_set_radio_preamble(struct ieee80211_hw *hw, bool short_preamble) ...@@ -1772,9 +1763,7 @@ mwl8k_set_radio_preamble(struct ieee80211_hw *hw, bool short_preamble)
return -EINVAL; return -EINVAL;
priv = hw->priv; priv = hw->priv;
priv->radio_preamble = (short_preamble ? priv->radio_short_preamble = short_preamble;
MWL8K_RADIO_SHORT_PREAMBLE :
MWL8K_RADIO_LONG_PREAMBLE);
return mwl8k_cmd_802_11_radio_control(hw, 1, 1); return mwl8k_cmd_802_11_radio_control(hw, 1, 1);
} }
...@@ -3051,8 +3040,7 @@ static int mwl8k_bss_info_changed_wt(struct work_struct *wt) ...@@ -3051,8 +3040,7 @@ static int mwl8k_bss_info_changed_wt(struct work_struct *wt)
goto mwl8k_bss_info_changed_exit; goto mwl8k_bss_info_changed_exit;
/* Set radio preamble */ /* Set radio preamble */
if (mwl8k_set_radio_preamble(hw, if (mwl8k_set_radio_preamble(hw, info->use_short_preamble))
info->use_short_preamble))
goto mwl8k_bss_info_changed_exit; goto mwl8k_bss_info_changed_exit;
/* Set slot time */ /* Set slot time */
...@@ -3504,8 +3492,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -3504,8 +3492,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
priv->vif = NULL; priv->vif = NULL;
/* Set default radio state and preamble */ /* Set default radio state and preamble */
priv->radio_preamble = MWL8K_RADIO_DEFAULT_PREAMBLE;
priv->radio_on = 0; priv->radio_on = 0;
priv->radio_short_preamble = 0;
/* Finalize join worker */ /* Finalize join worker */
INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker); INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment