Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
struct ieee80211_rate rates[12];
bool radio_on;
struct ieee80211_rate rates[12];
bool radio_on;
-
- /* RF preamble: Short, Long or Auto */
- u8 radio_preamble;
+ bool radio_short_preamble;
/* WMM MODE 1 for enabled; 0 for disabled */
bool wmm_mode;
/* WMM MODE 1 for enabled; 0 for disabled */
bool wmm_mode;
{ .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 */
#define MWL8K_WMM_ENABLE 1
#define MWL8K_WMM_DISABLE 0
/* WMM */
#define MWL8K_WMM_ENABLE 1
#define MWL8K_WMM_DISABLE 0
-#define MWL8K_RADIO_DEFAULT_PREAMBLE MWL8K_RADIO_LONG_PREAMBLE
-
/* Slot time */
/* Short Slot: 9us slot time */
/* Slot time */
/* Short Slot: 9us slot time */
cmd->header.code = cpu_to_le16(MWL8K_CMD_RADIO_CONTROL);
cmd->header.length = cpu_to_le16(sizeof(*cmd));
cmd->action = cpu_to_le16(MWL8K_CMD_SET);
cmd->header.code = cpu_to_le16(MWL8K_CMD_RADIO_CONTROL);
cmd->header.length = cpu_to_le16(sizeof(*cmd));
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);
rc = mwl8k_post_cmd(hw, &cmd->header);
cmd->radio_on = cpu_to_le16(enable ? 0x0001 : 0x0000);
rc = mwl8k_post_cmd(hw, &cmd->header);
return -EINVAL;
priv = hw->priv;
return -EINVAL;
priv = hw->priv;
- priv->radio_preamble = (short_preamble ?
- MWL8K_RADIO_SHORT_PREAMBLE :
- MWL8K_RADIO_LONG_PREAMBLE);
+ priv->radio_short_preamble = short_preamble;
return mwl8k_cmd_802_11_radio_control(hw, 1, 1);
}
return mwl8k_cmd_802_11_radio_control(hw, 1, 1);
}
goto mwl8k_bss_info_changed_exit;
/* Set radio preamble */
goto mwl8k_bss_info_changed_exit;
/* Set radio preamble */
- if (mwl8k_set_radio_preamble(hw,
- info->use_short_preamble))
+ if (mwl8k_set_radio_preamble(hw, info->use_short_preamble))
goto mwl8k_bss_info_changed_exit;
/* Set slot time */
goto mwl8k_bss_info_changed_exit;
/* Set slot time */
priv->vif = NULL;
/* Set default radio state and preamble */
priv->vif = NULL;
/* Set default radio state and preamble */
- priv->radio_preamble = MWL8K_RADIO_DEFAULT_PREAMBLE;
+ priv->radio_short_preamble = 0;
/* Finalize join worker */
INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker);
/* Finalize join worker */
INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker);