]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/mwifiex/sta_cmdresp.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[karo-tx-linux.git] / drivers / net / wireless / mwifiex / sta_cmdresp.c
index 87b69d8ad120e0e3f51ffb7edfbf39ff6f1d6dbf..9ac7aa2431b41533ab68f8495693c36c41f40801 100644 (file)
@@ -1007,6 +1007,28 @@ static int mwifiex_ret_sdio_rx_aggr_cfg(struct mwifiex_private *priv,
        return 0;
 }
 
+static int mwifiex_ret_robust_coex(struct mwifiex_private *priv,
+                                  struct host_cmd_ds_command *resp,
+                                  bool *is_timeshare)
+{
+       struct host_cmd_ds_robust_coex *coex = &resp->params.coex;
+       struct mwifiex_ie_types_robust_coex *coex_tlv;
+       u16 action = le16_to_cpu(coex->action);
+       u32 mode;
+
+       coex_tlv = (struct mwifiex_ie_types_robust_coex
+                   *)((u8 *)coex + sizeof(struct host_cmd_ds_robust_coex));
+       if (action == HostCmd_ACT_GEN_GET) {
+               mode = le32_to_cpu(coex_tlv->mode);
+               if (mode == MWIFIEX_COEX_MODE_TIMESHARE)
+                       *is_timeshare = true;
+               else
+                       *is_timeshare = false;
+       }
+
+       return 0;
+}
+
 /*
  * This function handles the command responses.
  *
@@ -1128,6 +1150,17 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
                ret = mwifiex_ret_11n_addba_resp(priv, resp);
                break;
        case HostCmd_CMD_RECONFIGURE_TX_BUFF:
+               if (0xffff == (u16)le16_to_cpu(resp->params.tx_buf.buff_size)) {
+                       if (adapter->iface_type == MWIFIEX_USB &&
+                           adapter->usb_mc_setup) {
+                               if (adapter->if_ops.multi_port_resync)
+                                       adapter->if_ops.
+                                               multi_port_resync(adapter);
+                               adapter->usb_mc_setup = false;
+                               adapter->tx_lock_flag = false;
+                       }
+                       break;
+               }
                adapter->tx_buf_size = (u16) le16_to_cpu(resp->params.
                                                             tx_buf.buff_size);
                adapter->tx_buf_size = (adapter->tx_buf_size
@@ -1202,6 +1235,9 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
                break;
        case HostCmd_CMD_TDLS_CONFIG:
                break;
+       case HostCmd_CMD_ROBUST_COEX:
+               ret = mwifiex_ret_robust_coex(priv, resp, data_buf);
+               break;
        default:
                mwifiex_dbg(adapter, ERROR,
                            "CMD_RESP: unknown cmd response %#x\n",