aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c23
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.h4
2 files changed, 15 insertions, 12 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 44f3cfd4cc1d..f1573a9c2336 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -32,8 +32,8 @@
32 32
33static void ieee_init(struct ieee80211_device *ieee); 33static void ieee_init(struct ieee80211_device *ieee);
34static void softmac_init(struct ieee80211softmac_device *sm); 34static void softmac_init(struct ieee80211softmac_device *sm);
35static void set_rts_cts_work(void *d); 35static void set_rts_cts_work(struct work_struct *work);
36static void set_basic_rates_work(void *d); 36static void set_basic_rates_work(struct work_struct *work);
37 37
38static void housekeeping_init(struct zd_mac *mac); 38static void housekeeping_init(struct zd_mac *mac);
39static void housekeeping_enable(struct zd_mac *mac); 39static void housekeeping_enable(struct zd_mac *mac);
@@ -48,8 +48,8 @@ int zd_mac_init(struct zd_mac *mac,
48 memset(mac, 0, sizeof(*mac)); 48 memset(mac, 0, sizeof(*mac));
49 spin_lock_init(&mac->lock); 49 spin_lock_init(&mac->lock);
50 mac->netdev = netdev; 50 mac->netdev = netdev;
51 INIT_WORK(&mac->set_rts_cts_work, set_rts_cts_work, mac); 51 INIT_DELAYED_WORK(&mac->set_rts_cts_work, set_rts_cts_work);
52 INIT_WORK(&mac->set_basic_rates_work, set_basic_rates_work, mac); 52 INIT_DELAYED_WORK(&mac->set_basic_rates_work, set_basic_rates_work);
53 53
54 ieee_init(ieee); 54 ieee_init(ieee);
55 softmac_init(ieee80211_priv(netdev)); 55 softmac_init(ieee80211_priv(netdev));
@@ -366,9 +366,10 @@ static void try_enable_tx(struct zd_mac *mac)
366 spin_unlock_irqrestore(&mac->lock, flags); 366 spin_unlock_irqrestore(&mac->lock, flags);
367} 367}
368 368
369static void set_rts_cts_work(void *d) 369static void set_rts_cts_work(struct work_struct *work)
370{ 370{
371 struct zd_mac *mac = d; 371 struct zd_mac *mac =
372 container_of(work, struct zd_mac, set_rts_cts_work.work);
372 unsigned long flags; 373 unsigned long flags;
373 u8 rts_rate; 374 u8 rts_rate;
374 unsigned int short_preamble; 375 unsigned int short_preamble;
@@ -387,9 +388,10 @@ static void set_rts_cts_work(void *d)
387 try_enable_tx(mac); 388 try_enable_tx(mac);
388} 389}
389 390
390static void set_basic_rates_work(void *d) 391static void set_basic_rates_work(struct work_struct *work)
391{ 392{
392 struct zd_mac *mac = d; 393 struct zd_mac *mac =
394 container_of(work, struct zd_mac, set_basic_rates_work.work);
393 unsigned long flags; 395 unsigned long flags;
394 u16 basic_rates; 396 u16 basic_rates;
395 397
@@ -467,12 +469,13 @@ static void bssinfo_change(struct net_device *netdev, u32 changes)
467 if (need_set_rts_cts && !mac->updating_rts_rate) { 469 if (need_set_rts_cts && !mac->updating_rts_rate) {
468 mac->updating_rts_rate = 1; 470 mac->updating_rts_rate = 1;
469 netif_stop_queue(mac->netdev); 471 netif_stop_queue(mac->netdev);
470 queue_work(zd_workqueue, &mac->set_rts_cts_work); 472 queue_delayed_work(zd_workqueue, &mac->set_rts_cts_work, 0);
471 } 473 }
472 if (need_set_rates && !mac->updating_basic_rates) { 474 if (need_set_rates && !mac->updating_basic_rates) {
473 mac->updating_basic_rates = 1; 475 mac->updating_basic_rates = 1;
474 netif_stop_queue(mac->netdev); 476 netif_stop_queue(mac->netdev);
475 queue_work(zd_workqueue, &mac->set_basic_rates_work); 477 queue_delayed_work(zd_workqueue, &mac->set_basic_rates_work,
478 0);
476 } 479 }
477 spin_unlock_irqrestore(&mac->lock, flags); 480 spin_unlock_irqrestore(&mac->lock, flags);
478} 481}
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h
index 08d6b8c08e75..d4e8b870409d 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.h
+++ b/drivers/net/wireless/zd1211rw/zd_mac.h
@@ -133,8 +133,8 @@ struct zd_mac {
133 struct iw_statistics iw_stats; 133 struct iw_statistics iw_stats;
134 134
135 struct housekeeping housekeeping; 135 struct housekeeping housekeeping;
136 struct work_struct set_rts_cts_work; 136 struct delayed_work set_rts_cts_work;
137 struct work_struct set_basic_rates_work; 137 struct delayed_work set_basic_rates_work;
138 138
139 unsigned int stats_count; 139 unsigned int stats_count;
140 u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; 140 u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE];