diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-25 18:50:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-25 18:50:32 -0400 |
commit | e486463e82e4dca9e8f4413649088b21c9ff87e5 (patch) | |
tree | 3fb17b54454a101416c2b22e6b4ea5a027b3c02b /drivers/net/wireless/mwifiex | |
parent | ed3b856b69a7f3748d6917e42d462c962aaa39b8 (diff) | |
parent | fa809e2fd6e317226c046202a88520962672eac0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/qmi_wwan.c
net/batman-adv/translation-table.c
net/ipv6/route.c
qmi_wwan.c resolution provided by Bjørn Mork.
batman-adv conflict is dealing merely with the changes
of global function names to have a proper subsystem
prefix.
ipv6's route.c conflict is merely two side-by-side additions
of network namespace methods.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/txrx.c | 10 |
2 files changed, 14 insertions, 21 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 510397b3d4a8..80e9b2a39058 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -1484,7 +1484,7 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
1484 | struct wireless_dev *wdev; | 1484 | struct wireless_dev *wdev; |
1485 | 1485 | ||
1486 | if (!adapter) | 1486 | if (!adapter) |
1487 | return NULL; | 1487 | return ERR_PTR(-EFAULT); |
1488 | 1488 | ||
1489 | switch (type) { | 1489 | switch (type) { |
1490 | case NL80211_IFTYPE_UNSPECIFIED: | 1490 | case NL80211_IFTYPE_UNSPECIFIED: |
@@ -1494,12 +1494,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
1494 | if (priv->bss_mode) { | 1494 | if (priv->bss_mode) { |
1495 | wiphy_err(wiphy, | 1495 | wiphy_err(wiphy, |
1496 | "cannot create multiple sta/adhoc ifaces\n"); | 1496 | "cannot create multiple sta/adhoc ifaces\n"); |
1497 | return NULL; | 1497 | return ERR_PTR(-EINVAL); |
1498 | } | 1498 | } |
1499 | 1499 | ||
1500 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); | 1500 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); |
1501 | if (!wdev) | 1501 | if (!wdev) |
1502 | return NULL; | 1502 | return ERR_PTR(-ENOMEM); |
1503 | 1503 | ||
1504 | wdev->wiphy = wiphy; | 1504 | wdev->wiphy = wiphy; |
1505 | priv->wdev = wdev; | 1505 | priv->wdev = wdev; |
@@ -1522,12 +1522,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
1522 | 1522 | ||
1523 | if (priv->bss_mode) { | 1523 | if (priv->bss_mode) { |
1524 | wiphy_err(wiphy, "Can't create multiple AP interfaces"); | 1524 | wiphy_err(wiphy, "Can't create multiple AP interfaces"); |
1525 | return NULL; | 1525 | return ERR_PTR(-EINVAL); |
1526 | } | 1526 | } |
1527 | 1527 | ||
1528 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); | 1528 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); |
1529 | if (!wdev) | 1529 | if (!wdev) |
1530 | return NULL; | 1530 | return ERR_PTR(-ENOMEM); |
1531 | 1531 | ||
1532 | priv->wdev = wdev; | 1532 | priv->wdev = wdev; |
1533 | wdev->wiphy = wiphy; | 1533 | wdev->wiphy = wiphy; |
@@ -1544,14 +1544,15 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
1544 | break; | 1544 | break; |
1545 | default: | 1545 | default: |
1546 | wiphy_err(wiphy, "type not supported\n"); | 1546 | wiphy_err(wiphy, "type not supported\n"); |
1547 | return NULL; | 1547 | return ERR_PTR(-EINVAL); |
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name, | 1550 | dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name, |
1551 | ether_setup, 1); | 1551 | ether_setup, 1); |
1552 | if (!dev) { | 1552 | if (!dev) { |
1553 | wiphy_err(wiphy, "no memory available for netdevice\n"); | 1553 | wiphy_err(wiphy, "no memory available for netdevice\n"); |
1554 | goto error; | 1554 | priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; |
1555 | return ERR_PTR(-ENOMEM); | ||
1555 | } | 1556 | } |
1556 | 1557 | ||
1557 | mwifiex_init_priv_params(priv, dev); | 1558 | mwifiex_init_priv_params(priv, dev); |
@@ -1582,7 +1583,9 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
1582 | /* Register network device */ | 1583 | /* Register network device */ |
1583 | if (register_netdevice(dev)) { | 1584 | if (register_netdevice(dev)) { |
1584 | wiphy_err(wiphy, "cannot register virtual network device\n"); | 1585 | wiphy_err(wiphy, "cannot register virtual network device\n"); |
1585 | goto error; | 1586 | free_netdev(dev); |
1587 | priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; | ||
1588 | return ERR_PTR(-EFAULT); | ||
1586 | } | 1589 | } |
1587 | 1590 | ||
1588 | sema_init(&priv->async_sem, 1); | 1591 | sema_init(&priv->async_sem, 1); |
@@ -1594,12 +1597,6 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
1594 | mwifiex_dev_debugfs_init(priv); | 1597 | mwifiex_dev_debugfs_init(priv); |
1595 | #endif | 1598 | #endif |
1596 | return dev; | 1599 | return dev; |
1597 | error: | ||
1598 | if (dev && (dev->reg_state == NETREG_UNREGISTERED)) | ||
1599 | free_netdev(dev); | ||
1600 | priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; | ||
1601 | |||
1602 | return NULL; | ||
1603 | } | 1600 | } |
1604 | EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf); | 1601 | EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf); |
1605 | 1602 | ||
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index e2faec4db108..cecb27283196 100644 --- a/drivers/net/wireless/mwifiex/txrx.c +++ b/drivers/net/wireless/mwifiex/txrx.c | |||
@@ -161,15 +161,11 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter, | |||
161 | goto done; | 161 | goto done; |
162 | 162 | ||
163 | for (i = 0; i < adapter->priv_num; i++) { | 163 | for (i = 0; i < adapter->priv_num; i++) { |
164 | |||
165 | tpriv = adapter->priv[i]; | 164 | tpriv = adapter->priv[i]; |
166 | 165 | ||
167 | if ((GET_BSS_ROLE(tpriv) == MWIFIEX_BSS_ROLE_STA) && | 166 | if (tpriv->media_connected && |
168 | (tpriv->media_connected)) { | 167 | netif_queue_stopped(tpriv->netdev)) |
169 | if (netif_queue_stopped(tpriv->netdev)) | 168 | mwifiex_wake_up_net_dev_queue(tpriv->netdev, adapter); |
170 | mwifiex_wake_up_net_dev_queue(tpriv->netdev, | ||
171 | adapter); | ||
172 | } | ||
173 | } | 169 | } |
174 | done: | 170 | done: |
175 | dev_kfree_skb_any(skb); | 171 | dev_kfree_skb_any(skb); |