ath9k: remove the signal strength fix, it causes a lot of confusion and seems to...
[openwrt.git] / package / mac80211 / patches / 300-revert_regd_breakage.patch
1 --- a/net/wireless/reg.c
2 +++ b/net/wireless/reg.c
3 @@ -107,9 +107,6 @@ struct reg_beacon {
4  static void reg_todo(struct work_struct *work);
5  static DECLARE_WORK(reg_work, reg_todo);
6  
7 -static void reg_timeout_work(struct work_struct *work);
8 -static DECLARE_DELAYED_WORK(reg_timeout, reg_timeout_work);
9 -
10  /* We keep a static world regulatory domain in case of the absence of CRDA */
11  static const struct ieee80211_regdomain world_regdom = {
12         .n_reg_rules = 5,
13 @@ -1334,9 +1331,6 @@ static void reg_set_request_processed(vo
14                 need_more_processing = true;
15         spin_unlock(&reg_requests_lock);
16  
17 -       if (last_request->initiator == NL80211_REGDOM_SET_BY_USER)
18 -               cancel_delayed_work_sync(&reg_timeout);
19 -
20         if (need_more_processing)
21                 schedule_work(&reg_work);
22  }
23 @@ -1447,17 +1441,8 @@ static void reg_process_hint(struct regu
24         r = __regulatory_hint(wiphy, reg_request);
25         /* This is required so that the orig_* parameters are saved */
26         if (r == -EALREADY && wiphy &&
27 -           wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) {
28 +           wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY)
29                 wiphy_update_regulatory(wiphy, initiator);
30 -               return;
31 -       }
32 -
33 -       /*
34 -        * We only time out user hints, given that they should be the only
35 -        * source of bogus requests.
36 -        */
37 -       if (reg_request->initiator == NL80211_REGDOM_SET_BY_USER)
38 -               schedule_delayed_work(&reg_timeout, msecs_to_jiffies(3142));
39  }
40  
41  /*
42 @@ -2185,13 +2170,6 @@ out:
43         mutex_unlock(&reg_mutex);
44  }
45  
46 -static void reg_timeout_work(struct work_struct *work)
47 -{
48 -       REG_DBG_PRINT("Timeout while waiting for CRDA to reply, "
49 -                     "restoring regulatory settings");
50 -       restore_regulatory_settings(true);
51 -}
52 -
53  int __init regulatory_init(void)
54  {
55         int err = 0;
56 @@ -2245,7 +2223,6 @@ void /* __init_or_exit */ regulatory_exi
57         struct reg_beacon *reg_beacon, *btmp;
58  
59         cancel_work_sync(&reg_work);
60 -       cancel_delayed_work_sync(&reg_timeout);
61  
62         mutex_lock(&cfg80211_mutex);
63         mutex_lock(&reg_mutex);