Advertisement
Guest User

120-chadster_fix.patch

a guest
Feb 1st, 2016
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 40.85 KB | None | 0 0
  1. Index: mwlwifi-10.3.0.16-20160105/dev.h
  2. ===================================================================
  3. --- mwlwifi-10.3.0.16-20160105.orig/dev.h
  4. +++ mwlwifi-10.3.0.16-20160105/dev.h
  5. @@ -18,6 +18,7 @@
  6.  #ifndef _DEV_H_
  7.  #define _DEV_H_
  8.  
  9. +
  10.  #include <linux/version.h>
  11.  #include <linux/interrupt.h>
  12.  #include <linux/pci.h>
  13. @@ -301,7 +302,7 @@ struct mwl_priv {
  14.     void __iomem *iobase1; /* MEM Base Address Register 1  */
  15.     u32 next_bar_num;
  16.  
  17. -   struct mutex fwcmd_mutex;    /* for firmware command         */
  18. +   spinlock_t fwcmd_lock;       /* for firmware command         */
  19.     unsigned short *pcmd_buf;    /* pointer to CmdBuf (virtual)  */
  20.     dma_addr_t pphys_cmd_buf;    /* pointer to CmdBuf (physical) */
  21.     bool in_send_cmd;
  22. Index: mwlwifi-10.3.0.16-20160105/fwcmd.c
  23. ===================================================================
  24. --- mwlwifi-10.3.0.16-20160105.orig/fwcmd.c
  25. +++ mwlwifi-10.3.0.16-20160105/fwcmd.c
  26. @@ -152,8 +152,6 @@ static int mwl_fwcmd_exec_cmd(struct mwl
  27.  {
  28.     bool busy = false;
  29.  
  30. -   might_sleep();
  31. -
  32.     if (!mwl_fwcmd_chk_adapter(priv)) {
  33.         wiphy_err(priv->hw->wiphy, "adapter does not exist\n");
  34.         priv->in_send_cmd = false;
  35. @@ -190,7 +188,7 @@ static int mwl_fwcmd_802_11_radio_contro
  36.  
  37.     pcmd = (struct hostcmd_cmd_802_11_radio_control *)&priv->pcmd_buf[0];
  38.  
  39. -   mutex_lock(&priv->fwcmd_mutex);
  40. +   spin_lock_bh(&priv->fwcmd_lock);
  41.  
  42.     memset(pcmd, 0x00, sizeof(*pcmd));
  43.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_802_11_RADIO_CONTROL);
  44. @@ -201,14 +199,14 @@ static int mwl_fwcmd_802_11_radio_contro
  45.     pcmd->radio_on = cpu_to_le16(enable ? WL_ENABLE : WL_DISABLE);
  46.  
  47.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_802_11_RADIO_CONTROL)) {
  48. -       mutex_unlock(&priv->fwcmd_mutex);
  49. +       spin_unlock_bh(&priv->fwcmd_lock);
  50.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  51.         return -EIO;
  52.     }
  53.  
  54.     priv->radio_on = enable;
  55.  
  56. -   mutex_unlock(&priv->fwcmd_mutex);
  57. +   spin_unlock_bh(&priv->fwcmd_lock);
  58.  
  59.     return 0;
  60.  }
  61. @@ -221,7 +219,7 @@ static int mwl_fwcmd_get_tx_powers(struc
  62.  
  63.     pcmd = (struct hostcmd_cmd_802_11_tx_power *)&priv->pcmd_buf[0];
  64.  
  65. -   mutex_lock(&priv->fwcmd_mutex);
  66. +   spin_lock_bh(&priv->fwcmd_lock);
  67.  
  68.     memset(pcmd, 0x00, sizeof(*pcmd));
  69.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_802_11_TX_POWER);
  70. @@ -233,7 +231,7 @@ static int mwl_fwcmd_get_tx_powers(struc
  71.     pcmd->sub_ch = cpu_to_le16(sub_ch);
  72.  
  73.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_802_11_TX_POWER)) {
  74. -       mutex_unlock(&priv->fwcmd_mutex);
  75. +       spin_unlock_bh(&priv->fwcmd_lock);
  76.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  77.         return -EIO;
  78.     }
  79. @@ -241,7 +239,7 @@ static int mwl_fwcmd_get_tx_powers(struc
  80.     for (i = 0; i < SYSADPT_TX_POWER_LEVEL_TOTAL; i++)
  81.         powlist[i] = le16_to_cpu(pcmd->power_level_list[i]);
  82.  
  83. -   mutex_unlock(&priv->fwcmd_mutex);
  84. +   spin_unlock_bh(&priv->fwcmd_lock);
  85.  
  86.     return 0;
  87.  }
  88. @@ -255,7 +253,7 @@ static int mwl_fwcmd_set_tx_powers(struc
  89.  
  90.     pcmd = (struct hostcmd_cmd_802_11_tx_power *)&priv->pcmd_buf[0];
  91.  
  92. -   mutex_lock(&priv->fwcmd_mutex);
  93. +   spin_lock_bh(&priv->fwcmd_lock);
  94.  
  95.     memset(pcmd, 0x00, sizeof(*pcmd));
  96.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_802_11_TX_POWER);
  97. @@ -270,12 +268,12 @@ static int mwl_fwcmd_set_tx_powers(struc
  98.         pcmd->power_level_list[i] = cpu_to_le16(txpow[i]);
  99.  
  100.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_802_11_TX_POWER)) {
  101. -       mutex_unlock(&priv->fwcmd_mutex);
  102. +       spin_unlock_bh(&priv->fwcmd_lock);
  103.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  104.         return -EIO;
  105.     }
  106.  
  107. -   mutex_unlock(&priv->fwcmd_mutex);
  108. +   spin_unlock_bh(&priv->fwcmd_lock);
  109.  
  110.     return 0;
  111.  }
  112. @@ -542,7 +540,7 @@ static int mwl_fwcmd_set_ies(struct mwl_
  113.  
  114.     pcmd = (struct hostcmd_cmd_set_ies *)&priv->pcmd_buf[0];
  115.  
  116. -   mutex_lock(&priv->fwcmd_mutex);
  117. +   spin_lock_bh(&priv->fwcmd_lock);
  118.  
  119.     memset(pcmd, 0x00, sizeof(*pcmd));
  120.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_IES);
  121. @@ -578,12 +576,12 @@ static int mwl_fwcmd_set_ies(struct mwl_
  122.     pcmd->ie_list_len_proprietary = cpu_to_le16(ie_list_len_proprietary);
  123.  
  124.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_IES)) {
  125. -       mutex_unlock(&priv->fwcmd_mutex);
  126. +       spin_unlock_bh(&priv->fwcmd_lock);
  127.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  128.         return -EIO;
  129.     }
  130.  
  131. -   mutex_unlock(&priv->fwcmd_mutex);
  132. +   spin_unlock_bh(&priv->fwcmd_lock);
  133.  
  134.     return 0;
  135.  
  136. @@ -618,7 +616,7 @@ static int mwl_fwcmd_set_ap_beacon(struc
  137.  
  138.     pcmd = (struct hostcmd_cmd_ap_beacon *)&priv->pcmd_buf[0];
  139.  
  140. -   mutex_lock(&priv->fwcmd_mutex);
  141. +   spin_lock_bh(&priv->fwcmd_lock);
  142.  
  143.     memset(pcmd, 0x00, sizeof(*pcmd));
  144.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_AP_BEACON);
  145. @@ -655,12 +653,12 @@ static int mwl_fwcmd_set_ap_beacon(struc
  146.            SYSADPT_MAX_DATA_RATES_G);
  147.  
  148.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_AP_BEACON)) {
  149. -       mutex_unlock(&priv->fwcmd_mutex);
  150. +       spin_unlock_bh(&priv->fwcmd_lock);
  151.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  152.         return -EIO;
  153.     }
  154.  
  155. -   mutex_unlock(&priv->fwcmd_mutex);
  156. +   spin_unlock_bh(&priv->fwcmd_lock);
  157.  
  158.     return 0;
  159.  
  160. @@ -677,7 +675,7 @@ static int mwl_fwcmd_set_spectrum_mgmt(s
  161.  
  162.     pcmd = (struct hostcmd_cmd_set_spectrum_mgmt *)&priv->pcmd_buf[0];
  163.  
  164. -   mutex_lock(&priv->fwcmd_mutex);
  165. +   spin_lock_bh(&priv->fwcmd_lock);
  166.  
  167.     memset(pcmd, 0x00, sizeof(*pcmd));
  168.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_SPECTRUM_MGMT);
  169. @@ -685,12 +683,12 @@ static int mwl_fwcmd_set_spectrum_mgmt(s
  170.     pcmd->spectrum_mgmt = cpu_to_le32(enable);
  171.  
  172.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_SPECTRUM_MGMT)) {
  173. -       mutex_unlock(&priv->fwcmd_mutex);
  174. +       spin_unlock_bh(&priv->fwcmd_lock);
  175.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  176.         return -EIO;
  177.     }
  178.  
  179. -   mutex_unlock(&priv->fwcmd_mutex);
  180. +   spin_unlock_bh(&priv->fwcmd_lock);
  181.  
  182.     return 0;
  183.  }
  184. @@ -702,7 +700,7 @@ static int mwl_fwcmd_set_power_constrain
  185.  
  186.     pcmd = (struct hostcmd_cmd_set_power_constraint *)&priv->pcmd_buf[0];
  187.  
  188. -   mutex_lock(&priv->fwcmd_mutex);
  189. +   spin_lock_bh(&priv->fwcmd_lock);
  190.  
  191.     memset(pcmd, 0x00, sizeof(*pcmd));
  192.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_POWER_CONSTRAINT);
  193. @@ -710,12 +708,12 @@ static int mwl_fwcmd_set_power_constrain
  194.     pcmd->power_constraint = cpu_to_le32(power_constraint);
  195.  
  196.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_POWER_CONSTRAINT)) {
  197. -       mutex_unlock(&priv->fwcmd_mutex);
  198. +       spin_unlock_bh(&priv->fwcmd_lock);
  199.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  200.         return -EIO;
  201.     }
  202.  
  203. -   mutex_unlock(&priv->fwcmd_mutex);
  204. +   spin_unlock_bh(&priv->fwcmd_lock);
  205.  
  206.     return 0;
  207.  }
  208. @@ -752,7 +750,7 @@ static int mwl_fwcmd_set_country_code(st
  209.  
  210.     pcmd = (struct hostcmd_cmd_set_country_code *)&priv->pcmd_buf[0];
  211.  
  212. -   mutex_lock(&priv->fwcmd_mutex);
  213. +   spin_lock_bh(&priv->fwcmd_lock);
  214.  
  215.     memset(pcmd, 0x00, sizeof(*pcmd));
  216.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_COUNTRY_CODE);
  217. @@ -775,12 +773,12 @@ static int mwl_fwcmd_set_country_code(st
  218.     }
  219.  
  220.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_COUNTRY_CODE)) {
  221. -       mutex_unlock(&priv->fwcmd_mutex);
  222. +       spin_unlock_bh(&priv->fwcmd_lock);
  223.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  224.         return -EIO;
  225.     }
  226.  
  227. -   mutex_unlock(&priv->fwcmd_mutex);
  228. +   spin_unlock_bh(&priv->fwcmd_lock);
  229.  
  230.     return 0;
  231.  }
  232. @@ -873,7 +871,7 @@ int mwl_fwcmd_get_hw_specs(struct ieee80
  233.  
  234.     pcmd = (struct hostcmd_cmd_get_hw_spec *)&priv->pcmd_buf[0];
  235.  
  236. -   mutex_lock(&priv->fwcmd_mutex);
  237. +   spin_lock_bh(&priv->fwcmd_lock);
  238.  
  239.     wiphy_debug(hw->wiphy, "pcmd = %p\n", pcmd);
  240.     memset(pcmd, 0x00, sizeof(*pcmd));
  241. @@ -886,11 +884,11 @@ int mwl_fwcmd_get_hw_specs(struct ieee80
  242.     while (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_GET_HW_SPEC)) {
  243.         if (retry++ > MAX_WAIT_GET_HW_SPECS_ITERATONS) {
  244.             wiphy_err(hw->wiphy, "can't get hw specs\n");
  245. -           mutex_unlock(&priv->fwcmd_mutex);
  246. +           spin_unlock_bh(&priv->fwcmd_lock);
  247.             return -EIO;
  248.         }
  249.  
  250. -       msleep(1000);
  251. +       mdelay(1000);
  252.         wiphy_debug(hw->wiphy,
  253.                 "repeat command = %p\n", pcmd);
  254.     }
  255. @@ -913,7 +911,7 @@ int mwl_fwcmd_get_hw_specs(struct ieee80
  256.     priv->hw_data.hw_version = pcmd->version;
  257.     priv->hw_data.host_interface = pcmd->host_if;
  258.  
  259. -   mutex_unlock(&priv->fwcmd_mutex);
  260. +   spin_unlock_bh(&priv->fwcmd_lock);
  261.  
  262.     return 0;
  263.  }
  264. @@ -929,7 +927,7 @@ int mwl_fwcmd_set_hw_specs(struct ieee80
  265.  
  266.     pcmd = (struct hostcmd_cmd_set_hw_spec *)&priv->pcmd_buf[0];
  267.  
  268. -   mutex_lock(&priv->fwcmd_mutex);
  269. +   spin_lock_bh(&priv->fwcmd_lock);
  270.  
  271.     memset(pcmd, 0x00, sizeof(*pcmd));
  272.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_HW_SPEC);
  273. @@ -945,12 +943,12 @@ int mwl_fwcmd_set_hw_specs(struct ieee80
  274.     pcmd->features = 0;
  275.  
  276.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_HW_SPEC)) {
  277. -       mutex_unlock(&priv->fwcmd_mutex);
  278. +       spin_unlock_bh(&priv->fwcmd_lock);
  279.         wiphy_err(hw->wiphy, "failed execution\n");
  280.         return -EIO;
  281.     }
  282.  
  283. -   mutex_unlock(&priv->fwcmd_mutex);
  284. +   spin_unlock_bh(&priv->fwcmd_lock);
  285.  
  286.     return 0;
  287.  }
  288. @@ -963,14 +961,14 @@ int mwl_fwcmd_get_stat(struct ieee80211_
  289.  
  290.     pcmd = (struct hostcmd_cmd_802_11_get_stat *)&priv->pcmd_buf[0];
  291.  
  292. -   mutex_lock(&priv->fwcmd_mutex);
  293. +   spin_lock_bh(&priv->fwcmd_lock);
  294.  
  295.     memset(pcmd, 0x00, sizeof(*pcmd));
  296.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_802_11_GET_STAT);
  297.     pcmd->cmd_hdr.len = cpu_to_le16(sizeof(*pcmd));
  298.  
  299.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_802_11_GET_STAT)) {
  300. -       mutex_unlock(&priv->fwcmd_mutex);
  301. +       spin_unlock_bh(&priv->fwcmd_lock);
  302.         wiphy_err(hw->wiphy, "failed execution\n");
  303.         return -EIO;
  304.     }
  305. @@ -984,7 +982,7 @@ int mwl_fwcmd_get_stat(struct ieee80211_
  306.     stats->dot11RTSSuccessCount =
  307.         le32_to_cpu(pcmd->rts_successes);
  308.  
  309. -   mutex_unlock(&priv->fwcmd_mutex);
  310. +   spin_unlock_bh(&priv->fwcmd_lock);
  311.  
  312.     return 0;
  313.  }
  314. @@ -1022,7 +1020,7 @@ int mwl_fwcmd_get_addr_value(struct ieee
  315.  
  316.     pcmd = (struct hostcmd_cmd_mem_addr_access *)&priv->pcmd_buf[0];
  317.  
  318. -   mutex_lock(&priv->fwcmd_mutex);
  319. +   spin_lock_bh(&priv->fwcmd_lock);
  320.  
  321.     memset(pcmd, 0x00, sizeof(*pcmd));
  322.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_MEM_ADDR_ACCESS);
  323. @@ -1033,7 +1031,7 @@ int mwl_fwcmd_get_addr_value(struct ieee
  324.     pcmd->reserved = cpu_to_le16(set);
  325.  
  326.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_MEM_ADDR_ACCESS)) {
  327. -       mutex_unlock(&priv->fwcmd_mutex);
  328. +       spin_unlock_bh(&priv->fwcmd_lock);
  329.         wiphy_err(hw->wiphy, "failed execution\n");
  330.         return -EIO;
  331.     }
  332. @@ -1041,7 +1039,7 @@ int mwl_fwcmd_get_addr_value(struct ieee
  333.     for (i = 0; i < len; i++)
  334.         val[i] = le32_to_cpu(pcmd->value[i]);
  335.  
  336. -   mutex_unlock(&priv->fwcmd_mutex);
  337. +   spin_unlock_bh(&priv->fwcmd_lock);
  338.  
  339.     return 0;
  340.  }
  341. @@ -1272,7 +1270,7 @@ int mwl_fwcmd_rf_antenna(struct ieee8021
  342.  
  343.     pcmd = (struct hostcmd_cmd_802_11_rf_antenna *)&priv->pcmd_buf[0];
  344.  
  345. -   mutex_lock(&priv->fwcmd_mutex);
  346. +   spin_lock_bh(&priv->fwcmd_lock);
  347.  
  348.     memset(pcmd, 0x00, sizeof(*pcmd));
  349.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_802_11_RF_ANTENNA);
  350. @@ -1297,12 +1295,12 @@ int mwl_fwcmd_rf_antenna(struct ieee8021
  351.     }
  352.  
  353.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_802_11_RF_ANTENNA)) {
  354. -       mutex_unlock(&priv->fwcmd_mutex);
  355. +       spin_unlock_bh(&priv->fwcmd_lock);
  356.         wiphy_err(hw->wiphy, "failed execution\n");
  357.         return -EIO;
  358.     }
  359.  
  360. -   mutex_unlock(&priv->fwcmd_mutex);
  361. +   spin_unlock_bh(&priv->fwcmd_lock);
  362.  
  363.     return 0;
  364.  }
  365. @@ -1318,7 +1316,7 @@ int mwl_fwcmd_broadcast_ssid_enable(stru
  366.  
  367.     pcmd = (struct hostcmd_cmd_broadcast_ssid_enable *)&priv->pcmd_buf[0];
  368.  
  369. -   mutex_lock(&priv->fwcmd_mutex);
  370. +   spin_lock_bh(&priv->fwcmd_lock);
  371.  
  372.     memset(pcmd, 0x00, sizeof(*pcmd));
  373.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_BROADCAST_SSID_ENABLE);
  374. @@ -1327,12 +1325,12 @@ int mwl_fwcmd_broadcast_ssid_enable(stru
  375.     pcmd->enable = cpu_to_le32(enable);
  376.  
  377.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_BROADCAST_SSID_ENABLE)) {
  378. -       mutex_unlock(&priv->fwcmd_mutex);
  379. +       spin_unlock_bh(&priv->fwcmd_lock);
  380.         wiphy_err(hw->wiphy, "failed execution\n");
  381.         return -EIO;
  382.     }
  383.  
  384. -   mutex_unlock(&priv->fwcmd_mutex);
  385. +   spin_unlock_bh(&priv->fwcmd_lock);
  386.  
  387.     return 0;
  388.  }
  389. @@ -1347,7 +1345,7 @@ int mwl_fwcmd_set_rf_channel(struct ieee
  390.  
  391.     pcmd = (struct hostcmd_cmd_set_rf_channel *)&priv->pcmd_buf[0];
  392.  
  393. -   mutex_lock(&priv->fwcmd_mutex);
  394. +   spin_lock_bh(&priv->fwcmd_lock);
  395.  
  396.     memset(pcmd, 0x00, sizeof(*pcmd));
  397.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_RF_CHANNEL);
  398. @@ -1360,7 +1358,7 @@ int mwl_fwcmd_set_rf_channel(struct ieee
  399.     } else if (channel->band == IEEE80211_BAND_5GHZ) {
  400.         freq_band = FREQ_BAND_5GHZ;
  401.     } else {
  402. -       mutex_unlock(&priv->fwcmd_mutex);
  403. +       spin_unlock_bh(&priv->fwcmd_lock);
  404.         return -EINVAL;
  405.     }
  406.  
  407. @@ -1383,7 +1381,7 @@ int mwl_fwcmd_set_rf_channel(struct ieee
  408.             mwl_fwcmd_get_80m_pri_chnl(pcmd->curr_chnl);
  409.         break;
  410.     default:
  411. -       mutex_unlock(&priv->fwcmd_mutex);
  412. +       spin_unlock_bh(&priv->fwcmd_lock);
  413.         return -EINVAL;
  414.     }
  415.  
  416. @@ -1394,12 +1392,12 @@ int mwl_fwcmd_set_rf_channel(struct ieee
  417.     pcmd->chnl_flags = cpu_to_le32(chnl_flags);
  418.  
  419.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_RF_CHANNEL)) {
  420. -       mutex_unlock(&priv->fwcmd_mutex);
  421. +       spin_unlock_bh(&priv->fwcmd_lock);
  422.         wiphy_err(hw->wiphy, "failed execution\n");
  423.         return -EIO;
  424.     }
  425.  
  426. -   mutex_unlock(&priv->fwcmd_mutex);
  427. +   spin_unlock_bh(&priv->fwcmd_lock);
  428.  
  429.     return 0;
  430.  }
  431. @@ -1415,7 +1413,7 @@ int mwl_fwcmd_set_aid(struct ieee80211_h
  432.  
  433.     pcmd = (struct hostcmd_cmd_set_aid *)&priv->pcmd_buf[0];
  434.  
  435. -   mutex_lock(&priv->fwcmd_mutex);
  436. +   spin_lock_bh(&priv->fwcmd_lock);
  437.  
  438.     memset(pcmd, 0x00, sizeof(*pcmd));
  439.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_AID);
  440. @@ -1425,12 +1423,12 @@ int mwl_fwcmd_set_aid(struct ieee80211_h
  441.     ether_addr_copy(pcmd->mac_addr, bssid);
  442.  
  443.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_AID)) {
  444. -       mutex_unlock(&priv->fwcmd_mutex);
  445. +       spin_unlock_bh(&priv->fwcmd_lock);
  446.         wiphy_err(hw->wiphy, "failed execution\n");
  447.         return -EIO;
  448.     }
  449.  
  450. -   mutex_unlock(&priv->fwcmd_mutex);
  451. +   spin_unlock_bh(&priv->fwcmd_lock);
  452.  
  453.     return 0;
  454.  }
  455. @@ -1446,7 +1444,7 @@ int mwl_fwcmd_set_infra_mode(struct ieee
  456.  
  457.     pcmd = (struct hostcmd_cmd_set_infra_mode *)&priv->pcmd_buf[0];
  458.  
  459. -   mutex_lock(&priv->fwcmd_mutex);
  460. +   spin_lock_bh(&priv->fwcmd_lock);
  461.  
  462.     memset(pcmd, 0x00, sizeof(*pcmd));
  463.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_INFRA_MODE);
  464. @@ -1454,12 +1452,12 @@ int mwl_fwcmd_set_infra_mode(struct ieee
  465.     pcmd->cmd_hdr.macid = mwl_vif->macid;
  466.  
  467.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_INFRA_MODE)) {
  468. -       mutex_unlock(&priv->fwcmd_mutex);
  469. +       spin_unlock_bh(&priv->fwcmd_lock);
  470.         wiphy_err(hw->wiphy, "failed execution\n");
  471.         return -EIO;
  472.     }
  473.  
  474. -   mutex_unlock(&priv->fwcmd_mutex);
  475. +   spin_unlock_bh(&priv->fwcmd_lock);
  476.  
  477.     return 0;
  478.  }
  479. @@ -1471,7 +1469,7 @@ int mwl_fwcmd_set_rts_threshold(struct i
  480.  
  481.     pcmd = (struct hostcmd_cmd_802_11_rts_thsd *)&priv->pcmd_buf[0];
  482.  
  483. -   mutex_lock(&priv->fwcmd_mutex);
  484. +   spin_lock_bh(&priv->fwcmd_lock);
  485.  
  486.     memset(pcmd, 0x00, sizeof(*pcmd));
  487.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_802_11_RTS_THSD);
  488. @@ -1480,12 +1478,12 @@ int mwl_fwcmd_set_rts_threshold(struct i
  489.     pcmd->threshold = cpu_to_le16(threshold);
  490.  
  491.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_802_11_RTS_THSD)) {
  492. -       mutex_unlock(&priv->fwcmd_mutex);
  493. +       spin_unlock_bh(&priv->fwcmd_lock);
  494.         wiphy_err(hw->wiphy, "failed execution\n");
  495.         return -EIO;
  496.     }
  497.  
  498. -   mutex_unlock(&priv->fwcmd_mutex);
  499. +   spin_unlock_bh(&priv->fwcmd_lock);
  500.  
  501.     return 0;
  502.  }
  503. @@ -1498,7 +1496,7 @@ int mwl_fwcmd_set_edca_params(struct iee
  504.  
  505.     pcmd = (struct hostcmd_cmd_set_edca_params *)&priv->pcmd_buf[0];
  506.  
  507. -   mutex_lock(&priv->fwcmd_mutex);
  508. +   spin_lock_bh(&priv->fwcmd_lock);
  509.  
  510.     memset(pcmd, 0x00, sizeof(*pcmd));
  511.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_EDCA_PARAMS);
  512. @@ -1521,12 +1519,12 @@ int mwl_fwcmd_set_edca_params(struct iee
  513.         pcmd->txq_num = 0;
  514.  
  515.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_EDCA_PARAMS)) {
  516. -       mutex_unlock(&priv->fwcmd_mutex);
  517. +       spin_unlock_bh(&priv->fwcmd_lock);
  518.         wiphy_err(hw->wiphy, "failed execution\n");
  519.         return -EIO;
  520.     }
  521.  
  522. -   mutex_unlock(&priv->fwcmd_mutex);
  523. +   spin_unlock_bh(&priv->fwcmd_lock);
  524.  
  525.     return 0;
  526.  }
  527. @@ -1551,7 +1549,7 @@ int mwl_fwcmd_set_radar_detect(struct ie
  528.         radar_type = RADAR_TYPE_CODE_ETSI;
  529.     }
  530.  
  531. -   mutex_lock(&priv->fwcmd_mutex);
  532. +   spin_lock_bh(&priv->fwcmd_lock);
  533.  
  534.     memset(pcmd, 0x00, sizeof(*pcmd));
  535.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_802_11H_DETECT_RADAR);
  536. @@ -1565,12 +1563,12 @@ int mwl_fwcmd_set_radar_detect(struct ie
  537.     pcmd->pri_min_num = cpu_to_le16(priv->dfs_min_pri_count);
  538.  
  539.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_802_11H_DETECT_RADAR)) {
  540. -       mutex_unlock(&priv->fwcmd_mutex);
  541. +       spin_unlock_bh(&priv->fwcmd_lock);
  542.         wiphy_err(hw->wiphy, "failed execution\n");
  543.         return -EIO;
  544.     }
  545.  
  546. -   mutex_unlock(&priv->fwcmd_mutex);
  547. +   spin_unlock_bh(&priv->fwcmd_lock);
  548.  
  549.     return 0;
  550.  }
  551. @@ -1582,7 +1580,7 @@ int mwl_fwcmd_set_wmm_mode(struct ieee80
  552.  
  553.     pcmd = (struct hostcmd_cmd_set_wmm_mode *)&priv->pcmd_buf[0];
  554.  
  555. -   mutex_lock(&priv->fwcmd_mutex);
  556. +   spin_lock_bh(&priv->fwcmd_lock);
  557.  
  558.     memset(pcmd, 0x00, sizeof(*pcmd));
  559.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_WMM_MODE);
  560. @@ -1590,12 +1588,12 @@ int mwl_fwcmd_set_wmm_mode(struct ieee80
  561.     pcmd->action = cpu_to_le16(enable ? WL_ENABLE : WL_DISABLE);
  562.  
  563.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_WMM_MODE)) {
  564. -       mutex_unlock(&priv->fwcmd_mutex);
  565. +       spin_unlock_bh(&priv->fwcmd_lock);
  566.         wiphy_err(hw->wiphy, "failed execution\n");
  567.         return -EIO;
  568.     }
  569.  
  570. -   mutex_unlock(&priv->fwcmd_mutex);
  571. +   spin_unlock_bh(&priv->fwcmd_lock);
  572.  
  573.     return 0;
  574.  }
  575. @@ -1607,7 +1605,7 @@ int mwl_fwcmd_ht_guard_interval(struct i
  576.  
  577.     pcmd = (struct hostcmd_cmd_ht_guard_interval *)&priv->pcmd_buf[0];
  578.  
  579. -   mutex_lock(&priv->fwcmd_mutex);
  580. +   spin_lock_bh(&priv->fwcmd_lock);
  581.  
  582.     memset(pcmd, 0x00, sizeof(*pcmd));
  583.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_HT_GUARD_INTERVAL);
  584. @@ -1616,12 +1614,12 @@ int mwl_fwcmd_ht_guard_interval(struct i
  585.     pcmd->gi_type = cpu_to_le32(gi_type);
  586.  
  587.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_HT_GUARD_INTERVAL)) {
  588. -       mutex_unlock(&priv->fwcmd_mutex);
  589. +       spin_unlock_bh(&priv->fwcmd_lock);
  590.         wiphy_err(hw->wiphy, "failed execution\n");
  591.         return -EIO;
  592.     }
  593.  
  594. -   mutex_unlock(&priv->fwcmd_mutex);
  595. +   spin_unlock_bh(&priv->fwcmd_lock);
  596.  
  597.     return 0;
  598.  }
  599. @@ -1633,7 +1631,7 @@ int mwl_fwcmd_use_fixed_rate(struct ieee
  600.  
  601.     pcmd = (struct hostcmd_cmd_set_fixed_rate *)&priv->pcmd_buf[0];
  602.  
  603. -   mutex_lock(&priv->fwcmd_mutex);
  604. +   spin_lock_bh(&priv->fwcmd_lock);
  605.  
  606.     memset(pcmd, 0x00, sizeof(*pcmd));
  607.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_FIXED_RATE);
  608. @@ -1644,12 +1642,12 @@ int mwl_fwcmd_use_fixed_rate(struct ieee
  609.     pcmd->management_rate = mgmt;
  610.  
  611.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_FIXED_RATE)) {
  612. -       mutex_unlock(&priv->fwcmd_mutex);
  613. +       spin_unlock_bh(&priv->fwcmd_lock);
  614.         wiphy_err(hw->wiphy, "failed execution\n");
  615.         return -EIO;
  616.     }
  617.  
  618. -   mutex_unlock(&priv->fwcmd_mutex);
  619. +   spin_unlock_bh(&priv->fwcmd_lock);
  620.  
  621.     return 0;
  622.  }
  623. @@ -1661,7 +1659,7 @@ int mwl_fwcmd_set_linkadapt_cs_mode(stru
  624.  
  625.     pcmd = (struct hostcmd_cmd_set_linkadapt_cs_mode *)&priv->pcmd_buf[0];
  626.  
  627. -   mutex_lock(&priv->fwcmd_mutex);
  628. +   spin_lock_bh(&priv->fwcmd_lock);
  629.  
  630.     memset(pcmd, 0x00, sizeof(*pcmd));
  631.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_LINKADAPT_CS_MODE);
  632. @@ -1670,12 +1668,12 @@ int mwl_fwcmd_set_linkadapt_cs_mode(stru
  633.     pcmd->cs_mode = cpu_to_le16(cs_mode);
  634.  
  635.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_LINKADAPT_CS_MODE)) {
  636. -       mutex_unlock(&priv->fwcmd_mutex);
  637. +       spin_unlock_bh(&priv->fwcmd_lock);
  638.         wiphy_err(hw->wiphy, "failed execution\n");
  639.         return -EIO;
  640.     }
  641.  
  642. -   mutex_unlock(&priv->fwcmd_mutex);
  643. +   spin_unlock_bh(&priv->fwcmd_lock);
  644.  
  645.     return 0;
  646.  }
  647. @@ -1687,7 +1685,7 @@ int mwl_fwcmd_set_rate_adapt_mode(struct
  648.  
  649.     pcmd = (struct hostcmd_cmd_set_rate_adapt_mode *)&priv->pcmd_buf[0];
  650.  
  651. -   mutex_lock(&priv->fwcmd_mutex);
  652. +   spin_lock_bh(&priv->fwcmd_lock);
  653.  
  654.     memset(pcmd, 0x00, sizeof(*pcmd));
  655.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_RATE_ADAPT_MODE);
  656. @@ -1696,12 +1694,12 @@ int mwl_fwcmd_set_rate_adapt_mode(struct
  657.     pcmd->rate_adapt_mode = cpu_to_le16(mode);
  658.  
  659.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_RATE_ADAPT_MODE)) {
  660. -       mutex_unlock(&priv->fwcmd_mutex);
  661. +       spin_unlock_bh(&priv->fwcmd_lock);
  662.         wiphy_err(hw->wiphy, "failed execution\n");
  663.         return -EIO;
  664.     }
  665.  
  666. -   mutex_unlock(&priv->fwcmd_mutex);
  667. +   spin_unlock_bh(&priv->fwcmd_lock);
  668.  
  669.     return 0;
  670.  }
  671. @@ -1717,7 +1715,7 @@ int mwl_fwcmd_set_mac_addr_client(struct
  672.  
  673.     pcmd = (struct hostcmd_cmd_set_mac_addr *)&priv->pcmd_buf[0];
  674.  
  675. -   mutex_lock(&priv->fwcmd_mutex);
  676. +   spin_lock_bh(&priv->fwcmd_lock);
  677.  
  678.     memset(pcmd, 0x00, sizeof(*pcmd));
  679.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_MAC_ADDR);
  680. @@ -1727,12 +1725,12 @@ int mwl_fwcmd_set_mac_addr_client(struct
  681.     ether_addr_copy(pcmd->mac_addr, mac_addr);
  682.  
  683.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_MAC_ADDR)) {
  684. -       mutex_unlock(&priv->fwcmd_mutex);
  685. +       spin_unlock_bh(&priv->fwcmd_lock);
  686.         wiphy_err(hw->wiphy, "failed execution\n");
  687.         return -EIO;
  688.     }
  689.  
  690. -   mutex_unlock(&priv->fwcmd_mutex);
  691. +   spin_unlock_bh(&priv->fwcmd_lock);
  692.  
  693.     return 0;
  694.  }
  695. @@ -1744,21 +1742,21 @@ int mwl_fwcmd_get_watchdog_bitmap(struct
  696.  
  697.     pcmd = (struct hostcmd_cmd_get_watchdog_bitmap *)&priv->pcmd_buf[0];
  698.  
  699. -   mutex_lock(&priv->fwcmd_mutex);
  700. +   spin_lock_bh(&priv->fwcmd_lock);
  701.  
  702.     memset(pcmd, 0x00, sizeof(*pcmd));
  703.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_GET_WATCHDOG_BITMAP);
  704.     pcmd->cmd_hdr.len = cpu_to_le16(sizeof(*pcmd));
  705.  
  706.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_GET_WATCHDOG_BITMAP)) {
  707. -       mutex_unlock(&priv->fwcmd_mutex);
  708. +       spin_unlock_bh(&priv->fwcmd_lock);
  709.         wiphy_err(hw->wiphy, "failed execution\n");
  710.         return -EIO;
  711.     }
  712.  
  713.     *bitmap = pcmd->watchdog_bitmap;
  714.  
  715. -   mutex_unlock(&priv->fwcmd_mutex);
  716. +   spin_unlock_bh(&priv->fwcmd_lock);
  717.  
  718.     return 0;
  719.  }
  720. @@ -1774,7 +1772,7 @@ int mwl_fwcmd_remove_mac_addr(struct iee
  721.  
  722.     pcmd = (struct hostcmd_cmd_set_mac_addr *)&priv->pcmd_buf[0];
  723.  
  724. -   mutex_lock(&priv->fwcmd_mutex);
  725. +   spin_lock_bh(&priv->fwcmd_lock);
  726.  
  727.     memset(pcmd, 0x00, sizeof(*pcmd));
  728.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_DEL_MAC_ADDR);
  729. @@ -1783,12 +1781,12 @@ int mwl_fwcmd_remove_mac_addr(struct iee
  730.     ether_addr_copy(pcmd->mac_addr, mac_addr);
  731.  
  732.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_DEL_MAC_ADDR)) {
  733. -       mutex_unlock(&priv->fwcmd_mutex);
  734. +       spin_unlock_bh(&priv->fwcmd_lock);
  735.         wiphy_err(hw->wiphy, "failed execution\n");
  736.         return -EIO;
  737.     }
  738.  
  739. -   mutex_unlock(&priv->fwcmd_mutex);
  740. +   spin_unlock_bh(&priv->fwcmd_lock);
  741.  
  742.     return 0;
  743.  }
  744. @@ -1810,7 +1808,7 @@ int mwl_fwcmd_bss_start(struct ieee80211
  745.  
  746.     pcmd = (struct hostcmd_cmd_bss_start *)&priv->pcmd_buf[0];
  747.  
  748. -   mutex_lock(&priv->fwcmd_mutex);
  749. +   spin_lock_bh(&priv->fwcmd_lock);
  750.  
  751.     memset(pcmd, 0x00, sizeof(*pcmd));
  752.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_BSS_START);
  753. @@ -1827,7 +1825,7 @@ int mwl_fwcmd_bss_start(struct ieee80211
  754.     }
  755.  
  756.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_BSS_START)) {
  757. -       mutex_unlock(&priv->fwcmd_mutex);
  758. +       spin_unlock_bh(&priv->fwcmd_lock);
  759.         wiphy_err(hw->wiphy, "failed execution\n");
  760.         return -EIO;
  761.     }
  762. @@ -1837,7 +1835,7 @@ int mwl_fwcmd_bss_start(struct ieee80211
  763.     else
  764.         priv->running_bsses &= ~(1 << mwl_vif->macid);
  765.  
  766. -   mutex_unlock(&priv->fwcmd_mutex);
  767. +   spin_unlock_bh(&priv->fwcmd_lock);
  768.  
  769.     return 0;
  770.  }
  771. @@ -1907,7 +1905,7 @@ int mwl_fwcmd_set_new_stn_add(struct iee
  772.  
  773.     pcmd = (struct hostcmd_cmd_set_new_stn *)&priv->pcmd_buf[0];
  774.  
  775. -   mutex_lock(&priv->fwcmd_mutex);
  776. +   spin_lock_bh(&priv->fwcmd_lock);
  777.  
  778.     memset(pcmd, 0x00, sizeof(*pcmd));
  779.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_NEW_STN);
  780. @@ -1968,7 +1966,7 @@ int mwl_fwcmd_set_new_stn_add(struct iee
  781.     pcmd->qos_info = ((sta->uapsd_queues << 4) | (sta->max_sp << 1));
  782.  
  783.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_NEW_STN)) {
  784. -       mutex_unlock(&priv->fwcmd_mutex);
  785. +       spin_unlock_bh(&priv->fwcmd_lock);
  786.         wiphy_err(hw->wiphy, "failed execution\n");
  787.         return -EIO;
  788.     }
  789. @@ -1977,13 +1975,13 @@ int mwl_fwcmd_set_new_stn_add(struct iee
  790.         ether_addr_copy(pcmd->mac_addr, mwl_vif->sta_mac);
  791.  
  792.         if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_NEW_STN)) {
  793. -           mutex_unlock(&priv->fwcmd_mutex);
  794. +           spin_unlock_bh(&priv->fwcmd_lock);
  795.             wiphy_err(hw->wiphy, "failed execution\n");
  796.             return -EIO;
  797.         }
  798.     }
  799.  
  800. -   mutex_unlock(&priv->fwcmd_mutex);
  801. +   spin_unlock_bh(&priv->fwcmd_lock);
  802.  
  803.     return 0;
  804.  }
  805. @@ -1999,7 +1997,7 @@ int mwl_fwcmd_set_new_stn_add_self(struc
  806.  
  807.     pcmd = (struct hostcmd_cmd_set_new_stn *)&priv->pcmd_buf[0];
  808.  
  809. -   mutex_lock(&priv->fwcmd_mutex);
  810. +   spin_lock_bh(&priv->fwcmd_lock);
  811.  
  812.     memset(pcmd, 0x00, sizeof(*pcmd));
  813.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_NEW_STN);
  814. @@ -2010,12 +2008,12 @@ int mwl_fwcmd_set_new_stn_add_self(struc
  815.     ether_addr_copy(pcmd->mac_addr, vif->addr);
  816.  
  817.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_NEW_STN)) {
  818. -       mutex_unlock(&priv->fwcmd_mutex);
  819. +       spin_unlock_bh(&priv->fwcmd_lock);
  820.         wiphy_err(hw->wiphy, "failed execution\n");
  821.         return -EIO;
  822.     }
  823.  
  824. -   mutex_unlock(&priv->fwcmd_mutex);
  825. +   spin_unlock_bh(&priv->fwcmd_lock);
  826.  
  827.     return 0;
  828.  }
  829. @@ -2031,7 +2029,7 @@ int mwl_fwcmd_set_new_stn_del(struct iee
  830.  
  831.     pcmd = (struct hostcmd_cmd_set_new_stn *)&priv->pcmd_buf[0];
  832.  
  833. -   mutex_lock(&priv->fwcmd_mutex);
  834. +   spin_lock_bh(&priv->fwcmd_lock);
  835.  
  836.     memset(pcmd, 0x00, sizeof(*pcmd));
  837.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_NEW_STN);
  838. @@ -2042,7 +2040,7 @@ int mwl_fwcmd_set_new_stn_del(struct iee
  839.     ether_addr_copy(pcmd->mac_addr, addr);
  840.  
  841.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_NEW_STN)) {
  842. -       mutex_unlock(&priv->fwcmd_mutex);
  843. +       spin_unlock_bh(&priv->fwcmd_lock);
  844.         wiphy_err(hw->wiphy, "failed execution\n");
  845.         return -EIO;
  846.     }
  847. @@ -2051,13 +2049,13 @@ int mwl_fwcmd_set_new_stn_del(struct iee
  848.         ether_addr_copy(pcmd->mac_addr, mwl_vif->sta_mac);
  849.  
  850.         if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_NEW_STN)) {
  851. -           mutex_unlock(&priv->fwcmd_mutex);
  852. +           spin_unlock_bh(&priv->fwcmd_lock);
  853.             wiphy_err(hw->wiphy, "failed execution\n");
  854.             return -EIO;
  855.         }
  856.     }
  857.  
  858. -   mutex_unlock(&priv->fwcmd_mutex);
  859. +   spin_unlock_bh(&priv->fwcmd_lock);
  860.  
  861.     return 0;
  862.  }
  863. @@ -2069,7 +2067,7 @@ int mwl_fwcmd_set_apmode(struct ieee8021
  864.  
  865.     pcmd = (struct hostcmd_cmd_set_apmode *)&priv->pcmd_buf[0];
  866.  
  867. -   mutex_lock(&priv->fwcmd_mutex);
  868. +   spin_lock_bh(&priv->fwcmd_lock);
  869.  
  870.     memset(pcmd, 0x00, sizeof(*pcmd));
  871.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_APMODE);
  872. @@ -2077,12 +2075,12 @@ int mwl_fwcmd_set_apmode(struct ieee8021
  873.     pcmd->apmode = apmode;
  874.  
  875.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_APMODE)) {
  876. -       mutex_unlock(&priv->fwcmd_mutex);
  877. +       spin_unlock_bh(&priv->fwcmd_lock);
  878.         wiphy_err(hw->wiphy, "failed execution\n");
  879.         return -EIO;
  880.     }
  881.  
  882. -   mutex_unlock(&priv->fwcmd_mutex);
  883. +   spin_unlock_bh(&priv->fwcmd_lock);
  884.  
  885.     return 0;
  886.  }
  887. @@ -2142,7 +2140,7 @@ int mwl_fwcmd_set_switch_channel(struct
  888.  
  889.     pcmd = (struct hostcmd_cmd_set_switch_channel *)&priv->pcmd_buf[0];
  890.  
  891. -   mutex_lock(&priv->fwcmd_mutex);
  892. +   spin_lock_bh(&priv->fwcmd_lock);
  893.  
  894.     memset(pcmd, 0x00, sizeof(*pcmd));
  895.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_SWITCH_CHANNEL);
  896. @@ -2154,14 +2152,14 @@ int mwl_fwcmd_set_switch_channel(struct
  897.     pcmd->next_ht_extchnl_offset = cpu_to_le32(sec_chnl_offset);
  898.  
  899.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_SWITCH_CHANNEL)) {
  900. -       mutex_unlock(&priv->fwcmd_mutex);
  901. +       spin_unlock_bh(&priv->fwcmd_lock);
  902.         wiphy_err(priv->hw->wiphy, "failed execution\n");
  903.         return -EIO;
  904.     }
  905.  
  906.     priv->csa_active = true;
  907.  
  908. -   mutex_unlock(&priv->fwcmd_mutex);
  909. +   spin_unlock_bh(&priv->fwcmd_lock);
  910.  
  911.     return 0;
  912.  }
  913. @@ -2178,7 +2176,7 @@ int mwl_fwcmd_update_encryption_enable(s
  914.  
  915.     pcmd = (struct hostcmd_cmd_update_encryption *)&priv->pcmd_buf[0];
  916.  
  917. -   mutex_lock(&priv->fwcmd_mutex);
  918. +   spin_lock_bh(&priv->fwcmd_lock);
  919.  
  920.     memset(pcmd, 0x00, sizeof(*pcmd));
  921.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_UPDATE_ENCRYPTION);
  922. @@ -2190,7 +2188,7 @@ int mwl_fwcmd_update_encryption_enable(s
  923.     pcmd->action_data[0] = encr_type;
  924.  
  925.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_UPDATE_ENCRYPTION)) {
  926. -       mutex_unlock(&priv->fwcmd_mutex);
  927. +       spin_unlock_bh(&priv->fwcmd_lock);
  928.         wiphy_err(hw->wiphy, "failed execution\n");
  929.         return -EIO;
  930.     }
  931. @@ -2202,13 +2200,13 @@ int mwl_fwcmd_update_encryption_enable(s
  932.             ether_addr_copy(pcmd->mac_addr, mwl_vif->bssid);
  933.  
  934.         if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_UPDATE_ENCRYPTION)) {
  935. -           mutex_unlock(&priv->fwcmd_mutex);
  936. +           spin_unlock_bh(&priv->fwcmd_lock);
  937.             wiphy_err(hw->wiphy, "failed execution\n");
  938.             return -EIO;
  939.         }
  940.     }
  941.  
  942. -   mutex_unlock(&priv->fwcmd_mutex);
  943. +   spin_unlock_bh(&priv->fwcmd_lock);
  944.  
  945.     return 0;
  946.  }
  947. @@ -2229,7 +2227,7 @@ int mwl_fwcmd_encryption_set_key(struct
  948.  
  949.     pcmd = (struct hostcmd_cmd_set_key *)&priv->pcmd_buf[0];
  950.  
  951. -   mutex_lock(&priv->fwcmd_mutex);
  952. +   spin_lock_bh(&priv->fwcmd_lock);
  953.  
  954.     memset(pcmd, 0x00, sizeof(*pcmd));
  955.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_UPDATE_ENCRYPTION);
  956. @@ -2238,7 +2236,7 @@ int mwl_fwcmd_encryption_set_key(struct
  957.  
  958.     rc = mwl_fwcmd_encryption_set_cmd_info(pcmd, addr, key);
  959.     if (rc) {
  960. -       mutex_unlock(&priv->fwcmd_mutex);
  961. +       spin_unlock_bh(&priv->fwcmd_lock);
  962.         if (rc != 1)
  963.             wiphy_err(hw->wiphy, "encryption not support\n");
  964.         return rc;
  965. @@ -2275,7 +2273,7 @@ int mwl_fwcmd_encryption_set_key(struct
  966.         keymlen = key->keylen;
  967.         break;
  968.     default:
  969. -       mutex_unlock(&priv->fwcmd_mutex);
  970. +       spin_unlock_bh(&priv->fwcmd_lock);
  971.         wiphy_err(hw->wiphy, "encryption not support\n");
  972.         return -ENOTSUPP;
  973.     }
  974. @@ -2284,7 +2282,7 @@ int mwl_fwcmd_encryption_set_key(struct
  975.     pcmd->action_type = cpu_to_le32(action);
  976.  
  977.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_UPDATE_ENCRYPTION)) {
  978. -       mutex_unlock(&priv->fwcmd_mutex);
  979. +       spin_unlock_bh(&priv->fwcmd_lock);
  980.         wiphy_err(hw->wiphy, "failed execution\n");
  981.         return -EIO;
  982.     }
  983. @@ -2298,13 +2296,13 @@ int mwl_fwcmd_encryption_set_key(struct
  984.                     mwl_vif->bssid);
  985.  
  986.         if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_UPDATE_ENCRYPTION)) {
  987. -           mutex_unlock(&priv->fwcmd_mutex);
  988. +           spin_unlock_bh(&priv->fwcmd_lock);
  989.             wiphy_err(hw->wiphy, "failed execution\n");
  990.             return -EIO;
  991.         }
  992.     }
  993.  
  994. -   mutex_unlock(&priv->fwcmd_mutex);
  995. +   spin_unlock_bh(&priv->fwcmd_lock);
  996.  
  997.     return 0;
  998.  }
  999. @@ -2322,7 +2320,7 @@ int mwl_fwcmd_encryption_remove_key(stru
  1000.  
  1001.     pcmd = (struct hostcmd_cmd_set_key *)&priv->pcmd_buf[0];
  1002.  
  1003. -   mutex_lock(&priv->fwcmd_mutex);
  1004. +   spin_lock_bh(&priv->fwcmd_lock);
  1005.  
  1006.     memset(pcmd, 0x00, sizeof(*pcmd));
  1007.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_UPDATE_ENCRYPTION);
  1008. @@ -2331,7 +2329,7 @@ int mwl_fwcmd_encryption_remove_key(stru
  1009.  
  1010.     rc = mwl_fwcmd_encryption_set_cmd_info(pcmd, addr, key);
  1011.     if (rc) {
  1012. -       mutex_unlock(&priv->fwcmd_mutex);
  1013. +       spin_unlock_bh(&priv->fwcmd_lock);
  1014.         if (rc != 1)
  1015.             wiphy_err(hw->wiphy, "encryption not support\n");
  1016.         return rc;
  1017. @@ -2344,12 +2342,12 @@ int mwl_fwcmd_encryption_remove_key(stru
  1018.         mwl_vif->wep_key_conf[key->keyidx].enabled = 0;
  1019.  
  1020.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_UPDATE_ENCRYPTION)) {
  1021. -       mutex_unlock(&priv->fwcmd_mutex);
  1022. +       spin_unlock_bh(&priv->fwcmd_lock);
  1023.         wiphy_err(hw->wiphy, "failed execution\n");
  1024.         return -EIO;
  1025.     }
  1026.  
  1027. -   mutex_unlock(&priv->fwcmd_mutex);
  1028. +   spin_unlock_bh(&priv->fwcmd_lock);
  1029.  
  1030.     return 0;
  1031.  }
  1032. @@ -2367,7 +2365,7 @@ int mwl_fwcmd_check_ba(struct ieee80211_
  1033.  
  1034.     pcmd = (struct hostcmd_cmd_bastream *)&priv->pcmd_buf[0];
  1035.  
  1036. -   mutex_lock(&priv->fwcmd_mutex);
  1037. +   spin_lock_bh(&priv->fwcmd_lock);
  1038.  
  1039.     memset(pcmd, 0x00, sizeof(*pcmd));
  1040.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_BASTREAM);
  1041. @@ -2387,19 +2385,12 @@ int mwl_fwcmd_check_ba(struct ieee80211_
  1042.     pcmd->ba_info.create_params.queue_id = stream->idx;
  1043.  
  1044.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_BASTREAM)) {
  1045. -       mutex_unlock(&priv->fwcmd_mutex);
  1046. +       spin_unlock_bh(&priv->fwcmd_lock);
  1047.         wiphy_err(hw->wiphy, "check ba failed execution\n");
  1048.         return -EIO;
  1049.     }
  1050.  
  1051. -   if (pcmd->cmd_hdr.result != 0) {
  1052. -       mutex_unlock(&priv->fwcmd_mutex);
  1053. -       wiphy_err(hw->wiphy, "check ba result error %d\n",
  1054. -             le16_to_cpu(pcmd->cmd_hdr.result));
  1055. -       return -EINVAL;
  1056. -   }
  1057. -
  1058. -   mutex_unlock(&priv->fwcmd_mutex);
  1059. +   spin_unlock_bh(&priv->fwcmd_lock);
  1060.  
  1061.     return 0;
  1062.  }
  1063. @@ -2417,7 +2408,7 @@ int mwl_fwcmd_create_ba(struct ieee80211
  1064.  
  1065.     pcmd = (struct hostcmd_cmd_bastream *)&priv->pcmd_buf[0];
  1066.  
  1067. -   mutex_lock(&priv->fwcmd_mutex);
  1068. +   spin_lock_bh(&priv->fwcmd_lock);
  1069.  
  1070.     memset(pcmd, 0x00, sizeof(*pcmd));
  1071.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_BASTREAM);
  1072. @@ -2446,19 +2437,12 @@ int mwl_fwcmd_create_ba(struct ieee80211
  1073.     pcmd->ba_info.create_params.current_seq = cpu_to_le16(0);
  1074.  
  1075.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_BASTREAM)) {
  1076. -       mutex_unlock(&priv->fwcmd_mutex);
  1077. +       spin_unlock_bh(&priv->fwcmd_lock);
  1078.         wiphy_err(hw->wiphy, "create ba failed execution\n");
  1079.         return -EIO;
  1080.     }
  1081.  
  1082. -   if (pcmd->cmd_hdr.result != 0) {
  1083. -       mutex_unlock(&priv->fwcmd_mutex);
  1084. -       wiphy_err(hw->wiphy, "create ba result error %d\n",
  1085. -             le16_to_cpu(pcmd->cmd_hdr.result));
  1086. -       return -EINVAL;
  1087. -   }
  1088. -
  1089. -   mutex_unlock(&priv->fwcmd_mutex);
  1090. +   spin_unlock_bh(&priv->fwcmd_lock);
  1091.  
  1092.     return 0;
  1093.  }
  1094. @@ -2472,7 +2456,7 @@ int mwl_fwcmd_destroy_ba(struct ieee8021
  1095.  
  1096.     pcmd = (struct hostcmd_cmd_bastream *)&priv->pcmd_buf[0];
  1097.  
  1098. -   mutex_lock(&priv->fwcmd_mutex);
  1099. +   spin_lock_bh(&priv->fwcmd_lock);
  1100.  
  1101.     memset(pcmd, 0x00, sizeof(*pcmd));
  1102.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_BASTREAM);
  1103. @@ -2487,12 +2471,12 @@ int mwl_fwcmd_destroy_ba(struct ieee8021
  1104.     pcmd->ba_info.destroy_params.fw_ba_context.context = cpu_to_le32(idx);
  1105.  
  1106.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_BASTREAM)) {
  1107. -       mutex_unlock(&priv->fwcmd_mutex);
  1108. +       spin_unlock_bh(&priv->fwcmd_lock);
  1109.         wiphy_err(hw->wiphy, "destroy ba failed execution\n");
  1110.         return -EIO;
  1111.     }
  1112.  
  1113. -   mutex_unlock(&priv->fwcmd_mutex);
  1114. +   spin_unlock_bh(&priv->fwcmd_lock);
  1115.  
  1116.     return 0;
  1117.  }
  1118. @@ -2598,7 +2582,7 @@ int mwl_fwcmd_set_optimization_level(str
  1119.  
  1120.     pcmd = (struct hostcmd_cmd_set_optimization_level *)&priv->pcmd_buf[0];
  1121.  
  1122. -   mutex_lock(&priv->fwcmd_mutex);
  1123. +   spin_lock_bh(&priv->fwcmd_lock);
  1124.  
  1125.     memset(pcmd, 0x00, sizeof(*pcmd));
  1126.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_OPTIMIZATION_LEVEL);
  1127. @@ -2606,12 +2590,12 @@ int mwl_fwcmd_set_optimization_level(str
  1128.     pcmd->opt_level = opt_level;
  1129.  
  1130.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_OPTIMIZATION_LEVEL)) {
  1131. -       mutex_unlock(&priv->fwcmd_mutex);
  1132. +       spin_unlock_bh(&priv->fwcmd_lock);
  1133.         wiphy_err(hw->wiphy, "failed execution\n");
  1134.         return -EIO;
  1135.     }
  1136.  
  1137. -   mutex_unlock(&priv->fwcmd_mutex);
  1138. +   spin_unlock_bh(&priv->fwcmd_lock);
  1139.  
  1140.     return 0;
  1141.  }
  1142. @@ -2623,7 +2607,7 @@ int mwl_fwcmd_set_dwds_stamode(struct ie
  1143.  
  1144.     pcmd = (struct hostcmd_cmd_dwds_enable *)&priv->pcmd_buf[0];
  1145.  
  1146. -   mutex_lock(&priv->fwcmd_mutex);
  1147. +   spin_lock_bh(&priv->fwcmd_lock);
  1148.  
  1149.     memset(pcmd, 0x00, sizeof(*pcmd));
  1150.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_DWDS_ENABLE);
  1151. @@ -2631,12 +2615,12 @@ int mwl_fwcmd_set_dwds_stamode(struct ie
  1152.     pcmd->enable = cpu_to_le32(enable);
  1153.  
  1154.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_DWDS_ENABLE)) {
  1155. -       mutex_unlock(&priv->fwcmd_mutex);
  1156. +       spin_unlock_bh(&priv->fwcmd_lock);
  1157.         wiphy_err(hw->wiphy, "failed execution\n");
  1158.         return -EIO;
  1159.     }
  1160.  
  1161. -   mutex_unlock(&priv->fwcmd_mutex);
  1162. +   spin_unlock_bh(&priv->fwcmd_lock);
  1163.  
  1164.     return 0;
  1165.  }
  1166. @@ -2648,7 +2632,7 @@ int mwl_fwcmd_set_fw_flush_timer(struct
  1167.  
  1168.     pcmd = (struct hostcmd_cmd_fw_flush_timer *)&priv->pcmd_buf[0];
  1169.  
  1170. -   mutex_lock(&priv->fwcmd_mutex);
  1171. +   spin_lock_bh(&priv->fwcmd_lock);
  1172.  
  1173.     memset(pcmd, 0x00, sizeof(*pcmd));
  1174.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_FW_FLUSH_TIMER);
  1175. @@ -2656,12 +2640,12 @@ int mwl_fwcmd_set_fw_flush_timer(struct
  1176.     pcmd->value = cpu_to_le32(value);
  1177.  
  1178.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_FW_FLUSH_TIMER)) {
  1179. -       mutex_unlock(&priv->fwcmd_mutex);
  1180. +       spin_unlock_bh(&priv->fwcmd_lock);
  1181.         wiphy_err(hw->wiphy, "failed execution\n");
  1182.         return -EIO;
  1183.     }
  1184.  
  1185. -   mutex_unlock(&priv->fwcmd_mutex);
  1186. +   spin_unlock_bh(&priv->fwcmd_lock);
  1187.  
  1188.     return 0;
  1189.  }
  1190. @@ -2673,7 +2657,7 @@ int mwl_fwcmd_set_cdd(struct ieee80211_h
  1191.  
  1192.     pcmd = (struct hostcmd_cmd_set_cdd *)&priv->pcmd_buf[0];
  1193.  
  1194. -   mutex_lock(&priv->fwcmd_mutex);
  1195. +   spin_lock_bh(&priv->fwcmd_lock);
  1196.  
  1197.     memset(pcmd, 0x00, sizeof(*pcmd));
  1198.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_SET_CDD);
  1199. @@ -2681,12 +2665,12 @@ int mwl_fwcmd_set_cdd(struct ieee80211_h
  1200.     pcmd->enable = cpu_to_le32(priv->cdd);
  1201.  
  1202.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_CDD)) {
  1203. -       mutex_unlock(&priv->fwcmd_mutex);
  1204. +       spin_unlock_bh(&priv->fwcmd_lock);
  1205.         wiphy_err(hw->wiphy, "failed execution\n");
  1206.         return -EIO;
  1207.     }
  1208.  
  1209. -   mutex_unlock(&priv->fwcmd_mutex);
  1210. +   spin_unlock_bh(&priv->fwcmd_lock);
  1211.  
  1212.     return 0;
  1213.  }
  1214. @@ -2698,21 +2682,21 @@ int mwl_fwcmd_get_temp(struct ieee80211_
  1215.  
  1216.     pcmd = (struct hostcmd_cmd_get_temp *)&priv->pcmd_buf[0];
  1217.  
  1218. -   mutex_lock(&priv->fwcmd_mutex);
  1219. +   spin_lock_bh(&priv->fwcmd_lock);
  1220.  
  1221.     memset(pcmd, 0x00, sizeof(*pcmd));
  1222.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_GET_TEMP);
  1223.     pcmd->cmd_hdr.len = cpu_to_le16(sizeof(*pcmd));
  1224.  
  1225.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_GET_TEMP)) {
  1226. -       mutex_unlock(&priv->fwcmd_mutex);
  1227. +       spin_unlock_bh(&priv->fwcmd_lock);
  1228.         wiphy_err(hw->wiphy, "failed execution\n");
  1229.         return -EIO;
  1230.     }
  1231.  
  1232.     *temp = le32_to_cpu(pcmd->celcius);
  1233.  
  1234. -   mutex_unlock(&priv->fwcmd_mutex);
  1235. +   spin_unlock_bh(&priv->fwcmd_lock);
  1236.  
  1237.     return 0;
  1238.  }
  1239. @@ -2725,7 +2709,7 @@ int mwl_fwcmd_quiet_mode(struct ieee8021
  1240.  
  1241.     pcmd = (struct hostcmd_cmd_quiet_mode *)&priv->pcmd_buf[0];
  1242.  
  1243. -   mutex_lock(&priv->fwcmd_mutex);
  1244. +   spin_lock_bh(&priv->fwcmd_lock);
  1245.  
  1246.     memset(pcmd, 0x00, sizeof(*pcmd));
  1247.     pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_QUIET_MODE);
  1248. @@ -2739,12 +2723,12 @@ int mwl_fwcmd_quiet_mode(struct ieee8021
  1249.     }
  1250.  
  1251.     if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_QUIET_MODE)) {
  1252. -       mutex_unlock(&priv->fwcmd_mutex);
  1253. +       spin_unlock_bh(&priv->fwcmd_lock);
  1254.         wiphy_err(hw->wiphy, "failed execution\n");
  1255.         return -EIO;
  1256.     }
  1257.  
  1258. -   mutex_unlock(&priv->fwcmd_mutex);
  1259. +   spin_unlock_bh(&priv->fwcmd_lock);
  1260.  
  1261.     return 0;
  1262.  }
  1263. @@ -2758,21 +2742,21 @@ int mwl_fwcmd_send_mfg_cmd(struct mwl_pr
  1264.  
  1265.     pcmd = (struct hostcmd_header *)&priv->pcmd_buf[0];
  1266.  
  1267. -   mutex_lock(&priv->fwcmd_mutex);
  1268. +   spin_lock_bh(&priv->fwcmd_lock);
  1269.  
  1270.     len = le16_to_cpu(cmd_hd->len);
  1271.     memset(pcmd, 0x00, len + 4);
  1272.     memcpy((char *)pcmd, mfgcmd, len + 4);
  1273.     cmd = le16_to_cpu(cmd_hd->command);
  1274.     if (mwl_fwcmd_exec_cmd(priv, cmd)) {
  1275. -       mutex_unlock(&priv->fwcmd_mutex);
  1276. +       spin_unlock_bh(&priv->fwcmd_lock);
  1277.         wiphy_err(priv->hw->wiphy, "failed execution");
  1278.         return -EIO;
  1279.     }
  1280.     cmd_hd = (struct cmd_header *)&priv->pcmd_buf[2];
  1281.     len = le16_to_cpu(cmd_hd->len);
  1282.     memcpy(mfgcmd, (char *)&priv->pcmd_buf[2], len);
  1283. -   mutex_unlock(&priv->fwcmd_mutex);
  1284. +   spin_unlock_bh(&priv->fwcmd_lock);
  1285.  
  1286.     return 0;
  1287.  }
  1288. Index: mwlwifi-10.3.0.16-20160105/fwdl.c
  1289. ===================================================================
  1290. --- mwlwifi-10.3.0.16-20160105.orig/fwdl.c
  1291. +++ mwlwifi-10.3.0.16-20160105/fwdl.c
  1292. @@ -22,7 +22,7 @@
  1293.  #include "sysadpt.h"
  1294.  #include "dev.h"
  1295.  #include "fwcmd.h"
  1296. -#ifdef SUPPORT_MFG
  1297. +#ifdef CONFIG_SUPPORT_MFG
  1298.  #include "mfg.h"
  1299.  #endif
  1300.  #include "fwdl.h"
  1301. @@ -60,7 +60,7 @@ int mwl_fwdl_download_firmware(struct ie
  1302.     u32 size_fw_downloaded = 0;
  1303.     u32 int_code = 0;
  1304.     u32 len = 0;
  1305. -#ifdef SUPPORT_MFG
  1306. +#ifdef CONFIG_SUPPORT_MFG
  1307.     u32 fwreadysignature = priv->mfg_mode ?
  1308.         MFG_FW_READY_SIGNATURE : HOSTCMD_SOFTAP_FWRDY_SIGNATURE;
  1309.  #else
  1310. Index: mwlwifi-10.3.0.16-20160105/main.c
  1311. ===================================================================
  1312. --- mwlwifi-10.3.0.16-20160105.orig/main.c
  1313. +++ mwlwifi-10.3.0.16-20160105/main.c
  1314. @@ -27,7 +27,7 @@
  1315.  #include "tx.h"
  1316.  #include "rx.h"
  1317.  #include "isr.h"
  1318. -#ifdef SUPPORT_MFG
  1319. +#ifdef CONFIG_SUPPORT_MFG
  1320.  #include "mfg.h"
  1321.  #endif
  1322.  #ifdef CONFIG_DEBUG_FS
  1323. @@ -210,7 +210,8 @@ static int mwl_init_firmware(struct mwl_
  1324.  {
  1325.     int rc = 0;
  1326.  
  1327. -#ifdef SUPPORT_MFG
  1328. +
  1329. +#ifdef CONFIG_SUPPORT_MFG
  1330.     if (priv->mfg_mode)
  1331.         rc = mwl_mfg_request_firmware(priv);
  1332.     else
  1333. @@ -243,7 +244,7 @@ static int mwl_init_firmware(struct mwl_
  1334.  
  1335.  err_download_fw:
  1336.  
  1337. -#ifdef SUPPORT_MFG
  1338. +#ifdef CONFIG_SUPPORT_MFG
  1339.     if (priv->mfg_mode)
  1340.         mwl_mfg_release_firmware(priv);
  1341.     else
  1342. @@ -580,8 +581,8 @@ static int mwl_wl_init(struct mwl_priv *
  1343.     priv->qe_trigger_num = 0;
  1344.     priv->qe_trigger_time = jiffies;
  1345.  
  1346. -   mutex_init(&priv->fwcmd_mutex);
  1347.     spin_lock_init(&priv->tx_desc_lock);
  1348. +   spin_lock_init(&priv->fwcmd_lock);
  1349.     spin_lock_init(&priv->vif_lock);
  1350.     spin_lock_init(&priv->sta_lock);
  1351.     spin_lock_init(&priv->stream_lock);
  1352. @@ -767,7 +768,7 @@ static int mwl_probe(struct pci_dev *pde
  1353.  
  1354.     fw_name = mwl_chip_tbl[priv->chip_type].fw_image;
  1355.  
  1356. -#ifdef SUPPORT_MFG
  1357. +#ifdef CONFIG_SUPPORT_MFG
  1358.     if (mfg_mode)
  1359.         mwl_mfg_handler_init(priv);
  1360.  #endif
  1361. @@ -781,7 +782,7 @@ static int mwl_probe(struct pci_dev *pde
  1362.     }
  1363.  
  1364.     /* firmware is loaded to H/W, it can be released now */
  1365. -#ifdef SUPPORT_MFG
  1366. +#ifdef CONFIG_SUPPORT_MFG
  1367.     if (priv->mfg_mode)
  1368.         mwl_mfg_release_firmware(priv);
  1369.     else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement