aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmdresp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_cmdresp.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmdresp.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c
index a79ed9bd9695..bd40541ebd5a 100644
--- a/drivers/net/wireless/mwifiex/sta_cmdresp.c
+++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c
@@ -227,7 +227,7 @@ static int mwifiex_ret_get_log(struct mwifiex_private *priv,
227 struct mwifiex_ds_get_stats *stats) 227 struct mwifiex_ds_get_stats *stats)
228{ 228{
229 struct host_cmd_ds_802_11_get_log *get_log = 229 struct host_cmd_ds_802_11_get_log *get_log =
230 (struct host_cmd_ds_802_11_get_log *) &resp->params.get_log; 230 &resp->params.get_log;
231 231
232 if (stats) { 232 if (stats) {
233 stats->mcast_tx_frame = le32_to_cpu(get_log->mcast_tx_frame); 233 stats->mcast_tx_frame = le32_to_cpu(get_log->mcast_tx_frame);
@@ -282,7 +282,7 @@ static int mwifiex_ret_tx_rate_cfg(struct mwifiex_private *priv,
282 u32 i; 282 u32 i;
283 int ret = 0; 283 int ret = 0;
284 284
285 tlv_buf = (u8 *) ((u8 *) rate_cfg) + 285 tlv_buf = ((u8 *)rate_cfg) +
286 sizeof(struct host_cmd_ds_tx_rate_cfg); 286 sizeof(struct host_cmd_ds_tx_rate_cfg);
287 tlv_buf_len = *(u16 *) (tlv_buf + sizeof(u16)); 287 tlv_buf_len = *(u16 *) (tlv_buf + sizeof(u16));
288 288
@@ -679,39 +679,33 @@ static int mwifiex_ret_reg_access(u16 type, struct host_cmd_ds_command *resp,
679 eeprom = data_buf; 679 eeprom = data_buf;
680 switch (type) { 680 switch (type) {
681 case HostCmd_CMD_MAC_REG_ACCESS: 681 case HostCmd_CMD_MAC_REG_ACCESS:
682 r.mac = (struct host_cmd_ds_mac_reg_access *) 682 r.mac = &resp->params.mac_reg;
683 &resp->params.mac_reg;
684 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.mac->offset)); 683 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.mac->offset));
685 reg_rw->value = r.mac->value; 684 reg_rw->value = r.mac->value;
686 break; 685 break;
687 case HostCmd_CMD_BBP_REG_ACCESS: 686 case HostCmd_CMD_BBP_REG_ACCESS:
688 r.bbp = (struct host_cmd_ds_bbp_reg_access *) 687 r.bbp = &resp->params.bbp_reg;
689 &resp->params.bbp_reg;
690 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.bbp->offset)); 688 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.bbp->offset));
691 reg_rw->value = cpu_to_le32((u32) r.bbp->value); 689 reg_rw->value = cpu_to_le32((u32) r.bbp->value);
692 break; 690 break;
693 691
694 case HostCmd_CMD_RF_REG_ACCESS: 692 case HostCmd_CMD_RF_REG_ACCESS:
695 r.rf = (struct host_cmd_ds_rf_reg_access *) 693 r.rf = &resp->params.rf_reg;
696 &resp->params.rf_reg;
697 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.rf->offset)); 694 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.rf->offset));
698 reg_rw->value = cpu_to_le32((u32) r.bbp->value); 695 reg_rw->value = cpu_to_le32((u32) r.bbp->value);
699 break; 696 break;
700 case HostCmd_CMD_PMIC_REG_ACCESS: 697 case HostCmd_CMD_PMIC_REG_ACCESS:
701 r.pmic = (struct host_cmd_ds_pmic_reg_access *) 698 r.pmic = &resp->params.pmic_reg;
702 &resp->params.pmic_reg;
703 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.pmic->offset)); 699 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.pmic->offset));
704 reg_rw->value = cpu_to_le32((u32) r.pmic->value); 700 reg_rw->value = cpu_to_le32((u32) r.pmic->value);
705 break; 701 break;
706 case HostCmd_CMD_CAU_REG_ACCESS: 702 case HostCmd_CMD_CAU_REG_ACCESS:
707 r.rf = (struct host_cmd_ds_rf_reg_access *) 703 r.rf = &resp->params.rf_reg;
708 &resp->params.rf_reg;
709 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.rf->offset)); 704 reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.rf->offset));
710 reg_rw->value = cpu_to_le32((u32) r.rf->value); 705 reg_rw->value = cpu_to_le32((u32) r.rf->value);
711 break; 706 break;
712 case HostCmd_CMD_802_11_EEPROM_ACCESS: 707 case HostCmd_CMD_802_11_EEPROM_ACCESS:
713 r.eeprom = (struct host_cmd_ds_802_11_eeprom_access *) 708 r.eeprom = &resp->params.eeprom;
714 &resp->params.eeprom;
715 pr_debug("info: EEPROM read len=%x\n", r.eeprom->byte_count); 709 pr_debug("info: EEPROM read len=%x\n", r.eeprom->byte_count);
716 if (le16_to_cpu(eeprom->byte_count) < 710 if (le16_to_cpu(eeprom->byte_count) <
717 le16_to_cpu(r.eeprom->byte_count)) { 711 le16_to_cpu(r.eeprom->byte_count)) {
@@ -787,7 +781,7 @@ static int mwifiex_ret_subsc_evt(struct mwifiex_private *priv,
787 struct mwifiex_ds_misc_subsc_evt *sub_event) 781 struct mwifiex_ds_misc_subsc_evt *sub_event)
788{ 782{
789 struct host_cmd_ds_802_11_subsc_evt *cmd_sub_event = 783 struct host_cmd_ds_802_11_subsc_evt *cmd_sub_event =
790 (struct host_cmd_ds_802_11_subsc_evt *)&resp->params.subsc_evt; 784 &resp->params.subsc_evt;
791 785
792 /* For every subscribe event command (Get/Set/Clear), FW reports the 786 /* For every subscribe event command (Get/Set/Clear), FW reports the
793 * current set of subscribed events*/ 787 * current set of subscribed events*/