summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmdresp.c
diff options
context:
space:
mode:
authorMarc Yang <yangyang@marvell.com>2011-03-30 18:12:44 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-04-04 16:20:05 -0400
commit2b06bdbe073f8dff93eb476f07352df43dcdba44 (patch)
treef3aad8c0cc48faa49874028ea60ab0cefe9d7736 /drivers/net/wireless/mwifiex/sta_cmdresp.c
parent4dd365fd55991b4e54a1d1c255081e6370b9da29 (diff)
mwifiex: cleanup power save related struct and macros
remove redundant structures and unused macros Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_cmdresp.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmdresp.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c
index b220b8b62cf..74add45b99b 100644
--- a/drivers/net/wireless/mwifiex/sta_cmdresp.c
+++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c
@@ -46,6 +46,7 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
{
struct cmd_ctrl_node *cmd_node = NULL, *tmp_node = NULL;
struct mwifiex_adapter *adapter = priv->adapter;
+ struct host_cmd_ds_802_11_ps_mode_enh *pm;
unsigned long flags;
dev_err(adapter->dev, "CMD_RESP: cmd %#x error, result=%#x\n",
@@ -55,20 +56,16 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
switch (le16_to_cpu(resp->command)) {
case HostCmd_CMD_802_11_PS_MODE_ENH:
- {
- struct host_cmd_ds_802_11_ps_mode_enh *pm =
- &resp->params.psmode_enh;
- dev_err(adapter->dev, "PS_MODE_ENH cmd failed: "
- "result=0x%x action=0x%X\n",
+ pm = &resp->params.psmode_enh;
+ dev_err(adapter->dev, "PS_MODE_ENH cmd failed: "
+ "result=0x%x action=0x%X\n",
resp->result, le16_to_cpu(pm->action));
- /* We do not re-try enter-ps command in ad-hoc mode. */
- if (le16_to_cpu(pm->action) == EN_AUTO_PS &&
- (le16_to_cpu(pm->params.auto_ps.ps_bitmap) &
- BITMAP_STA_PS)
- && priv->bss_mode == NL80211_IFTYPE_ADHOC)
- adapter->ps_mode =
- MWIFIEX_802_11_POWER_MODE_CAM;
- }
+ /* We do not re-try enter-ps command in ad-hoc mode. */
+ if (le16_to_cpu(pm->action) == EN_AUTO_PS &&
+ (le16_to_cpu(pm->params.ps_bitmap) & BITMAP_STA_PS) &&
+ priv->bss_mode == NL80211_IFTYPE_ADHOC)
+ adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM;
+
break;
case HostCmd_CMD_802_11_SCAN:
/* Cancel all pending scan command */