summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@qca.qualcomm.com>2011-12-21 00:23:36 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-01-04 23:30:40 +0400
commit8848bef0382af53a7c9568bbc6757db97c53a0e3 (patch)
treeb92592b1aa3095e441d64f0de28899cdc24e0c1a /net/wireless
parenta98aa7ae14529144527b64a54a9ecd828fa805a6 (diff)
downloadlinux-8848bef0382af53a7c9568bbc6757db97c53a0e3.tar.xz
cfg80211: replace reg.c Nokia commit c4c32294
Nokia hasn't gotten back to me in over 1 month for a relicense change request. There are only a few changes that they contributed, so just reverting their changes but replacing with another set. This change replaces this commit: commit c4c322941ce0d7e2b7b8794ad70683123d9cb26a Author: Yuri Ershov <ext-yuri.ershov@nokia.com> Date: Tue Jun 29 15:08:08 2010 +0400 cfg80211: Update of regulatory request initiator handling In some cases there could be possible dereferencing freed pointer. The update is intended to avoid this issue. Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Petri Karhula <petri.karhula@nokia.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/reg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 58d393766035..728a8fdf04b3 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1480,18 +1480,18 @@ new_request:
}
/* This processes *all* regulatory hints */
-static void reg_process_hint(struct regulatory_request *reg_request)
+static void reg_process_hint(struct regulatory_request *reg_request,
+ enum nl80211_reg_initiator reg_initiator)
{
int r = 0;
struct wiphy *wiphy = NULL;
- enum nl80211_reg_initiator initiator = reg_request->initiator;
BUG_ON(!reg_request->alpha2);
if (wiphy_idx_valid(reg_request->wiphy_idx))
wiphy = wiphy_idx_to_wiphy(reg_request->wiphy_idx);
- if (reg_request->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
+ if (reg_initiator == NL80211_REGDOM_SET_BY_DRIVER &&
!wiphy) {
kfree(reg_request);
return;
@@ -1501,7 +1501,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
/* This is required so that the orig_* parameters are saved */
if (r == -EALREADY && wiphy &&
wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) {
- wiphy_update_regulatory(wiphy, initiator);
+ wiphy_update_regulatory(wiphy, reg_initiator);
return;
}
@@ -1510,7 +1510,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
* source of bogus requests.
*/
if (r != -EALREADY &&
- reg_request->initiator == NL80211_REGDOM_SET_BY_USER)
+ reg_initiator == NL80211_REGDOM_SET_BY_USER)
schedule_delayed_work(&reg_timeout, msecs_to_jiffies(3142));
}
@@ -1547,7 +1547,7 @@ static void reg_process_pending_hints(void)
spin_unlock(&reg_requests_lock);
- reg_process_hint(reg_request);
+ reg_process_hint(reg_request, reg_request->initiator);
out:
mutex_unlock(&reg_mutex);