assert_cfg80211_lock();
- if (list_empty(®_beacon_list))
- return;
-
list_for_each_entry(reg_beacon, ®_beacon_list, list) {
if (!wiphy->bands[reg_beacon->chan.band])
continue;
/* This goes through the _pending_ beacon list */
spin_lock_bh(®_pending_beacons_lock);
- if (list_empty(®_pending_beacons)) {
- spin_unlock_bh(®_pending_beacons_lock);
- goto out;
- }
-
list_for_each_entry_safe(pending_beacon, tmp,
®_pending_beacons, list) {
}
spin_unlock_bh(®_pending_beacons_lock);
-out:
mutex_unlock(&cfg80211_mutex);
}
* settings.
*/
spin_lock(®_requests_lock);
- if (!list_empty(®_requests_list)) {
- list_for_each_entry_safe(reg_request, tmp,
- ®_requests_list, list) {
- if (reg_request->initiator !=
- NL80211_REGDOM_SET_BY_USER)
- continue;
- list_move_tail(®_request->list, &tmp_reg_req_list);
- }
+ list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) {
+ if (reg_request->initiator != NL80211_REGDOM_SET_BY_USER)
+ continue;
+ list_move_tail(®_request->list, &tmp_reg_req_list);
}
spin_unlock(®_requests_lock);
/* Clear beacon hints */
spin_lock_bh(®_pending_beacons_lock);
- if (!list_empty(®_pending_beacons)) {
- list_for_each_entry_safe(reg_beacon, btmp,
- ®_pending_beacons, list) {
- list_del(®_beacon->list);
- kfree(reg_beacon);
- }
+ list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) {
+ list_del(®_beacon->list);
+ kfree(reg_beacon);
}
spin_unlock_bh(®_pending_beacons_lock);
- if (!list_empty(®_beacon_list)) {
- list_for_each_entry_safe(reg_beacon, btmp,
- ®_beacon_list, list) {
- list_del(®_beacon->list);
- kfree(reg_beacon);
- }
+ list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) {
+ list_del(®_beacon->list);
+ kfree(reg_beacon);
}
/* First restore to the basic regulatory settings */
platform_device_unregister(reg_pdev);
spin_lock_bh(®_pending_beacons_lock);
- if (!list_empty(®_pending_beacons)) {
- list_for_each_entry_safe(reg_beacon, btmp,
- ®_pending_beacons, list) {
- list_del(®_beacon->list);
- kfree(reg_beacon);
- }
+ list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) {
+ list_del(®_beacon->list);
+ kfree(reg_beacon);
}
spin_unlock_bh(®_pending_beacons_lock);
- if (!list_empty(®_beacon_list)) {
- list_for_each_entry_safe(reg_beacon, btmp,
- ®_beacon_list, list) {
- list_del(®_beacon->list);
- kfree(reg_beacon);
- }
+ list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) {
+ list_del(®_beacon->list);
+ kfree(reg_beacon);
}
spin_lock(®_requests_lock);
- if (!list_empty(®_requests_list)) {
- list_for_each_entry_safe(reg_request, tmp,
- ®_requests_list, list) {
- list_del(®_request->list);
- kfree(reg_request);
- }
+ list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) {
+ list_del(®_request->list);
+ kfree(reg_request);
}
spin_unlock(®_requests_lock);