aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.c')
-rw-r--r--drivers/net/wireless/mwifiex/main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index d235adb82c94..7e74b4fccddd 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -562,7 +562,8 @@ static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter)
562static int 562static int
563mwifiex_open(struct net_device *dev) 563mwifiex_open(struct net_device *dev)
564{ 564{
565 netif_tx_start_all_queues(dev); 565 netif_carrier_off(dev);
566
566 return 0; 567 return 0;
567} 568}
568 569
@@ -960,21 +961,21 @@ static const struct net_device_ops mwifiex_netdev_ops = {
960 * In addition, the CFG80211 work queue is also created. 961 * In addition, the CFG80211 work queue is also created.
961 */ 962 */
962void mwifiex_init_priv_params(struct mwifiex_private *priv, 963void mwifiex_init_priv_params(struct mwifiex_private *priv,
963 struct net_device *dev) 964 struct net_device *dev)
964{ 965{
965 dev->netdev_ops = &mwifiex_netdev_ops; 966 dev->netdev_ops = &mwifiex_netdev_ops;
966 dev->destructor = free_netdev; 967 dev->destructor = free_netdev;
967 /* Initialize private structure */ 968 /* Initialize private structure */
968 priv->current_key_index = 0; 969 priv->current_key_index = 0;
969 priv->media_connected = false; 970 priv->media_connected = false;
970 memset(&priv->nick_name, 0, sizeof(priv->nick_name));
971 memset(priv->mgmt_ie, 0, 971 memset(priv->mgmt_ie, 0,
972 sizeof(struct mwifiex_ie) * MAX_MGMT_IE_INDEX); 972 sizeof(struct mwifiex_ie) * MAX_MGMT_IE_INDEX);
973 priv->beacon_idx = MWIFIEX_AUTO_IDX_MASK; 973 priv->beacon_idx = MWIFIEX_AUTO_IDX_MASK;
974 priv->proberesp_idx = MWIFIEX_AUTO_IDX_MASK; 974 priv->proberesp_idx = MWIFIEX_AUTO_IDX_MASK;
975 priv->assocresp_idx = MWIFIEX_AUTO_IDX_MASK; 975 priv->assocresp_idx = MWIFIEX_AUTO_IDX_MASK;
976 priv->rsn_idx = MWIFIEX_AUTO_IDX_MASK; 976 priv->gen_idx = MWIFIEX_AUTO_IDX_MASK;
977 priv->num_tx_timeout = 0; 977 priv->num_tx_timeout = 0;
978 ether_addr_copy(priv->curr_addr, priv->adapter->perm_addr);
978 memcpy(dev->dev_addr, priv->curr_addr, ETH_ALEN); 979 memcpy(dev->dev_addr, priv->curr_addr, ETH_ALEN);
979 980
980 if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA || 981 if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA ||
@@ -1203,8 +1204,9 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
1203 continue; 1204 continue;
1204 1205
1205 rtnl_lock(); 1206 rtnl_lock();
1206 if (priv->wdev && priv->netdev) 1207 if (priv->netdev &&
1207 mwifiex_del_virtual_intf(adapter->wiphy, priv->wdev); 1208 priv->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED)
1209 mwifiex_del_virtual_intf(adapter->wiphy, &priv->wdev);
1208 rtnl_unlock(); 1210 rtnl_unlock();
1209 } 1211 }
1210 1212