diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-09-14 13:37:30 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-09-14 13:37:30 +0000 |
commit | ef8b5fda8d3d22bbc113101ddcc92ef950a8dc9a (patch) | |
tree | 54cbe773b1776a1412461a75127501f58fdc79e4 /package | |
parent | 623169bc49167458289bc39c180a41aa43abc361 (diff) | |
download | upstream-ef8b5fda8d3d22bbc113101ddcc92ef950a8dc9a.tar.gz upstream-ef8b5fda8d3d22bbc113101ddcc92ef950a8dc9a.tar.bz2 upstream-ef8b5fda8d3d22bbc113101ddcc92ef950a8dc9a.zip |
mac80211: fix regdb locking issues
SVN-Revision: 33398
Diffstat (limited to 'package')
-rw-r--r-- | package/mac80211/patches/300-pending_work.patch | 35 | ||||
-rw-r--r-- | package/mac80211/patches/405-regd_no_assoc_hints.patch | 4 |
2 files changed, 37 insertions, 2 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index 66f1abb63e..183a86221b 100644 --- a/package/mac80211/patches/300-pending_work.patch +++ b/package/mac80211/patches/300-pending_work.patch @@ -327,3 +327,38 @@ priv->tsf_high32 = 0; priv->tsf_low32 = 0; +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -352,6 +352,9 @@ static void reg_regdb_search(struct work + struct reg_regdb_search_request *request; + const struct ieee80211_regdomain *curdom, *regdom; + int i, r; ++ bool set_reg = false; ++ ++ mutex_lock(&cfg80211_mutex); + + mutex_lock(®_regdb_search_mutex); + while (!list_empty(®_regdb_search_list)) { +@@ -367,9 +370,7 @@ static void reg_regdb_search(struct work + r = reg_copy_regd(®dom, curdom); + if (r) + break; +- mutex_lock(&cfg80211_mutex); +- set_regdom(regdom); +- mutex_unlock(&cfg80211_mutex); ++ set_reg = true; + break; + } + } +@@ -377,6 +378,11 @@ static void reg_regdb_search(struct work + kfree(request); + } + mutex_unlock(®_regdb_search_mutex); ++ ++ if (set_reg) ++ set_regdom(regdom); ++ ++ mutex_unlock(&cfg80211_mutex); + } + + static DECLARE_WORK(reg_regdb_work, reg_regdb_search); diff --git a/package/mac80211/patches/405-regd_no_assoc_hints.patch b/package/mac80211/patches/405-regd_no_assoc_hints.patch index 2e2ba93c50..8a5c2a2e33 100644 --- a/package/mac80211/patches/405-regd_no_assoc_hints.patch +++ b/package/mac80211/patches/405-regd_no_assoc_hints.patch @@ -1,6 +1,6 @@ --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -1790,6 +1790,8 @@ void regulatory_hint_11d(struct wiphy *w +@@ -1796,6 +1796,8 @@ void regulatory_hint_11d(struct wiphy *w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request; @@ -9,7 +9,7 @@ mutex_lock(®_mutex); if (unlikely(!last_request)) -@@ -2024,6 +2026,8 @@ static void restore_regulatory_settings( +@@ -2030,6 +2032,8 @@ static void restore_regulatory_settings( void regulatory_hint_disconnect(void) { |