Loading net/wireless/reg.c +19 −47 Original line number Original line Diff line number Diff line Loading @@ -1104,9 +1104,6 @@ static void wiphy_update_beacon_reg(struct wiphy *wiphy) assert_cfg80211_lock(); assert_cfg80211_lock(); if (list_empty(®_beacon_list)) return; list_for_each_entry(reg_beacon, ®_beacon_list, list) { list_for_each_entry(reg_beacon, ®_beacon_list, list) { if (!wiphy->bands[reg_beacon->chan.band]) if (!wiphy->bands[reg_beacon->chan.band]) continue; continue; Loading Loading @@ -1666,11 +1663,6 @@ static void reg_process_pending_beacon_hints(void) /* This goes through the _pending_ beacon list */ /* This goes through the _pending_ beacon list */ spin_lock_bh(®_pending_beacons_lock); 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, list_for_each_entry_safe(pending_beacon, tmp, ®_pending_beacons, list) { ®_pending_beacons, list) { Loading @@ -1685,7 +1677,6 @@ static void reg_process_pending_beacon_hints(void) } } spin_unlock_bh(®_pending_beacons_lock); spin_unlock_bh(®_pending_beacons_lock); out: mutex_unlock(&cfg80211_mutex); mutex_unlock(&cfg80211_mutex); } } Loading Loading @@ -1949,35 +1940,25 @@ static void restore_regulatory_settings(bool reset_user) * settings. * settings. */ */ spin_lock(®_requests_lock); spin_lock(®_requests_lock); if (!list_empty(®_requests_list)) { list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { list_for_each_entry_safe(reg_request, tmp, if (reg_request->initiator != NL80211_REGDOM_SET_BY_USER) ®_requests_list, list) { if (reg_request->initiator != NL80211_REGDOM_SET_BY_USER) continue; continue; list_move_tail(®_request->list, &tmp_reg_req_list); list_move_tail(®_request->list, &tmp_reg_req_list); } } } spin_unlock(®_requests_lock); spin_unlock(®_requests_lock); /* Clear beacon hints */ /* Clear beacon hints */ spin_lock_bh(®_pending_beacons_lock); spin_lock_bh(®_pending_beacons_lock); if (!list_empty(®_pending_beacons)) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } spin_unlock_bh(®_pending_beacons_lock); spin_unlock_bh(®_pending_beacons_lock); if (!list_empty(®_beacon_list)) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } /* First restore to the basic regulatory settings */ /* First restore to the basic regulatory settings */ cfg80211_regdomain = cfg80211_world_regdom; cfg80211_regdomain = cfg80211_world_regdom; Loading Loading @@ -2490,31 +2471,22 @@ void /* __init_or_exit */ regulatory_exit(void) platform_device_unregister(reg_pdev); platform_device_unregister(reg_pdev); spin_lock_bh(®_pending_beacons_lock); spin_lock_bh(®_pending_beacons_lock); if (!list_empty(®_pending_beacons)) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } spin_unlock_bh(®_pending_beacons_lock); spin_unlock_bh(®_pending_beacons_lock); if (!list_empty(®_beacon_list)) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } spin_lock(®_requests_lock); spin_lock(®_requests_lock); if (!list_empty(®_requests_list)) { list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { list_del(®_request->list); list_del(®_request->list); kfree(reg_request); kfree(reg_request); } } } spin_unlock(®_requests_lock); spin_unlock(®_requests_lock); mutex_unlock(®_mutex); mutex_unlock(®_mutex); Loading Loading
net/wireless/reg.c +19 −47 Original line number Original line Diff line number Diff line Loading @@ -1104,9 +1104,6 @@ static void wiphy_update_beacon_reg(struct wiphy *wiphy) assert_cfg80211_lock(); assert_cfg80211_lock(); if (list_empty(®_beacon_list)) return; list_for_each_entry(reg_beacon, ®_beacon_list, list) { list_for_each_entry(reg_beacon, ®_beacon_list, list) { if (!wiphy->bands[reg_beacon->chan.band]) if (!wiphy->bands[reg_beacon->chan.band]) continue; continue; Loading Loading @@ -1666,11 +1663,6 @@ static void reg_process_pending_beacon_hints(void) /* This goes through the _pending_ beacon list */ /* This goes through the _pending_ beacon list */ spin_lock_bh(®_pending_beacons_lock); 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, list_for_each_entry_safe(pending_beacon, tmp, ®_pending_beacons, list) { ®_pending_beacons, list) { Loading @@ -1685,7 +1677,6 @@ static void reg_process_pending_beacon_hints(void) } } spin_unlock_bh(®_pending_beacons_lock); spin_unlock_bh(®_pending_beacons_lock); out: mutex_unlock(&cfg80211_mutex); mutex_unlock(&cfg80211_mutex); } } Loading Loading @@ -1949,35 +1940,25 @@ static void restore_regulatory_settings(bool reset_user) * settings. * settings. */ */ spin_lock(®_requests_lock); spin_lock(®_requests_lock); if (!list_empty(®_requests_list)) { list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { list_for_each_entry_safe(reg_request, tmp, if (reg_request->initiator != NL80211_REGDOM_SET_BY_USER) ®_requests_list, list) { if (reg_request->initiator != NL80211_REGDOM_SET_BY_USER) continue; continue; list_move_tail(®_request->list, &tmp_reg_req_list); list_move_tail(®_request->list, &tmp_reg_req_list); } } } spin_unlock(®_requests_lock); spin_unlock(®_requests_lock); /* Clear beacon hints */ /* Clear beacon hints */ spin_lock_bh(®_pending_beacons_lock); spin_lock_bh(®_pending_beacons_lock); if (!list_empty(®_pending_beacons)) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } spin_unlock_bh(®_pending_beacons_lock); spin_unlock_bh(®_pending_beacons_lock); if (!list_empty(®_beacon_list)) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } /* First restore to the basic regulatory settings */ /* First restore to the basic regulatory settings */ cfg80211_regdomain = cfg80211_world_regdom; cfg80211_regdomain = cfg80211_world_regdom; Loading Loading @@ -2490,31 +2471,22 @@ void /* __init_or_exit */ regulatory_exit(void) platform_device_unregister(reg_pdev); platform_device_unregister(reg_pdev); spin_lock_bh(®_pending_beacons_lock); spin_lock_bh(®_pending_beacons_lock); if (!list_empty(®_pending_beacons)) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } spin_unlock_bh(®_pending_beacons_lock); spin_unlock_bh(®_pending_beacons_lock); if (!list_empty(®_beacon_list)) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { list_del(®_beacon->list); list_del(®_beacon->list); kfree(reg_beacon); kfree(reg_beacon); } } } spin_lock(®_requests_lock); spin_lock(®_requests_lock); if (!list_empty(®_requests_list)) { list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { list_del(®_request->list); list_del(®_request->list); kfree(reg_request); kfree(reg_request); } } } spin_unlock(®_requests_lock); spin_unlock(®_requests_lock); mutex_unlock(®_mutex); mutex_unlock(®_mutex); Loading