diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-31 22:32:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-31 22:32:50 -0400 |
commit | d5dc056cce9e60528d5eac64efed623d26ffe46f (patch) | |
tree | b5124013d0935be211fd1df702db2f69c581c5ab /net | |
parent | 00ae702847df5566ce9182e9c895185e2ad1c181 (diff) | |
parent | 7371400431389e1df6a2a05ab9882055b8a6ff2c (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 4 | ||||
-rw-r--r-- | net/mac80211/tx.c | 6 | ||||
-rw-r--r-- | net/mac80211/util.c | 18 | ||||
-rw-r--r-- | net/wireless/reg.c | 12 |
4 files changed, 22 insertions, 18 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index ce84237ebad3..ccff6133e19a 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, | |||
391 | if (SN_GT(mpath->sn, orig_sn) || | 391 | if (SN_GT(mpath->sn, orig_sn) || |
392 | (mpath->sn == orig_sn && | 392 | (mpath->sn == orig_sn && |
393 | action == MPATH_PREQ && | 393 | action == MPATH_PREQ && |
394 | new_metric > mpath->metric)) { | 394 | new_metric >= mpath->metric)) { |
395 | process = false; | 395 | process = false; |
396 | fresh_info = false; | 396 | fresh_info = false; |
397 | } | 397 | } |
@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, | |||
611 | 611 | ||
612 | mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr, | 612 | mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr, |
613 | cpu_to_le32(orig_sn), 0, target_addr, | 613 | cpu_to_le32(orig_sn), 0, target_addr, |
614 | cpu_to_le32(target_sn), mpath->next_hop->sta.addr, hopcount, | 614 | cpu_to_le32(target_sn), next_hop, hopcount, |
615 | ttl, cpu_to_le32(lifetime), cpu_to_le32(metric), | 615 | ttl, cpu_to_le32(lifetime), cpu_to_le32(metric), |
616 | 0, sdata); | 616 | 0, sdata); |
617 | rcu_read_unlock(); | 617 | rcu_read_unlock(); |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index cbe53ed4fb0b..cfc473e1b050 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1991,6 +1991,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, | |||
1991 | void ieee80211_tx_pending(unsigned long data) | 1991 | void ieee80211_tx_pending(unsigned long data) |
1992 | { | 1992 | { |
1993 | struct ieee80211_local *local = (struct ieee80211_local *)data; | 1993 | struct ieee80211_local *local = (struct ieee80211_local *)data; |
1994 | struct ieee80211_sub_if_data *sdata; | ||
1994 | unsigned long flags; | 1995 | unsigned long flags; |
1995 | int i; | 1996 | int i; |
1996 | bool txok; | 1997 | bool txok; |
@@ -2029,6 +2030,11 @@ void ieee80211_tx_pending(unsigned long data) | |||
2029 | if (!txok) | 2030 | if (!txok) |
2030 | break; | 2031 | break; |
2031 | } | 2032 | } |
2033 | |||
2034 | if (skb_queue_empty(&local->pending[i])) | ||
2035 | list_for_each_entry_rcu(sdata, &local->interfaces, list) | ||
2036 | netif_tx_wake_queue( | ||
2037 | netdev_get_tx_queue(sdata->dev, i)); | ||
2032 | } | 2038 | } |
2033 | spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); | 2039 | spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); |
2034 | 2040 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index c453226f06b2..53af57047435 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -279,13 +279,13 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue, | |||
279 | /* someone still has this queue stopped */ | 279 | /* someone still has this queue stopped */ |
280 | return; | 280 | return; |
281 | 281 | ||
282 | if (!skb_queue_empty(&local->pending[queue])) | 282 | if (skb_queue_empty(&local->pending[queue])) { |
283 | rcu_read_lock(); | ||
284 | list_for_each_entry_rcu(sdata, &local->interfaces, list) | ||
285 | netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue)); | ||
286 | rcu_read_unlock(); | ||
287 | } else | ||
283 | tasklet_schedule(&local->tx_pending_tasklet); | 288 | tasklet_schedule(&local->tx_pending_tasklet); |
284 | |||
285 | rcu_read_lock(); | ||
286 | list_for_each_entry_rcu(sdata, &local->interfaces, list) | ||
287 | netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue)); | ||
288 | rcu_read_unlock(); | ||
289 | } | 289 | } |
290 | 290 | ||
291 | void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue, | 291 | void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue, |
@@ -1097,9 +1097,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1097 | */ | 1097 | */ |
1098 | res = drv_start(local); | 1098 | res = drv_start(local); |
1099 | if (res) { | 1099 | if (res) { |
1100 | WARN(local->suspended, "Harware became unavailable " | 1100 | WARN(local->suspended, "Hardware became unavailable " |
1101 | "upon resume. This is could be a software issue" | 1101 | "upon resume. This could be a software issue " |
1102 | "prior to suspend or a hardware issue\n"); | 1102 | "prior to suspend or a hardware issue.\n"); |
1103 | return res; | 1103 | return res; |
1104 | } | 1104 | } |
1105 | 1105 | ||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ed89c59bb431..81fcafc60150 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -324,7 +324,7 @@ struct reg_regdb_search_request { | |||
324 | }; | 324 | }; |
325 | 325 | ||
326 | static LIST_HEAD(reg_regdb_search_list); | 326 | static LIST_HEAD(reg_regdb_search_list); |
327 | static DEFINE_SPINLOCK(reg_regdb_search_lock); | 327 | static DEFINE_MUTEX(reg_regdb_search_mutex); |
328 | 328 | ||
329 | static void reg_regdb_search(struct work_struct *work) | 329 | static void reg_regdb_search(struct work_struct *work) |
330 | { | 330 | { |
@@ -332,7 +332,7 @@ static void reg_regdb_search(struct work_struct *work) | |||
332 | const struct ieee80211_regdomain *curdom, *regdom; | 332 | const struct ieee80211_regdomain *curdom, *regdom; |
333 | int i, r; | 333 | int i, r; |
334 | 334 | ||
335 | spin_lock(®_regdb_search_lock); | 335 | mutex_lock(®_regdb_search_mutex); |
336 | while (!list_empty(®_regdb_search_list)) { | 336 | while (!list_empty(®_regdb_search_list)) { |
337 | request = list_first_entry(®_regdb_search_list, | 337 | request = list_first_entry(®_regdb_search_list, |
338 | struct reg_regdb_search_request, | 338 | struct reg_regdb_search_request, |
@@ -346,18 +346,16 @@ static void reg_regdb_search(struct work_struct *work) | |||
346 | r = reg_copy_regd(®dom, curdom); | 346 | r = reg_copy_regd(®dom, curdom); |
347 | if (r) | 347 | if (r) |
348 | break; | 348 | break; |
349 | spin_unlock(®_regdb_search_lock); | ||
350 | mutex_lock(&cfg80211_mutex); | 349 | mutex_lock(&cfg80211_mutex); |
351 | set_regdom(regdom); | 350 | set_regdom(regdom); |
352 | mutex_unlock(&cfg80211_mutex); | 351 | mutex_unlock(&cfg80211_mutex); |
353 | spin_lock(®_regdb_search_lock); | ||
354 | break; | 352 | break; |
355 | } | 353 | } |
356 | } | 354 | } |
357 | 355 | ||
358 | kfree(request); | 356 | kfree(request); |
359 | } | 357 | } |
360 | spin_unlock(®_regdb_search_lock); | 358 | mutex_unlock(®_regdb_search_mutex); |
361 | } | 359 | } |
362 | 360 | ||
363 | static DECLARE_WORK(reg_regdb_work, reg_regdb_search); | 361 | static DECLARE_WORK(reg_regdb_work, reg_regdb_search); |
@@ -375,9 +373,9 @@ static void reg_regdb_query(const char *alpha2) | |||
375 | 373 | ||
376 | memcpy(request->alpha2, alpha2, 2); | 374 | memcpy(request->alpha2, alpha2, 2); |
377 | 375 | ||
378 | spin_lock(®_regdb_search_lock); | 376 | mutex_lock(®_regdb_search_mutex); |
379 | list_add_tail(&request->list, ®_regdb_search_list); | 377 | list_add_tail(&request->list, ®_regdb_search_list); |
380 | spin_unlock(®_regdb_search_lock); | 378 | mutex_unlock(®_regdb_search_mutex); |
381 | 379 | ||
382 | schedule_work(®_regdb_work); | 380 | schedule_work(®_regdb_work); |
383 | } | 381 | } |