Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351728
b: refs/heads/master
c: fea9bce
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Jan 3, 2013
1 parent ebcbe78 commit b0aaf37
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 48 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9763c3c295a8b31316e16558b58b226e005b160
refs/heads/master: fea9bcedce2d0c751d4f31155f4634689d46166e
66 changes: 19 additions & 47 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,9 +1104,6 @@ static void wiphy_update_beacon_reg(struct wiphy *wiphy)

assert_cfg80211_lock();

if (list_empty(&reg_beacon_list))
return;

list_for_each_entry(reg_beacon, &reg_beacon_list, list) {
if (!wiphy->bands[reg_beacon->chan.band])
continue;
Expand Down Expand Up @@ -1666,11 +1663,6 @@ static void reg_process_pending_beacon_hints(void)
/* This goes through the _pending_ beacon list */
spin_lock_bh(&reg_pending_beacons_lock);

if (list_empty(&reg_pending_beacons)) {
spin_unlock_bh(&reg_pending_beacons_lock);
goto out;
}

list_for_each_entry_safe(pending_beacon, tmp,
&reg_pending_beacons, list) {

Expand All @@ -1685,7 +1677,6 @@ static void reg_process_pending_beacon_hints(void)
}

spin_unlock_bh(&reg_pending_beacons_lock);
out:
mutex_unlock(&cfg80211_mutex);
}

Expand Down Expand Up @@ -1949,34 +1940,24 @@ static void restore_regulatory_settings(bool reset_user)
* settings.
*/
spin_lock(&reg_requests_lock);
if (!list_empty(&reg_requests_list)) {
list_for_each_entry_safe(reg_request, tmp,
&reg_requests_list, list) {
if (reg_request->initiator !=
NL80211_REGDOM_SET_BY_USER)
continue;
list_move_tail(&reg_request->list, &tmp_reg_req_list);
}
list_for_each_entry_safe(reg_request, tmp, &reg_requests_list, list) {
if (reg_request->initiator != NL80211_REGDOM_SET_BY_USER)
continue;
list_move_tail(&reg_request->list, &tmp_reg_req_list);
}
spin_unlock(&reg_requests_lock);

/* Clear beacon hints */
spin_lock_bh(&reg_pending_beacons_lock);
if (!list_empty(&reg_pending_beacons)) {
list_for_each_entry_safe(reg_beacon, btmp,
&reg_pending_beacons, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
list_for_each_entry_safe(reg_beacon, btmp, &reg_pending_beacons, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
spin_unlock_bh(&reg_pending_beacons_lock);

if (!list_empty(&reg_beacon_list)) {
list_for_each_entry_safe(reg_beacon, btmp,
&reg_beacon_list, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
list_for_each_entry_safe(reg_beacon, btmp, &reg_beacon_list, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}

/* First restore to the basic regulatory settings */
Expand Down Expand Up @@ -2490,30 +2471,21 @@ void /* __init_or_exit */ regulatory_exit(void)
platform_device_unregister(reg_pdev);

spin_lock_bh(&reg_pending_beacons_lock);
if (!list_empty(&reg_pending_beacons)) {
list_for_each_entry_safe(reg_beacon, btmp,
&reg_pending_beacons, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
list_for_each_entry_safe(reg_beacon, btmp, &reg_pending_beacons, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
spin_unlock_bh(&reg_pending_beacons_lock);

if (!list_empty(&reg_beacon_list)) {
list_for_each_entry_safe(reg_beacon, btmp,
&reg_beacon_list, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
list_for_each_entry_safe(reg_beacon, btmp, &reg_beacon_list, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}

spin_lock(&reg_requests_lock);
if (!list_empty(&reg_requests_list)) {
list_for_each_entry_safe(reg_request, tmp,
&reg_requests_list, list) {
list_del(&reg_request->list);
kfree(reg_request);
}
list_for_each_entry_safe(reg_request, tmp, &reg_requests_list, list) {
list_del(&reg_request->list);
kfree(reg_request);
}
spin_unlock(&reg_requests_lock);

Expand Down

0 comments on commit b0aaf37

Please sign in to comment.