aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmd.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-06-29 12:42:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-29 12:42:14 -0400
commit8732baafc3f19e69df683c3f0f36c13cec746fb9 (patch)
tree9059d0fe8f2a49425edab88ea8e7d5337e13e66c /drivers/net/wireless/mwifiex/sta_cmd.c
parent7a9bc9b81a5bc6e44ebc80ef781332e4385083f2 (diff)
parent42fb0b0278e6b9a44bee8adec051de5f43e10b2b (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_cmd.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmd.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index 1ff1362d8cdf..b9cd9ed48c45 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -260,6 +260,23 @@ static int mwifiex_cmd_tx_power_cfg(struct host_cmd_ds_command *cmd,
260} 260}
261 261
262/* 262/*
263 * This function prepares command to get RF Tx power.
264 */
265static int mwifiex_cmd_rf_tx_power(struct mwifiex_private *priv,
266 struct host_cmd_ds_command *cmd,
267 u16 cmd_action, void *data_buf)
268{
269 struct host_cmd_ds_rf_tx_pwr *txp = &cmd->params.txp;
270
271 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_rf_tx_pwr)
272 + S_DS_GEN);
273 cmd->command = cpu_to_le16(HostCmd_CMD_RF_TX_PWR);
274 txp->action = cpu_to_le16(cmd_action);
275
276 return 0;
277}
278
279/*
263 * This function prepares command to set Host Sleep configuration. 280 * This function prepares command to set Host Sleep configuration.
264 * 281 *
265 * Preparation includes - 282 * Preparation includes -
@@ -1049,6 +1066,10 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
1049 ret = mwifiex_cmd_tx_power_cfg(cmd_ptr, cmd_action, 1066 ret = mwifiex_cmd_tx_power_cfg(cmd_ptr, cmd_action,
1050 data_buf); 1067 data_buf);
1051 break; 1068 break;
1069 case HostCmd_CMD_RF_TX_PWR:
1070 ret = mwifiex_cmd_rf_tx_power(priv, cmd_ptr, cmd_action,
1071 data_buf);
1072 break;
1052 case HostCmd_CMD_802_11_PS_MODE_ENH: 1073 case HostCmd_CMD_802_11_PS_MODE_ENH:
1053 ret = mwifiex_cmd_enh_power_mode(priv, cmd_ptr, cmd_action, 1074 ret = mwifiex_cmd_enh_power_mode(priv, cmd_ptr, cmd_action,
1054 (uint16_t)cmd_oid, data_buf); 1075 (uint16_t)cmd_oid, data_buf);
@@ -1277,7 +1298,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta)
1277 priv->data_rate = 0; 1298 priv->data_rate = 0;
1278 1299
1279 /* get tx power */ 1300 /* get tx power */
1280 ret = mwifiex_send_cmd_async(priv, HostCmd_CMD_TXPWR_CFG, 1301 ret = mwifiex_send_cmd_async(priv, HostCmd_CMD_RF_TX_PWR,
1281 HostCmd_ACT_GEN_GET, 0, NULL); 1302 HostCmd_ACT_GEN_GET, 0, NULL);
1282 if (ret) 1303 if (ret)
1283 return -1; 1304 return -1;