Commit ddc9f824 authored by David S. Miller's avatar David S. Miller
parents ac7c992c c428c892
...@@ -424,7 +424,7 @@ ath5k_debug_dump_bands(struct ath5k_softc *sc) ...@@ -424,7 +424,7 @@ ath5k_debug_dump_bands(struct ath5k_softc *sc)
for (b = 0; b < IEEE80211_NUM_BANDS; b++) { for (b = 0; b < IEEE80211_NUM_BANDS; b++) {
struct ieee80211_supported_band *band = &sc->sbands[b]; struct ieee80211_supported_band *band = &sc->sbands[b];
char bname[5]; char bname[6];
switch (band->band) { switch (band->band) {
case IEEE80211_BAND_2GHZ: case IEEE80211_BAND_2GHZ:
strcpy(bname, "2 GHz"); strcpy(bname, "2 GHz");
......
...@@ -925,11 +925,11 @@ void iwl_bg_scan_completed(struct work_struct *work) ...@@ -925,11 +925,11 @@ void iwl_bg_scan_completed(struct work_struct *work)
IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");
ieee80211_scan_completed(priv->hw, false);
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return; return;
ieee80211_scan_completed(priv->hw, false);
/* Since setting the TXPOWER may have been deferred while /* Since setting the TXPOWER may have been deferred while
* performing the scan, fire one off */ * performing the scan, fire one off */
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
......
...@@ -1694,7 +1694,6 @@ void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq) ...@@ -1694,7 +1694,6 @@ void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
rxq->free_count = 0; rxq->free_count = 0;
spin_unlock_irqrestore(&rxq->lock, flags); spin_unlock_irqrestore(&rxq->lock, flags);
} }
EXPORT_SYMBOL(iwl3945_rx_queue_reset);
/* /*
* this should be called while priv->lock is locked * this should be called while priv->lock is locked
......
...@@ -2558,6 +2558,11 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf) ...@@ -2558,6 +2558,11 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)
mutex_init(&priv->command_lock); mutex_init(&priv->command_lock);
spin_lock_init(&priv->stats_lock); spin_lock_init(&priv->stats_lock);
/* because rndis_command() sleeps we need to use workqueue */
priv->workqueue = create_singlethread_workqueue("rndis_wlan");
INIT_WORK(&priv->work, rndis_wext_worker);
INIT_DELAYED_WORK(&priv->stats_work, rndis_update_wireless_stats);
/* try bind rndis_host */ /* try bind rndis_host */
retval = generic_rndis_bind(usbdev, intf, FLAG_RNDIS_PHYM_WIRELESS); retval = generic_rndis_bind(usbdev, intf, FLAG_RNDIS_PHYM_WIRELESS);
if (retval < 0) if (retval < 0)
...@@ -2603,16 +2608,17 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf) ...@@ -2603,16 +2608,17 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)
disassociate(usbdev, 1); disassociate(usbdev, 1);
netif_carrier_off(usbdev->net); netif_carrier_off(usbdev->net);
/* because rndis_command() sleeps we need to use workqueue */
priv->workqueue = create_singlethread_workqueue("rndis_wlan");
INIT_DELAYED_WORK(&priv->stats_work, rndis_update_wireless_stats);
queue_delayed_work(priv->workqueue, &priv->stats_work, queue_delayed_work(priv->workqueue, &priv->stats_work,
round_jiffies_relative(STATS_UPDATE_JIFFIES)); round_jiffies_relative(STATS_UPDATE_JIFFIES));
INIT_WORK(&priv->work, rndis_wext_worker);
return 0; return 0;
fail: fail:
cancel_delayed_work_sync(&priv->stats_work);
cancel_work_sync(&priv->work);
flush_workqueue(priv->workqueue);
destroy_workqueue(priv->workqueue);
kfree(priv); kfree(priv);
return retval; return retval;
} }
......
...@@ -757,6 +757,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, ...@@ -757,6 +757,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
local->hw.conf.long_frame_max_tx_count = 4; local->hw.conf.long_frame_max_tx_count = 4;
local->hw.conf.short_frame_max_tx_count = 7; local->hw.conf.short_frame_max_tx_count = 7;
local->hw.conf.radio_enabled = true; local->hw.conf.radio_enabled = true;
local->user_power_level = -1;
INIT_LIST_HEAD(&local->interfaces); INIT_LIST_HEAD(&local->interfaces);
mutex_init(&local->iflist_mtx); mutex_init(&local->iflist_mtx);
...@@ -909,6 +910,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -909,6 +910,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (result < 0) if (result < 0)
goto fail_sta_info; goto fail_sta_info;
result = ieee80211_wep_init(local);
if (result < 0) {
printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n",
wiphy_name(local->hw.wiphy), result);
goto fail_wep;
}
rtnl_lock(); rtnl_lock();
result = dev_alloc_name(local->mdev, local->mdev->name); result = dev_alloc_name(local->mdev, local->mdev->name);
if (result < 0) if (result < 0)
...@@ -930,14 +938,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -930,14 +938,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
goto fail_rate; goto fail_rate;
} }
result = ieee80211_wep_init(local);
if (result < 0) {
printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n",
wiphy_name(local->hw.wiphy), result);
goto fail_wep;
}
/* add one default STA interface if supported */ /* add one default STA interface if supported */
if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) { if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
result = ieee80211_if_add(local, "wlan%d", NULL, result = ieee80211_if_add(local, "wlan%d", NULL,
...@@ -967,13 +967,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -967,13 +967,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
return 0; return 0;
fail_wep:
rate_control_deinitialize(local);
fail_rate: fail_rate:
unregister_netdevice(local->mdev); unregister_netdevice(local->mdev);
local->mdev = NULL; local->mdev = NULL;
fail_dev: fail_dev:
rtnl_unlock(); rtnl_unlock();
ieee80211_wep_free(local);
fail_wep:
sta_info_stop(local); sta_info_stop(local);
fail_sta_info: fail_sta_info:
debugfs_hw_del(local); debugfs_hw_del(local);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment