diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/wireless/ipw2x00 | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 84 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 243 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_module.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_rx.c | 2 |
6 files changed, 163 insertions, 180 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 996e9d7d7586..44307753587d 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -63,7 +63,7 @@ When data is sent to the firmware, the first TBD is used to indicate to the | |||
63 | firmware if a Command or Data is being sent. If it is Command, all of the | 63 | firmware if a Command or Data is being sent. If it is Command, all of the |
64 | command information is contained within the physical address referred to by the | 64 | command information is contained within the physical address referred to by the |
65 | TBD. If it is Data, the first TBD indicates the type of data packet, number | 65 | TBD. If it is Data, the first TBD indicates the type of data packet, number |
66 | of fragments, etc. The next TBD then referrs to the actual packet location. | 66 | of fragments, etc. The next TBD then refers to the actual packet location. |
67 | 67 | ||
68 | The Tx flow cycle is as follows: | 68 | The Tx flow cycle is as follows: |
69 | 69 | ||
@@ -706,11 +706,10 @@ static void schedule_reset(struct ipw2100_priv *priv) | |||
706 | netif_stop_queue(priv->net_dev); | 706 | netif_stop_queue(priv->net_dev); |
707 | priv->status |= STATUS_RESET_PENDING; | 707 | priv->status |= STATUS_RESET_PENDING; |
708 | if (priv->reset_backoff) | 708 | if (priv->reset_backoff) |
709 | queue_delayed_work(priv->workqueue, &priv->reset_work, | 709 | schedule_delayed_work(&priv->reset_work, |
710 | priv->reset_backoff * HZ); | 710 | priv->reset_backoff * HZ); |
711 | else | 711 | else |
712 | queue_delayed_work(priv->workqueue, &priv->reset_work, | 712 | schedule_delayed_work(&priv->reset_work, 0); |
713 | 0); | ||
714 | 713 | ||
715 | if (priv->reset_backoff < MAX_RESET_BACKOFF) | 714 | if (priv->reset_backoff < MAX_RESET_BACKOFF) |
716 | priv->reset_backoff++; | 715 | priv->reset_backoff++; |
@@ -1397,7 +1396,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv) | |||
1397 | } | 1396 | } |
1398 | 1397 | ||
1399 | /* | 1398 | /* |
1400 | * Send the CARD_DISABLE_PHY_OFF comamnd to the card to disable it | 1399 | * Send the CARD_DISABLE_PHY_OFF command to the card to disable it |
1401 | * | 1400 | * |
1402 | * After disabling, if the card was associated, a STATUS_ASSN_LOST will be sent. | 1401 | * After disabling, if the card was associated, a STATUS_ASSN_LOST will be sent. |
1403 | * | 1402 | * |
@@ -1474,7 +1473,7 @@ static int ipw2100_enable_adapter(struct ipw2100_priv *priv) | |||
1474 | 1473 | ||
1475 | if (priv->stop_hang_check) { | 1474 | if (priv->stop_hang_check) { |
1476 | priv->stop_hang_check = 0; | 1475 | priv->stop_hang_check = 0; |
1477 | queue_delayed_work(priv->workqueue, &priv->hang_check, HZ / 2); | 1476 | schedule_delayed_work(&priv->hang_check, HZ / 2); |
1478 | } | 1477 | } |
1479 | 1478 | ||
1480 | fail_up: | 1479 | fail_up: |
@@ -1808,8 +1807,8 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred) | |||
1808 | 1807 | ||
1809 | if (priv->stop_rf_kill) { | 1808 | if (priv->stop_rf_kill) { |
1810 | priv->stop_rf_kill = 0; | 1809 | priv->stop_rf_kill = 0; |
1811 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 1810 | schedule_delayed_work(&priv->rf_kill, |
1812 | round_jiffies_relative(HZ)); | 1811 | round_jiffies_relative(HZ)); |
1813 | } | 1812 | } |
1814 | 1813 | ||
1815 | deferred = 1; | 1814 | deferred = 1; |
@@ -1921,9 +1920,9 @@ static int ipw2100_net_init(struct net_device *dev) | |||
1921 | 1920 | ||
1922 | bg_band->band = IEEE80211_BAND_2GHZ; | 1921 | bg_band->band = IEEE80211_BAND_2GHZ; |
1923 | bg_band->n_channels = geo->bg_channels; | 1922 | bg_band->n_channels = geo->bg_channels; |
1924 | bg_band->channels = | 1923 | bg_band->channels = kcalloc(geo->bg_channels, |
1925 | kzalloc(geo->bg_channels * | 1924 | sizeof(struct ieee80211_channel), |
1926 | sizeof(struct ieee80211_channel), GFP_KERNEL); | 1925 | GFP_KERNEL); |
1927 | if (!bg_band->channels) { | 1926 | if (!bg_band->channels) { |
1928 | ipw2100_down(priv); | 1927 | ipw2100_down(priv); |
1929 | return -ENOMEM; | 1928 | return -ENOMEM; |
@@ -2086,7 +2085,7 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status) | |||
2086 | priv->status |= STATUS_ASSOCIATING; | 2085 | priv->status |= STATUS_ASSOCIATING; |
2087 | priv->connect_start = get_seconds(); | 2086 | priv->connect_start = get_seconds(); |
2088 | 2087 | ||
2089 | queue_delayed_work(priv->workqueue, &priv->wx_event_work, HZ / 10); | 2088 | schedule_delayed_work(&priv->wx_event_work, HZ / 10); |
2090 | } | 2089 | } |
2091 | 2090 | ||
2092 | static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid, | 2091 | static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid, |
@@ -2166,9 +2165,9 @@ static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status) | |||
2166 | return; | 2165 | return; |
2167 | 2166 | ||
2168 | if (priv->status & STATUS_SECURITY_UPDATED) | 2167 | if (priv->status & STATUS_SECURITY_UPDATED) |
2169 | queue_delayed_work(priv->workqueue, &priv->security_work, 0); | 2168 | schedule_delayed_work(&priv->security_work, 0); |
2170 | 2169 | ||
2171 | queue_delayed_work(priv->workqueue, &priv->wx_event_work, 0); | 2170 | schedule_delayed_work(&priv->wx_event_work, 0); |
2172 | } | 2171 | } |
2173 | 2172 | ||
2174 | static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) | 2173 | static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) |
@@ -2183,8 +2182,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) | |||
2183 | /* Make sure the RF Kill check timer is running */ | 2182 | /* Make sure the RF Kill check timer is running */ |
2184 | priv->stop_rf_kill = 0; | 2183 | priv->stop_rf_kill = 0; |
2185 | cancel_delayed_work(&priv->rf_kill); | 2184 | cancel_delayed_work(&priv->rf_kill); |
2186 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 2185 | schedule_delayed_work(&priv->rf_kill, round_jiffies_relative(HZ)); |
2187 | round_jiffies_relative(HZ)); | ||
2188 | } | 2186 | } |
2189 | 2187 | ||
2190 | static void send_scan_event(void *data) | 2188 | static void send_scan_event(void *data) |
@@ -2219,13 +2217,12 @@ static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) | |||
2219 | /* Only userspace-requested scan completion events go out immediately */ | 2217 | /* Only userspace-requested scan completion events go out immediately */ |
2220 | if (!priv->user_requested_scan) { | 2218 | if (!priv->user_requested_scan) { |
2221 | if (!delayed_work_pending(&priv->scan_event_later)) | 2219 | if (!delayed_work_pending(&priv->scan_event_later)) |
2222 | queue_delayed_work(priv->workqueue, | 2220 | schedule_delayed_work(&priv->scan_event_later, |
2223 | &priv->scan_event_later, | 2221 | round_jiffies_relative(msecs_to_jiffies(4000))); |
2224 | round_jiffies_relative(msecs_to_jiffies(4000))); | ||
2225 | } else { | 2222 | } else { |
2226 | priv->user_requested_scan = 0; | 2223 | priv->user_requested_scan = 0; |
2227 | cancel_delayed_work(&priv->scan_event_later); | 2224 | cancel_delayed_work(&priv->scan_event_later); |
2228 | queue_work(priv->workqueue, &priv->scan_event_now); | 2225 | schedule_work(&priv->scan_event_now); |
2229 | } | 2226 | } |
2230 | } | 2227 | } |
2231 | 2228 | ||
@@ -3056,9 +3053,9 @@ static void ipw2100_tx_send_commands(struct ipw2100_priv *priv) | |||
3056 | 3053 | ||
3057 | packet = list_entry(element, struct ipw2100_tx_packet, list); | 3054 | packet = list_entry(element, struct ipw2100_tx_packet, list); |
3058 | 3055 | ||
3059 | IPW_DEBUG_TX("using TBD at virt=%p, phys=%p\n", | 3056 | IPW_DEBUG_TX("using TBD at virt=%p, phys=%04X\n", |
3060 | &txq->drv[txq->next], | 3057 | &txq->drv[txq->next], |
3061 | (void *)(txq->nic + txq->next * | 3058 | (u32) (txq->nic + txq->next * |
3062 | sizeof(struct ipw2100_bd))); | 3059 | sizeof(struct ipw2100_bd))); |
3063 | 3060 | ||
3064 | packet->index = txq->next; | 3061 | packet->index = txq->next; |
@@ -4329,8 +4326,8 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio) | |||
4329 | /* Make sure the RF_KILL check timer is running */ | 4326 | /* Make sure the RF_KILL check timer is running */ |
4330 | priv->stop_rf_kill = 0; | 4327 | priv->stop_rf_kill = 0; |
4331 | cancel_delayed_work(&priv->rf_kill); | 4328 | cancel_delayed_work(&priv->rf_kill); |
4332 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 4329 | schedule_delayed_work(&priv->rf_kill, |
4333 | round_jiffies_relative(HZ)); | 4330 | round_jiffies_relative(HZ)); |
4334 | } else | 4331 | } else |
4335 | schedule_reset(priv); | 4332 | schedule_reset(priv); |
4336 | } | 4333 | } |
@@ -4461,20 +4458,17 @@ static void bd_queue_initialize(struct ipw2100_priv *priv, | |||
4461 | IPW_DEBUG_INFO("exit\n"); | 4458 | IPW_DEBUG_INFO("exit\n"); |
4462 | } | 4459 | } |
4463 | 4460 | ||
4464 | static void ipw2100_kill_workqueue(struct ipw2100_priv *priv) | 4461 | static void ipw2100_kill_works(struct ipw2100_priv *priv) |
4465 | { | 4462 | { |
4466 | if (priv->workqueue) { | 4463 | priv->stop_rf_kill = 1; |
4467 | priv->stop_rf_kill = 1; | 4464 | priv->stop_hang_check = 1; |
4468 | priv->stop_hang_check = 1; | 4465 | cancel_delayed_work_sync(&priv->reset_work); |
4469 | cancel_delayed_work(&priv->reset_work); | 4466 | cancel_delayed_work_sync(&priv->security_work); |
4470 | cancel_delayed_work(&priv->security_work); | 4467 | cancel_delayed_work_sync(&priv->wx_event_work); |
4471 | cancel_delayed_work(&priv->wx_event_work); | 4468 | cancel_delayed_work_sync(&priv->hang_check); |
4472 | cancel_delayed_work(&priv->hang_check); | 4469 | cancel_delayed_work_sync(&priv->rf_kill); |
4473 | cancel_delayed_work(&priv->rf_kill); | 4470 | cancel_work_sync(&priv->scan_event_now); |
4474 | cancel_delayed_work(&priv->scan_event_later); | 4471 | cancel_delayed_work_sync(&priv->scan_event_later); |
4475 | destroy_workqueue(priv->workqueue); | ||
4476 | priv->workqueue = NULL; | ||
4477 | } | ||
4478 | } | 4472 | } |
4479 | 4473 | ||
4480 | static int ipw2100_tx_allocate(struct ipw2100_priv *priv) | 4474 | static int ipw2100_tx_allocate(struct ipw2100_priv *priv) |
@@ -6046,7 +6040,7 @@ static void ipw2100_hang_check(struct work_struct *work) | |||
6046 | priv->last_rtc = rtc; | 6040 | priv->last_rtc = rtc; |
6047 | 6041 | ||
6048 | if (!priv->stop_hang_check) | 6042 | if (!priv->stop_hang_check) |
6049 | queue_delayed_work(priv->workqueue, &priv->hang_check, HZ / 2); | 6043 | schedule_delayed_work(&priv->hang_check, HZ / 2); |
6050 | 6044 | ||
6051 | spin_unlock_irqrestore(&priv->low_lock, flags); | 6045 | spin_unlock_irqrestore(&priv->low_lock, flags); |
6052 | } | 6046 | } |
@@ -6062,8 +6056,8 @@ static void ipw2100_rf_kill(struct work_struct *work) | |||
6062 | if (rf_kill_active(priv)) { | 6056 | if (rf_kill_active(priv)) { |
6063 | IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); | 6057 | IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); |
6064 | if (!priv->stop_rf_kill) | 6058 | if (!priv->stop_rf_kill) |
6065 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 6059 | schedule_delayed_work(&priv->rf_kill, |
6066 | round_jiffies_relative(HZ)); | 6060 | round_jiffies_relative(HZ)); |
6067 | goto exit_unlock; | 6061 | goto exit_unlock; |
6068 | } | 6062 | } |
6069 | 6063 | ||
@@ -6209,8 +6203,6 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | |||
6209 | INIT_LIST_HEAD(&priv->fw_pend_list); | 6203 | INIT_LIST_HEAD(&priv->fw_pend_list); |
6210 | INIT_STAT(&priv->fw_pend_stat); | 6204 | INIT_STAT(&priv->fw_pend_stat); |
6211 | 6205 | ||
6212 | priv->workqueue = create_workqueue(DRV_NAME); | ||
6213 | |||
6214 | INIT_DELAYED_WORK(&priv->reset_work, ipw2100_reset_adapter); | 6206 | INIT_DELAYED_WORK(&priv->reset_work, ipw2100_reset_adapter); |
6215 | INIT_DELAYED_WORK(&priv->security_work, ipw2100_security_work); | 6207 | INIT_DELAYED_WORK(&priv->security_work, ipw2100_security_work); |
6216 | INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); | 6208 | INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); |
@@ -6410,7 +6402,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, | |||
6410 | if (dev->irq) | 6402 | if (dev->irq) |
6411 | free_irq(dev->irq, priv); | 6403 | free_irq(dev->irq, priv); |
6412 | 6404 | ||
6413 | ipw2100_kill_workqueue(priv); | 6405 | ipw2100_kill_works(priv); |
6414 | 6406 | ||
6415 | /* These are safe to call even if they weren't allocated */ | 6407 | /* These are safe to call even if they weren't allocated */ |
6416 | ipw2100_queues_free(priv); | 6408 | ipw2100_queues_free(priv); |
@@ -6460,9 +6452,7 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev) | |||
6460 | * first, then close() will crash. */ | 6452 | * first, then close() will crash. */ |
6461 | unregister_netdev(dev); | 6453 | unregister_netdev(dev); |
6462 | 6454 | ||
6463 | /* ipw2100_down will ensure that there is no more pending work | 6455 | ipw2100_kill_works(priv); |
6464 | * in the workqueue's, so we can safely remove them now. */ | ||
6465 | ipw2100_kill_workqueue(priv); | ||
6466 | 6456 | ||
6467 | ipw2100_queues_free(priv); | 6457 | ipw2100_queues_free(priv); |
6468 | 6458 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.h b/drivers/net/wireless/ipw2x00/ipw2100.h index 838002b4881e..99cba968aa58 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.h +++ b/drivers/net/wireless/ipw2x00/ipw2100.h | |||
@@ -580,7 +580,6 @@ struct ipw2100_priv { | |||
580 | 580 | ||
581 | struct tasklet_struct irq_tasklet; | 581 | struct tasklet_struct irq_tasklet; |
582 | 582 | ||
583 | struct workqueue_struct *workqueue; | ||
584 | struct delayed_work reset_work; | 583 | struct delayed_work reset_work; |
585 | struct delayed_work security_work; | 584 | struct delayed_work security_work; |
586 | struct delayed_work wx_event_work; | 585 | struct delayed_work wx_event_work; |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index cb2552a6777c..87813c33bdc2 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -894,9 +894,8 @@ static void ipw_led_link_on(struct ipw_priv *priv) | |||
894 | 894 | ||
895 | /* If we aren't associated, schedule turning the LED off */ | 895 | /* If we aren't associated, schedule turning the LED off */ |
896 | if (!(priv->status & STATUS_ASSOCIATED)) | 896 | if (!(priv->status & STATUS_ASSOCIATED)) |
897 | queue_delayed_work(priv->workqueue, | 897 | schedule_delayed_work(&priv->led_link_off, |
898 | &priv->led_link_off, | 898 | LD_TIME_LINK_ON); |
899 | LD_TIME_LINK_ON); | ||
900 | } | 899 | } |
901 | 900 | ||
902 | spin_unlock_irqrestore(&priv->lock, flags); | 901 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -939,8 +938,8 @@ static void ipw_led_link_off(struct ipw_priv *priv) | |||
939 | * turning the LED on (blink while unassociated) */ | 938 | * turning the LED on (blink while unassociated) */ |
940 | if (!(priv->status & STATUS_RF_KILL_MASK) && | 939 | if (!(priv->status & STATUS_RF_KILL_MASK) && |
941 | !(priv->status & STATUS_ASSOCIATED)) | 940 | !(priv->status & STATUS_ASSOCIATED)) |
942 | queue_delayed_work(priv->workqueue, &priv->led_link_on, | 941 | schedule_delayed_work(&priv->led_link_on, |
943 | LD_TIME_LINK_OFF); | 942 | LD_TIME_LINK_OFF); |
944 | 943 | ||
945 | } | 944 | } |
946 | 945 | ||
@@ -980,13 +979,11 @@ static void __ipw_led_activity_on(struct ipw_priv *priv) | |||
980 | priv->status |= STATUS_LED_ACT_ON; | 979 | priv->status |= STATUS_LED_ACT_ON; |
981 | 980 | ||
982 | cancel_delayed_work(&priv->led_act_off); | 981 | cancel_delayed_work(&priv->led_act_off); |
983 | queue_delayed_work(priv->workqueue, &priv->led_act_off, | 982 | schedule_delayed_work(&priv->led_act_off, LD_TIME_ACT_ON); |
984 | LD_TIME_ACT_ON); | ||
985 | } else { | 983 | } else { |
986 | /* Reschedule LED off for full time period */ | 984 | /* Reschedule LED off for full time period */ |
987 | cancel_delayed_work(&priv->led_act_off); | 985 | cancel_delayed_work(&priv->led_act_off); |
988 | queue_delayed_work(priv->workqueue, &priv->led_act_off, | 986 | schedule_delayed_work(&priv->led_act_off, LD_TIME_ACT_ON); |
989 | LD_TIME_ACT_ON); | ||
990 | } | 987 | } |
991 | } | 988 | } |
992 | 989 | ||
@@ -1184,7 +1181,7 @@ static void ipw_led_shutdown(struct ipw_priv *priv) | |||
1184 | /* | 1181 | /* |
1185 | * The following adds a new attribute to the sysfs representation | 1182 | * The following adds a new attribute to the sysfs representation |
1186 | * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/) | 1183 | * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/) |
1187 | * used for controling the debug level. | 1184 | * used for controlling the debug level. |
1188 | * | 1185 | * |
1189 | * See the level definitions in ipw for details. | 1186 | * See the level definitions in ipw for details. |
1190 | */ | 1187 | */ |
@@ -1795,13 +1792,11 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio) | |||
1795 | if (disable_radio) { | 1792 | if (disable_radio) { |
1796 | priv->status |= STATUS_RF_KILL_SW; | 1793 | priv->status |= STATUS_RF_KILL_SW; |
1797 | 1794 | ||
1798 | if (priv->workqueue) { | 1795 | cancel_delayed_work(&priv->request_scan); |
1799 | cancel_delayed_work(&priv->request_scan); | 1796 | cancel_delayed_work(&priv->request_direct_scan); |
1800 | cancel_delayed_work(&priv->request_direct_scan); | 1797 | cancel_delayed_work(&priv->request_passive_scan); |
1801 | cancel_delayed_work(&priv->request_passive_scan); | 1798 | cancel_delayed_work(&priv->scan_event); |
1802 | cancel_delayed_work(&priv->scan_event); | 1799 | schedule_work(&priv->down); |
1803 | } | ||
1804 | queue_work(priv->workqueue, &priv->down); | ||
1805 | } else { | 1800 | } else { |
1806 | priv->status &= ~STATUS_RF_KILL_SW; | 1801 | priv->status &= ~STATUS_RF_KILL_SW; |
1807 | if (rf_kill_active(priv)) { | 1802 | if (rf_kill_active(priv)) { |
@@ -1809,10 +1804,10 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio) | |||
1809 | "disabled by HW switch\n"); | 1804 | "disabled by HW switch\n"); |
1810 | /* Make sure the RF_KILL check timer is running */ | 1805 | /* Make sure the RF_KILL check timer is running */ |
1811 | cancel_delayed_work(&priv->rf_kill); | 1806 | cancel_delayed_work(&priv->rf_kill); |
1812 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 1807 | schedule_delayed_work(&priv->rf_kill, |
1813 | round_jiffies_relative(2 * HZ)); | 1808 | round_jiffies_relative(2 * HZ)); |
1814 | } else | 1809 | } else |
1815 | queue_work(priv->workqueue, &priv->up); | 1810 | schedule_work(&priv->up); |
1816 | } | 1811 | } |
1817 | 1812 | ||
1818 | return 1; | 1813 | return 1; |
@@ -1973,6 +1968,13 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) | |||
1973 | 1968 | ||
1974 | inta = ipw_read32(priv, IPW_INTA_RW); | 1969 | inta = ipw_read32(priv, IPW_INTA_RW); |
1975 | inta_mask = ipw_read32(priv, IPW_INTA_MASK_R); | 1970 | inta_mask = ipw_read32(priv, IPW_INTA_MASK_R); |
1971 | |||
1972 | if (inta == 0xFFFFFFFF) { | ||
1973 | /* Hardware disappeared */ | ||
1974 | IPW_WARNING("TASKLET INTA == 0xFFFFFFFF\n"); | ||
1975 | /* Only handle the cached INTA values */ | ||
1976 | inta = 0; | ||
1977 | } | ||
1976 | inta &= (IPW_INTA_MASK_ALL & inta_mask); | 1978 | inta &= (IPW_INTA_MASK_ALL & inta_mask); |
1977 | 1979 | ||
1978 | /* Add any cached INTA values that need to be handled */ | 1980 | /* Add any cached INTA values that need to be handled */ |
@@ -2056,7 +2058,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) | |||
2056 | cancel_delayed_work(&priv->request_passive_scan); | 2058 | cancel_delayed_work(&priv->request_passive_scan); |
2057 | cancel_delayed_work(&priv->scan_event); | 2059 | cancel_delayed_work(&priv->scan_event); |
2058 | schedule_work(&priv->link_down); | 2060 | schedule_work(&priv->link_down); |
2059 | queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ); | 2061 | schedule_delayed_work(&priv->rf_kill, 2 * HZ); |
2060 | handled |= IPW_INTA_BIT_RF_KILL_DONE; | 2062 | handled |= IPW_INTA_BIT_RF_KILL_DONE; |
2061 | } | 2063 | } |
2062 | 2064 | ||
@@ -2096,7 +2098,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) | |||
2096 | priv->status &= ~STATUS_HCMD_ACTIVE; | 2098 | priv->status &= ~STATUS_HCMD_ACTIVE; |
2097 | wake_up_interruptible(&priv->wait_command_queue); | 2099 | wake_up_interruptible(&priv->wait_command_queue); |
2098 | 2100 | ||
2099 | queue_work(priv->workqueue, &priv->adapter_restart); | 2101 | schedule_work(&priv->adapter_restart); |
2100 | handled |= IPW_INTA_BIT_FATAL_ERROR; | 2102 | handled |= IPW_INTA_BIT_FATAL_ERROR; |
2101 | } | 2103 | } |
2102 | 2104 | ||
@@ -2316,11 +2318,6 @@ static int ipw_send_adapter_address(struct ipw_priv *priv, u8 * mac) | |||
2316 | return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac); | 2318 | return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac); |
2317 | } | 2319 | } |
2318 | 2320 | ||
2319 | /* | ||
2320 | * NOTE: This must be executed from our workqueue as it results in udelay | ||
2321 | * being called which may corrupt the keyboard if executed on default | ||
2322 | * workqueue | ||
2323 | */ | ||
2324 | static void ipw_adapter_restart(void *adapter) | 2321 | static void ipw_adapter_restart(void *adapter) |
2325 | { | 2322 | { |
2326 | struct ipw_priv *priv = adapter; | 2323 | struct ipw_priv *priv = adapter; |
@@ -2361,13 +2358,13 @@ static void ipw_scan_check(void *data) | |||
2361 | IPW_DEBUG_SCAN("Scan completion watchdog resetting " | 2358 | IPW_DEBUG_SCAN("Scan completion watchdog resetting " |
2362 | "adapter after (%dms).\n", | 2359 | "adapter after (%dms).\n", |
2363 | jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); | 2360 | jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); |
2364 | queue_work(priv->workqueue, &priv->adapter_restart); | 2361 | schedule_work(&priv->adapter_restart); |
2365 | } else if (priv->status & STATUS_SCANNING) { | 2362 | } else if (priv->status & STATUS_SCANNING) { |
2366 | IPW_DEBUG_SCAN("Scan completion watchdog aborting scan " | 2363 | IPW_DEBUG_SCAN("Scan completion watchdog aborting scan " |
2367 | "after (%dms).\n", | 2364 | "after (%dms).\n", |
2368 | jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); | 2365 | jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); |
2369 | ipw_abort_scan(priv); | 2366 | ipw_abort_scan(priv); |
2370 | queue_delayed_work(priv->workqueue, &priv->scan_check, HZ); | 2367 | schedule_delayed_work(&priv->scan_check, HZ); |
2371 | } | 2368 | } |
2372 | } | 2369 | } |
2373 | 2370 | ||
@@ -3766,7 +3763,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv, | |||
3766 | 3763 | ||
3767 | q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL); | 3764 | q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL); |
3768 | if (!q->txb) { | 3765 | if (!q->txb) { |
3769 | IPW_ERROR("vmalloc for auxilary BD structures failed\n"); | 3766 | IPW_ERROR("vmalloc for auxiliary BD structures failed\n"); |
3770 | return -ENOMEM; | 3767 | return -ENOMEM; |
3771 | } | 3768 | } |
3772 | 3769 | ||
@@ -3936,7 +3933,7 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) | |||
3936 | 3933 | ||
3937 | if (priv->status & STATUS_ASSOCIATING) { | 3934 | if (priv->status & STATUS_ASSOCIATING) { |
3938 | IPW_DEBUG_ASSOC("Disassociating while associating.\n"); | 3935 | IPW_DEBUG_ASSOC("Disassociating while associating.\n"); |
3939 | queue_work(priv->workqueue, &priv->disassociate); | 3936 | schedule_work(&priv->disassociate); |
3940 | return; | 3937 | return; |
3941 | } | 3938 | } |
3942 | 3939 | ||
@@ -4353,8 +4350,7 @@ static void ipw_gather_stats(struct ipw_priv *priv) | |||
4353 | 4350 | ||
4354 | priv->quality = quality; | 4351 | priv->quality = quality; |
4355 | 4352 | ||
4356 | queue_delayed_work(priv->workqueue, &priv->gather_stats, | 4353 | schedule_delayed_work(&priv->gather_stats, IPW_STATS_INTERVAL); |
4357 | IPW_STATS_INTERVAL); | ||
4358 | } | 4354 | } |
4359 | 4355 | ||
4360 | static void ipw_bg_gather_stats(struct work_struct *work) | 4356 | static void ipw_bg_gather_stats(struct work_struct *work) |
@@ -4389,10 +4385,10 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, | |||
4389 | IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | | 4385 | IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | |
4390 | IPW_DL_STATE, | 4386 | IPW_DL_STATE, |
4391 | "Aborting scan with missed beacon.\n"); | 4387 | "Aborting scan with missed beacon.\n"); |
4392 | queue_work(priv->workqueue, &priv->abort_scan); | 4388 | schedule_work(&priv->abort_scan); |
4393 | } | 4389 | } |
4394 | 4390 | ||
4395 | queue_work(priv->workqueue, &priv->disassociate); | 4391 | schedule_work(&priv->disassociate); |
4396 | return; | 4392 | return; |
4397 | } | 4393 | } |
4398 | 4394 | ||
@@ -4418,8 +4414,7 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, | |||
4418 | if (!(priv->status & STATUS_ROAMING)) { | 4414 | if (!(priv->status & STATUS_ROAMING)) { |
4419 | priv->status |= STATUS_ROAMING; | 4415 | priv->status |= STATUS_ROAMING; |
4420 | if (!(priv->status & STATUS_SCANNING)) | 4416 | if (!(priv->status & STATUS_SCANNING)) |
4421 | queue_delayed_work(priv->workqueue, | 4417 | schedule_delayed_work(&priv->request_scan, 0); |
4422 | &priv->request_scan, 0); | ||
4423 | } | 4418 | } |
4424 | return; | 4419 | return; |
4425 | } | 4420 | } |
@@ -4432,7 +4427,7 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, | |||
4432 | * channels..) */ | 4427 | * channels..) */ |
4433 | IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | IPW_DL_STATE, | 4428 | IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | IPW_DL_STATE, |
4434 | "Aborting scan with missed beacon.\n"); | 4429 | "Aborting scan with missed beacon.\n"); |
4435 | queue_work(priv->workqueue, &priv->abort_scan); | 4430 | schedule_work(&priv->abort_scan); |
4436 | } | 4431 | } |
4437 | 4432 | ||
4438 | IPW_DEBUG_NOTIF("Missed beacon: %d\n", missed_count); | 4433 | IPW_DEBUG_NOTIF("Missed beacon: %d\n", missed_count); |
@@ -4455,8 +4450,8 @@ static void handle_scan_event(struct ipw_priv *priv) | |||
4455 | /* Only userspace-requested scan completion events go out immediately */ | 4450 | /* Only userspace-requested scan completion events go out immediately */ |
4456 | if (!priv->user_requested_scan) { | 4451 | if (!priv->user_requested_scan) { |
4457 | if (!delayed_work_pending(&priv->scan_event)) | 4452 | if (!delayed_work_pending(&priv->scan_event)) |
4458 | queue_delayed_work(priv->workqueue, &priv->scan_event, | 4453 | schedule_delayed_work(&priv->scan_event, |
4459 | round_jiffies_relative(msecs_to_jiffies(4000))); | 4454 | round_jiffies_relative(msecs_to_jiffies(4000))); |
4460 | } else { | 4455 | } else { |
4461 | union iwreq_data wrqu; | 4456 | union iwreq_data wrqu; |
4462 | 4457 | ||
@@ -4509,20 +4504,17 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4509 | 4504 | ||
4510 | IPW_DEBUG_ASSOC | 4505 | IPW_DEBUG_ASSOC |
4511 | ("queueing adhoc check\n"); | 4506 | ("queueing adhoc check\n"); |
4512 | queue_delayed_work(priv-> | 4507 | schedule_delayed_work( |
4513 | workqueue, | 4508 | &priv->adhoc_check, |
4514 | &priv-> | 4509 | le16_to_cpu(priv-> |
4515 | adhoc_check, | 4510 | assoc_request. |
4516 | le16_to_cpu(priv-> | 4511 | beacon_interval)); |
4517 | assoc_request. | ||
4518 | beacon_interval)); | ||
4519 | break; | 4512 | break; |
4520 | } | 4513 | } |
4521 | 4514 | ||
4522 | priv->status &= ~STATUS_ASSOCIATING; | 4515 | priv->status &= ~STATUS_ASSOCIATING; |
4523 | priv->status |= STATUS_ASSOCIATED; | 4516 | priv->status |= STATUS_ASSOCIATED; |
4524 | queue_work(priv->workqueue, | 4517 | schedule_work(&priv->system_config); |
4525 | &priv->system_config); | ||
4526 | 4518 | ||
4527 | #ifdef CONFIG_IPW2200_QOS | 4519 | #ifdef CONFIG_IPW2200_QOS |
4528 | #define IPW_GET_PACKET_STYPE(x) WLAN_FC_GET_STYPE( \ | 4520 | #define IPW_GET_PACKET_STYPE(x) WLAN_FC_GET_STYPE( \ |
@@ -4785,43 +4777,37 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4785 | #ifdef CONFIG_IPW2200_MONITOR | 4777 | #ifdef CONFIG_IPW2200_MONITOR |
4786 | if (priv->ieee->iw_mode == IW_MODE_MONITOR) { | 4778 | if (priv->ieee->iw_mode == IW_MODE_MONITOR) { |
4787 | priv->status |= STATUS_SCAN_FORCED; | 4779 | priv->status |= STATUS_SCAN_FORCED; |
4788 | queue_delayed_work(priv->workqueue, | 4780 | schedule_delayed_work(&priv->request_scan, 0); |
4789 | &priv->request_scan, 0); | ||
4790 | break; | 4781 | break; |
4791 | } | 4782 | } |
4792 | priv->status &= ~STATUS_SCAN_FORCED; | 4783 | priv->status &= ~STATUS_SCAN_FORCED; |
4793 | #endif /* CONFIG_IPW2200_MONITOR */ | 4784 | #endif /* CONFIG_IPW2200_MONITOR */ |
4794 | 4785 | ||
4795 | /* Do queued direct scans first */ | 4786 | /* Do queued direct scans first */ |
4796 | if (priv->status & STATUS_DIRECT_SCAN_PENDING) { | 4787 | if (priv->status & STATUS_DIRECT_SCAN_PENDING) |
4797 | queue_delayed_work(priv->workqueue, | 4788 | schedule_delayed_work(&priv->request_direct_scan, 0); |
4798 | &priv->request_direct_scan, 0); | ||
4799 | } | ||
4800 | 4789 | ||
4801 | if (!(priv->status & (STATUS_ASSOCIATED | | 4790 | if (!(priv->status & (STATUS_ASSOCIATED | |
4802 | STATUS_ASSOCIATING | | 4791 | STATUS_ASSOCIATING | |
4803 | STATUS_ROAMING | | 4792 | STATUS_ROAMING | |
4804 | STATUS_DISASSOCIATING))) | 4793 | STATUS_DISASSOCIATING))) |
4805 | queue_work(priv->workqueue, &priv->associate); | 4794 | schedule_work(&priv->associate); |
4806 | else if (priv->status & STATUS_ROAMING) { | 4795 | else if (priv->status & STATUS_ROAMING) { |
4807 | if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) | 4796 | if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) |
4808 | /* If a scan completed and we are in roam mode, then | 4797 | /* If a scan completed and we are in roam mode, then |
4809 | * the scan that completed was the one requested as a | 4798 | * the scan that completed was the one requested as a |
4810 | * result of entering roam... so, schedule the | 4799 | * result of entering roam... so, schedule the |
4811 | * roam work */ | 4800 | * roam work */ |
4812 | queue_work(priv->workqueue, | 4801 | schedule_work(&priv->roam); |
4813 | &priv->roam); | ||
4814 | else | 4802 | else |
4815 | /* Don't schedule if we aborted the scan */ | 4803 | /* Don't schedule if we aborted the scan */ |
4816 | priv->status &= ~STATUS_ROAMING; | 4804 | priv->status &= ~STATUS_ROAMING; |
4817 | } else if (priv->status & STATUS_SCAN_PENDING) | 4805 | } else if (priv->status & STATUS_SCAN_PENDING) |
4818 | queue_delayed_work(priv->workqueue, | 4806 | schedule_delayed_work(&priv->request_scan, 0); |
4819 | &priv->request_scan, 0); | ||
4820 | else if (priv->config & CFG_BACKGROUND_SCAN | 4807 | else if (priv->config & CFG_BACKGROUND_SCAN |
4821 | && priv->status & STATUS_ASSOCIATED) | 4808 | && priv->status & STATUS_ASSOCIATED) |
4822 | queue_delayed_work(priv->workqueue, | 4809 | schedule_delayed_work(&priv->request_scan, |
4823 | &priv->request_scan, | 4810 | round_jiffies_relative(HZ)); |
4824 | round_jiffies_relative(HZ)); | ||
4825 | 4811 | ||
4826 | /* Send an empty event to user space. | 4812 | /* Send an empty event to user space. |
4827 | * We don't send the received data on the event because | 4813 | * We don't send the received data on the event because |
@@ -5185,7 +5171,7 @@ static void ipw_rx_queue_restock(struct ipw_priv *priv) | |||
5185 | /* If the pre-allocated buffer pool is dropping low, schedule to | 5171 | /* If the pre-allocated buffer pool is dropping low, schedule to |
5186 | * refill it */ | 5172 | * refill it */ |
5187 | if (rxq->free_count <= RX_LOW_WATERMARK) | 5173 | if (rxq->free_count <= RX_LOW_WATERMARK) |
5188 | queue_work(priv->workqueue, &priv->rx_replenish); | 5174 | schedule_work(&priv->rx_replenish); |
5189 | 5175 | ||
5190 | /* If we've added more space for the firmware to place data, tell it */ | 5176 | /* If we've added more space for the firmware to place data, tell it */ |
5191 | if (write != rxq->write) | 5177 | if (write != rxq->write) |
@@ -5595,7 +5581,7 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv, | |||
5595 | return 0; | 5581 | return 0; |
5596 | } | 5582 | } |
5597 | 5583 | ||
5598 | /* Verify privacy compatability */ | 5584 | /* Verify privacy compatibility */ |
5599 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != | 5585 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != |
5600 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { | 5586 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { |
5601 | IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " | 5587 | IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " |
@@ -5822,7 +5808,7 @@ static int ipw_best_network(struct ipw_priv *priv, | |||
5822 | return 0; | 5808 | return 0; |
5823 | } | 5809 | } |
5824 | 5810 | ||
5825 | /* Verify privacy compatability */ | 5811 | /* Verify privacy compatibility */ |
5826 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != | 5812 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != |
5827 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { | 5813 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { |
5828 | IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " | 5814 | IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " |
@@ -6126,8 +6112,8 @@ static void ipw_adhoc_check(void *data) | |||
6126 | return; | 6112 | return; |
6127 | } | 6113 | } |
6128 | 6114 | ||
6129 | queue_delayed_work(priv->workqueue, &priv->adhoc_check, | 6115 | schedule_delayed_work(&priv->adhoc_check, |
6130 | le16_to_cpu(priv->assoc_request.beacon_interval)); | 6116 | le16_to_cpu(priv->assoc_request.beacon_interval)); |
6131 | } | 6117 | } |
6132 | 6118 | ||
6133 | static void ipw_bg_adhoc_check(struct work_struct *work) | 6119 | static void ipw_bg_adhoc_check(struct work_struct *work) |
@@ -6516,8 +6502,7 @@ send_request: | |||
6516 | } else | 6502 | } else |
6517 | priv->status &= ~STATUS_SCAN_PENDING; | 6503 | priv->status &= ~STATUS_SCAN_PENDING; |
6518 | 6504 | ||
6519 | queue_delayed_work(priv->workqueue, &priv->scan_check, | 6505 | schedule_delayed_work(&priv->scan_check, IPW_SCAN_CHECK_WATCHDOG); |
6520 | IPW_SCAN_CHECK_WATCHDOG); | ||
6521 | done: | 6506 | done: |
6522 | mutex_unlock(&priv->mutex); | 6507 | mutex_unlock(&priv->mutex); |
6523 | return err; | 6508 | return err; |
@@ -6987,8 +6972,7 @@ static int ipw_qos_handle_probe_response(struct ipw_priv *priv, | |||
6987 | !memcmp(network->ssid, | 6972 | !memcmp(network->ssid, |
6988 | priv->assoc_network->ssid, | 6973 | priv->assoc_network->ssid, |
6989 | network->ssid_len)) { | 6974 | network->ssid_len)) { |
6990 | queue_work(priv->workqueue, | 6975 | schedule_work(&priv->merge_networks); |
6991 | &priv->merge_networks); | ||
6992 | } | 6976 | } |
6993 | } | 6977 | } |
6994 | 6978 | ||
@@ -7446,7 +7430,7 @@ static int ipw_associate_network(struct ipw_priv *priv, | |||
7446 | priv->assoc_request.capability &= | 7430 | priv->assoc_request.capability &= |
7447 | ~cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME); | 7431 | ~cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME); |
7448 | 7432 | ||
7449 | IPW_DEBUG_ASSOC("%sssocation attempt: '%s', channel %d, " | 7433 | IPW_DEBUG_ASSOC("%ssociation attempt: '%s', channel %d, " |
7450 | "802.11%c [%d], %s[:%s], enc=%s%s%s%c%c\n", | 7434 | "802.11%c [%d], %s[:%s], enc=%s%s%s%c%c\n", |
7451 | roaming ? "Rea" : "A", | 7435 | roaming ? "Rea" : "A", |
7452 | print_ssid(ssid, priv->essid, priv->essid_len), | 7436 | print_ssid(ssid, priv->essid, priv->essid_len), |
@@ -7656,7 +7640,7 @@ static int ipw_associate(void *data) | |||
7656 | if (priv->status & STATUS_DISASSOCIATING) { | 7640 | if (priv->status & STATUS_DISASSOCIATING) { |
7657 | IPW_DEBUG_ASSOC("Not attempting association (in " | 7641 | IPW_DEBUG_ASSOC("Not attempting association (in " |
7658 | "disassociating)\n "); | 7642 | "disassociating)\n "); |
7659 | queue_work(priv->workqueue, &priv->associate); | 7643 | schedule_work(&priv->associate); |
7660 | return 0; | 7644 | return 0; |
7661 | } | 7645 | } |
7662 | 7646 | ||
@@ -7724,12 +7708,10 @@ static int ipw_associate(void *data) | |||
7724 | 7708 | ||
7725 | if (!(priv->status & STATUS_SCANNING)) { | 7709 | if (!(priv->status & STATUS_SCANNING)) { |
7726 | if (!(priv->config & CFG_SPEED_SCAN)) | 7710 | if (!(priv->config & CFG_SPEED_SCAN)) |
7727 | queue_delayed_work(priv->workqueue, | 7711 | schedule_delayed_work(&priv->request_scan, |
7728 | &priv->request_scan, | 7712 | SCAN_INTERVAL); |
7729 | SCAN_INTERVAL); | ||
7730 | else | 7713 | else |
7731 | queue_delayed_work(priv->workqueue, | 7714 | schedule_delayed_work(&priv->request_scan, 0); |
7732 | &priv->request_scan, 0); | ||
7733 | } | 7715 | } |
7734 | 7716 | ||
7735 | return 0; | 7717 | return 0; |
@@ -8202,7 +8184,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv, | |||
8202 | static int is_network_packet(struct ipw_priv *priv, | 8184 | static int is_network_packet(struct ipw_priv *priv, |
8203 | struct libipw_hdr_4addr *header) | 8185 | struct libipw_hdr_4addr *header) |
8204 | { | 8186 | { |
8205 | /* Filter incoming packets to determine if they are targetted toward | 8187 | /* Filter incoming packets to determine if they are targeted toward |
8206 | * this network, discarding packets coming from ourselves */ | 8188 | * this network, discarding packets coming from ourselves */ |
8207 | switch (priv->ieee->iw_mode) { | 8189 | switch (priv->ieee->iw_mode) { |
8208 | case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ | 8190 | case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ |
@@ -8358,9 +8340,9 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv, | |||
8358 | } | 8340 | } |
8359 | 8341 | ||
8360 | /* | 8342 | /* |
8361 | * Main entry function for recieving a packet with 80211 headers. This | 8343 | * Main entry function for receiving a packet with 80211 headers. This |
8362 | * should be called when ever the FW has notified us that there is a new | 8344 | * should be called when ever the FW has notified us that there is a new |
8363 | * skb in the recieve queue. | 8345 | * skb in the receive queue. |
8364 | */ | 8346 | */ |
8365 | static void ipw_rx(struct ipw_priv *priv) | 8347 | static void ipw_rx(struct ipw_priv *priv) |
8366 | { | 8348 | { |
@@ -8701,7 +8683,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) | |||
8701 | * functions defined in ipw_main to provide the HW interaction. | 8683 | * functions defined in ipw_main to provide the HW interaction. |
8702 | * | 8684 | * |
8703 | * The exception to this is the use of the ipw_get_ordinal() | 8685 | * The exception to this is the use of the ipw_get_ordinal() |
8704 | * function used to poll the hardware vs. making unecessary calls. | 8686 | * function used to poll the hardware vs. making unnecessary calls. |
8705 | * | 8687 | * |
8706 | */ | 8688 | */ |
8707 | 8689 | ||
@@ -8892,7 +8874,7 @@ static int ipw_wx_set_mode(struct net_device *dev, | |||
8892 | 8874 | ||
8893 | priv->ieee->iw_mode = wrqu->mode; | 8875 | priv->ieee->iw_mode = wrqu->mode; |
8894 | 8876 | ||
8895 | queue_work(priv->workqueue, &priv->adapter_restart); | 8877 | schedule_work(&priv->adapter_restart); |
8896 | mutex_unlock(&priv->mutex); | 8878 | mutex_unlock(&priv->mutex); |
8897 | return err; | 8879 | return err; |
8898 | } | 8880 | } |
@@ -9591,7 +9573,7 @@ static int ipw_wx_set_scan(struct net_device *dev, | |||
9591 | 9573 | ||
9592 | IPW_DEBUG_WX("Start scan\n"); | 9574 | IPW_DEBUG_WX("Start scan\n"); |
9593 | 9575 | ||
9594 | queue_delayed_work(priv->workqueue, work, 0); | 9576 | schedule_delayed_work(work, 0); |
9595 | 9577 | ||
9596 | return 0; | 9578 | return 0; |
9597 | } | 9579 | } |
@@ -9930,7 +9912,7 @@ static int ipw_wx_set_monitor(struct net_device *dev, | |||
9930 | #else | 9912 | #else |
9931 | priv->net_dev->type = ARPHRD_IEEE80211; | 9913 | priv->net_dev->type = ARPHRD_IEEE80211; |
9932 | #endif | 9914 | #endif |
9933 | queue_work(priv->workqueue, &priv->adapter_restart); | 9915 | schedule_work(&priv->adapter_restart); |
9934 | } | 9916 | } |
9935 | 9917 | ||
9936 | ipw_set_channel(priv, parms[1]); | 9918 | ipw_set_channel(priv, parms[1]); |
@@ -9940,7 +9922,7 @@ static int ipw_wx_set_monitor(struct net_device *dev, | |||
9940 | return 0; | 9922 | return 0; |
9941 | } | 9923 | } |
9942 | priv->net_dev->type = ARPHRD_ETHER; | 9924 | priv->net_dev->type = ARPHRD_ETHER; |
9943 | queue_work(priv->workqueue, &priv->adapter_restart); | 9925 | schedule_work(&priv->adapter_restart); |
9944 | } | 9926 | } |
9945 | mutex_unlock(&priv->mutex); | 9927 | mutex_unlock(&priv->mutex); |
9946 | return 0; | 9928 | return 0; |
@@ -9954,7 +9936,7 @@ static int ipw_wx_reset(struct net_device *dev, | |||
9954 | { | 9936 | { |
9955 | struct ipw_priv *priv = libipw_priv(dev); | 9937 | struct ipw_priv *priv = libipw_priv(dev); |
9956 | IPW_DEBUG_WX("RESET\n"); | 9938 | IPW_DEBUG_WX("RESET\n"); |
9957 | queue_work(priv->workqueue, &priv->adapter_restart); | 9939 | schedule_work(&priv->adapter_restart); |
9958 | return 0; | 9940 | return 0; |
9959 | } | 9941 | } |
9960 | 9942 | ||
@@ -10437,7 +10419,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv, | |||
10437 | 10419 | ||
10438 | memset(&dummystats, 0, sizeof(dummystats)); | 10420 | memset(&dummystats, 0, sizeof(dummystats)); |
10439 | 10421 | ||
10440 | /* Filtering of fragment chains is done agains the first fragment */ | 10422 | /* Filtering of fragment chains is done against the first fragment */ |
10441 | hdr = (void *)txb->fragments[0]->data; | 10423 | hdr = (void *)txb->fragments[0]->data; |
10442 | if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { | 10424 | if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { |
10443 | if (filter & IPW_PROM_NO_MGMT) | 10425 | if (filter & IPW_PROM_NO_MGMT) |
@@ -10544,7 +10526,7 @@ static int ipw_net_set_mac_address(struct net_device *dev, void *p) | |||
10544 | memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN); | 10526 | memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN); |
10545 | printk(KERN_INFO "%s: Setting MAC to %pM\n", | 10527 | printk(KERN_INFO "%s: Setting MAC to %pM\n", |
10546 | priv->net_dev->name, priv->mac_addr); | 10528 | priv->net_dev->name, priv->mac_addr); |
10547 | queue_work(priv->workqueue, &priv->adapter_restart); | 10529 | schedule_work(&priv->adapter_restart); |
10548 | mutex_unlock(&priv->mutex); | 10530 | mutex_unlock(&priv->mutex); |
10549 | return 0; | 10531 | return 0; |
10550 | } | 10532 | } |
@@ -10677,9 +10659,7 @@ static void ipw_rf_kill(void *adapter) | |||
10677 | 10659 | ||
10678 | if (rf_kill_active(priv)) { | 10660 | if (rf_kill_active(priv)) { |
10679 | IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); | 10661 | IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); |
10680 | if (priv->workqueue) | 10662 | schedule_delayed_work(&priv->rf_kill, 2 * HZ); |
10681 | queue_delayed_work(priv->workqueue, | ||
10682 | &priv->rf_kill, 2 * HZ); | ||
10683 | goto exit_unlock; | 10663 | goto exit_unlock; |
10684 | } | 10664 | } |
10685 | 10665 | ||
@@ -10690,7 +10670,7 @@ static void ipw_rf_kill(void *adapter) | |||
10690 | "device\n"); | 10670 | "device\n"); |
10691 | 10671 | ||
10692 | /* we can not do an adapter restart while inside an irq lock */ | 10672 | /* we can not do an adapter restart while inside an irq lock */ |
10693 | queue_work(priv->workqueue, &priv->adapter_restart); | 10673 | schedule_work(&priv->adapter_restart); |
10694 | } else | 10674 | } else |
10695 | IPW_DEBUG_RF_KILL("HW RF Kill deactivated. SW RF Kill still " | 10675 | IPW_DEBUG_RF_KILL("HW RF Kill deactivated. SW RF Kill still " |
10696 | "enabled\n"); | 10676 | "enabled\n"); |
@@ -10728,7 +10708,7 @@ static void ipw_link_up(struct ipw_priv *priv) | |||
10728 | notify_wx_assoc_event(priv); | 10708 | notify_wx_assoc_event(priv); |
10729 | 10709 | ||
10730 | if (priv->config & CFG_BACKGROUND_SCAN) | 10710 | if (priv->config & CFG_BACKGROUND_SCAN) |
10731 | queue_delayed_work(priv->workqueue, &priv->request_scan, HZ); | 10711 | schedule_delayed_work(&priv->request_scan, HZ); |
10732 | } | 10712 | } |
10733 | 10713 | ||
10734 | static void ipw_bg_link_up(struct work_struct *work) | 10714 | static void ipw_bg_link_up(struct work_struct *work) |
@@ -10757,7 +10737,7 @@ static void ipw_link_down(struct ipw_priv *priv) | |||
10757 | 10737 | ||
10758 | if (!(priv->status & STATUS_EXIT_PENDING)) { | 10738 | if (!(priv->status & STATUS_EXIT_PENDING)) { |
10759 | /* Queue up another scan... */ | 10739 | /* Queue up another scan... */ |
10760 | queue_delayed_work(priv->workqueue, &priv->request_scan, 0); | 10740 | schedule_delayed_work(&priv->request_scan, 0); |
10761 | } else | 10741 | } else |
10762 | cancel_delayed_work(&priv->scan_event); | 10742 | cancel_delayed_work(&priv->scan_event); |
10763 | } | 10743 | } |
@@ -10775,7 +10755,6 @@ static int __devinit ipw_setup_deferred_work(struct ipw_priv *priv) | |||
10775 | { | 10755 | { |
10776 | int ret = 0; | 10756 | int ret = 0; |
10777 | 10757 | ||
10778 | priv->workqueue = create_workqueue(DRV_NAME); | ||
10779 | init_waitqueue_head(&priv->wait_command_queue); | 10758 | init_waitqueue_head(&priv->wait_command_queue); |
10780 | init_waitqueue_head(&priv->wait_state); | 10759 | init_waitqueue_head(&priv->wait_state); |
10781 | 10760 | ||
@@ -11332,8 +11311,7 @@ static int ipw_up(struct ipw_priv *priv) | |||
11332 | IPW_WARNING("Radio Frequency Kill Switch is On:\n" | 11311 | IPW_WARNING("Radio Frequency Kill Switch is On:\n" |
11333 | "Kill switch must be turned off for " | 11312 | "Kill switch must be turned off for " |
11334 | "wireless networking to work.\n"); | 11313 | "wireless networking to work.\n"); |
11335 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 11314 | schedule_delayed_work(&priv->rf_kill, 2 * HZ); |
11336 | 2 * HZ); | ||
11337 | return 0; | 11315 | return 0; |
11338 | } | 11316 | } |
11339 | 11317 | ||
@@ -11343,8 +11321,7 @@ static int ipw_up(struct ipw_priv *priv) | |||
11343 | 11321 | ||
11344 | /* If configure to try and auto-associate, kick | 11322 | /* If configure to try and auto-associate, kick |
11345 | * off a scan. */ | 11323 | * off a scan. */ |
11346 | queue_delayed_work(priv->workqueue, | 11324 | schedule_delayed_work(&priv->request_scan, 0); |
11347 | &priv->request_scan, 0); | ||
11348 | 11325 | ||
11349 | return 0; | 11326 | return 0; |
11350 | } | 11327 | } |
@@ -11467,9 +11444,13 @@ static int ipw_net_init(struct net_device *dev) | |||
11467 | 11444 | ||
11468 | bg_band->band = IEEE80211_BAND_2GHZ; | 11445 | bg_band->band = IEEE80211_BAND_2GHZ; |
11469 | bg_band->n_channels = geo->bg_channels; | 11446 | bg_band->n_channels = geo->bg_channels; |
11470 | bg_band->channels = | 11447 | bg_band->channels = kcalloc(geo->bg_channels, |
11471 | kzalloc(geo->bg_channels * | 11448 | sizeof(struct ieee80211_channel), |
11472 | sizeof(struct ieee80211_channel), GFP_KERNEL); | 11449 | GFP_KERNEL); |
11450 | if (!bg_band->channels) { | ||
11451 | rc = -ENOMEM; | ||
11452 | goto out; | ||
11453 | } | ||
11473 | /* translate geo->bg to bg_band.channels */ | 11454 | /* translate geo->bg to bg_band.channels */ |
11474 | for (i = 0; i < geo->bg_channels; i++) { | 11455 | for (i = 0; i < geo->bg_channels; i++) { |
11475 | bg_band->channels[i].band = IEEE80211_BAND_2GHZ; | 11456 | bg_band->channels[i].band = IEEE80211_BAND_2GHZ; |
@@ -11502,9 +11483,13 @@ static int ipw_net_init(struct net_device *dev) | |||
11502 | 11483 | ||
11503 | a_band->band = IEEE80211_BAND_5GHZ; | 11484 | a_band->band = IEEE80211_BAND_5GHZ; |
11504 | a_band->n_channels = geo->a_channels; | 11485 | a_band->n_channels = geo->a_channels; |
11505 | a_band->channels = | 11486 | a_band->channels = kcalloc(geo->a_channels, |
11506 | kzalloc(geo->a_channels * | 11487 | sizeof(struct ieee80211_channel), |
11507 | sizeof(struct ieee80211_channel), GFP_KERNEL); | 11488 | GFP_KERNEL); |
11489 | if (!a_band->channels) { | ||
11490 | rc = -ENOMEM; | ||
11491 | goto out; | ||
11492 | } | ||
11508 | /* translate geo->bg to a_band.channels */ | 11493 | /* translate geo->bg to a_band.channels */ |
11509 | for (i = 0; i < geo->a_channels; i++) { | 11494 | for (i = 0; i < geo->a_channels; i++) { |
11510 | a_band->channels[i].band = IEEE80211_BAND_2GHZ; | 11495 | a_band->channels[i].band = IEEE80211_BAND_2GHZ; |
@@ -11802,7 +11787,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
11802 | err = request_irq(pdev->irq, ipw_isr, IRQF_SHARED, DRV_NAME, priv); | 11787 | err = request_irq(pdev->irq, ipw_isr, IRQF_SHARED, DRV_NAME, priv); |
11803 | if (err) { | 11788 | if (err) { |
11804 | IPW_ERROR("Error allocating IRQ %d\n", pdev->irq); | 11789 | IPW_ERROR("Error allocating IRQ %d\n", pdev->irq); |
11805 | goto out_destroy_workqueue; | 11790 | goto out_iounmap; |
11806 | } | 11791 | } |
11807 | 11792 | ||
11808 | SET_NETDEV_DEV(net_dev, &pdev->dev); | 11793 | SET_NETDEV_DEV(net_dev, &pdev->dev); |
@@ -11870,9 +11855,6 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
11870 | sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); | 11855 | sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); |
11871 | out_release_irq: | 11856 | out_release_irq: |
11872 | free_irq(pdev->irq, priv); | 11857 | free_irq(pdev->irq, priv); |
11873 | out_destroy_workqueue: | ||
11874 | destroy_workqueue(priv->workqueue); | ||
11875 | priv->workqueue = NULL; | ||
11876 | out_iounmap: | 11858 | out_iounmap: |
11877 | iounmap(priv->hw_base); | 11859 | iounmap(priv->hw_base); |
11878 | out_pci_release_regions: | 11860 | out_pci_release_regions: |
@@ -11915,18 +11897,31 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev) | |||
11915 | kfree(priv->cmdlog); | 11897 | kfree(priv->cmdlog); |
11916 | priv->cmdlog = NULL; | 11898 | priv->cmdlog = NULL; |
11917 | } | 11899 | } |
11918 | /* ipw_down will ensure that there is no more pending work | 11900 | |
11919 | * in the workqueue's, so we can safely remove them now. */ | 11901 | /* make sure all works are inactive */ |
11920 | cancel_delayed_work(&priv->adhoc_check); | 11902 | cancel_delayed_work_sync(&priv->adhoc_check); |
11921 | cancel_delayed_work(&priv->gather_stats); | 11903 | cancel_work_sync(&priv->associate); |
11922 | cancel_delayed_work(&priv->request_scan); | 11904 | cancel_work_sync(&priv->disassociate); |
11923 | cancel_delayed_work(&priv->request_direct_scan); | 11905 | cancel_work_sync(&priv->system_config); |
11924 | cancel_delayed_work(&priv->request_passive_scan); | 11906 | cancel_work_sync(&priv->rx_replenish); |
11925 | cancel_delayed_work(&priv->scan_event); | 11907 | cancel_work_sync(&priv->adapter_restart); |
11926 | cancel_delayed_work(&priv->rf_kill); | 11908 | cancel_delayed_work_sync(&priv->rf_kill); |
11927 | cancel_delayed_work(&priv->scan_check); | 11909 | cancel_work_sync(&priv->up); |
11928 | destroy_workqueue(priv->workqueue); | 11910 | cancel_work_sync(&priv->down); |
11929 | priv->workqueue = NULL; | 11911 | cancel_delayed_work_sync(&priv->request_scan); |
11912 | cancel_delayed_work_sync(&priv->request_direct_scan); | ||
11913 | cancel_delayed_work_sync(&priv->request_passive_scan); | ||
11914 | cancel_delayed_work_sync(&priv->scan_event); | ||
11915 | cancel_delayed_work_sync(&priv->gather_stats); | ||
11916 | cancel_work_sync(&priv->abort_scan); | ||
11917 | cancel_work_sync(&priv->roam); | ||
11918 | cancel_delayed_work_sync(&priv->scan_check); | ||
11919 | cancel_work_sync(&priv->link_up); | ||
11920 | cancel_work_sync(&priv->link_down); | ||
11921 | cancel_delayed_work_sync(&priv->led_link_on); | ||
11922 | cancel_delayed_work_sync(&priv->led_link_off); | ||
11923 | cancel_delayed_work_sync(&priv->led_act_off); | ||
11924 | cancel_work_sync(&priv->merge_networks); | ||
11930 | 11925 | ||
11931 | /* Free MAC hash list for ADHOC */ | 11926 | /* Free MAC hash list for ADHOC */ |
11932 | for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) { | 11927 | for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) { |
@@ -12014,7 +12009,7 @@ static int ipw_pci_resume(struct pci_dev *pdev) | |||
12014 | priv->suspend_time = get_seconds() - priv->suspend_at; | 12009 | priv->suspend_time = get_seconds() - priv->suspend_at; |
12015 | 12010 | ||
12016 | /* Bring the device back up */ | 12011 | /* Bring the device back up */ |
12017 | queue_work(priv->workqueue, &priv->up); | 12012 | schedule_work(&priv->up); |
12018 | 12013 | ||
12019 | return 0; | 12014 | return 0; |
12020 | } | 12015 | } |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.h b/drivers/net/wireless/ipw2x00/ipw2200.h index d7d049c7a4fa..91795b5a93c5 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.h +++ b/drivers/net/wireless/ipw2x00/ipw2200.h | |||
@@ -961,7 +961,7 @@ struct ipw_country_channel_info { | |||
961 | struct ipw_country_info { | 961 | struct ipw_country_info { |
962 | u8 id; | 962 | u8 id; |
963 | u8 length; | 963 | u8 length; |
964 | u8 country_str[3]; | 964 | u8 country_str[IEEE80211_COUNTRY_STRING_LEN]; |
965 | struct ipw_country_channel_info groups[7]; | 965 | struct ipw_country_channel_info groups[7]; |
966 | } __packed; | 966 | } __packed; |
967 | 967 | ||
@@ -1299,8 +1299,6 @@ struct ipw_priv { | |||
1299 | u8 direct_scan_ssid[IW_ESSID_MAX_SIZE]; | 1299 | u8 direct_scan_ssid[IW_ESSID_MAX_SIZE]; |
1300 | u8 direct_scan_ssid_len; | 1300 | u8 direct_scan_ssid_len; |
1301 | 1301 | ||
1302 | struct workqueue_struct *workqueue; | ||
1303 | |||
1304 | struct delayed_work adhoc_check; | 1302 | struct delayed_work adhoc_check; |
1305 | struct work_struct associate; | 1303 | struct work_struct associate; |
1306 | struct work_struct disassociate; | 1304 | struct work_struct disassociate; |
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c index 32dee2ce5d31..d5ef696298ee 100644 --- a/drivers/net/wireless/ipw2x00/libipw_module.c +++ b/drivers/net/wireless/ipw2x00/libipw_module.c | |||
@@ -54,6 +54,7 @@ | |||
54 | 54 | ||
55 | #define DRV_DESCRIPTION "802.11 data/management/control stack" | 55 | #define DRV_DESCRIPTION "802.11 data/management/control stack" |
56 | #define DRV_NAME "libipw" | 56 | #define DRV_NAME "libipw" |
57 | #define DRV_PROCNAME "ieee80211" | ||
57 | #define DRV_VERSION LIBIPW_VERSION | 58 | #define DRV_VERSION LIBIPW_VERSION |
58 | #define DRV_COPYRIGHT "Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>" | 59 | #define DRV_COPYRIGHT "Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>" |
59 | 60 | ||
@@ -293,16 +294,16 @@ static int __init libipw_init(void) | |||
293 | struct proc_dir_entry *e; | 294 | struct proc_dir_entry *e; |
294 | 295 | ||
295 | libipw_debug_level = debug; | 296 | libipw_debug_level = debug; |
296 | libipw_proc = proc_mkdir("ieee80211", init_net.proc_net); | 297 | libipw_proc = proc_mkdir(DRV_PROCNAME, init_net.proc_net); |
297 | if (libipw_proc == NULL) { | 298 | if (libipw_proc == NULL) { |
298 | LIBIPW_ERROR("Unable to create " DRV_NAME | 299 | LIBIPW_ERROR("Unable to create " DRV_PROCNAME |
299 | " proc directory\n"); | 300 | " proc directory\n"); |
300 | return -EIO; | 301 | return -EIO; |
301 | } | 302 | } |
302 | e = proc_create("debug_level", S_IRUGO | S_IWUSR, libipw_proc, | 303 | e = proc_create("debug_level", S_IRUGO | S_IWUSR, libipw_proc, |
303 | &debug_level_proc_fops); | 304 | &debug_level_proc_fops); |
304 | if (!e) { | 305 | if (!e) { |
305 | remove_proc_entry(DRV_NAME, init_net.proc_net); | 306 | remove_proc_entry(DRV_PROCNAME, init_net.proc_net); |
306 | libipw_proc = NULL; | 307 | libipw_proc = NULL; |
307 | return -EIO; | 308 | return -EIO; |
308 | } | 309 | } |
@@ -319,7 +320,7 @@ static void __exit libipw_exit(void) | |||
319 | #ifdef CONFIG_LIBIPW_DEBUG | 320 | #ifdef CONFIG_LIBIPW_DEBUG |
320 | if (libipw_proc) { | 321 | if (libipw_proc) { |
321 | remove_proc_entry("debug_level", libipw_proc); | 322 | remove_proc_entry("debug_level", libipw_proc); |
322 | remove_proc_entry(DRV_NAME, init_net.proc_net); | 323 | remove_proc_entry(DRV_PROCNAME, init_net.proc_net); |
323 | libipw_proc = NULL; | 324 | libipw_proc = NULL; |
324 | } | 325 | } |
325 | #endif /* CONFIG_LIBIPW_DEBUG */ | 326 | #endif /* CONFIG_LIBIPW_DEBUG */ |
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c index 0de1b1893220..e5ad76cd77da 100644 --- a/drivers/net/wireless/ipw2x00/libipw_rx.c +++ b/drivers/net/wireless/ipw2x00/libipw_rx.c | |||
@@ -925,7 +925,7 @@ drop_free: | |||
925 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; | 925 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; |
926 | 926 | ||
927 | /* | 927 | /* |
928 | * Make ther structure we read from the beacon packet has | 928 | * Make the structure we read from the beacon packet to have |
929 | * the right values | 929 | * the right values |
930 | */ | 930 | */ |
931 | static int libipw_verify_qos_info(struct libipw_qos_information_element | 931 | static int libipw_verify_qos_info(struct libipw_qos_information_element |