Search Linux Wireless

regulatory - issue after intersection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

This is scenario:

1) insmod cfg80211.ko
2) iw reg set FR
3) modprobe ath10k_pci (default US will be registered)
4) intersection here - is it as designed? Country "98"
5) after that no way to setup new country using iw reg set (lock),
always fail in such code:

__reg_process_hint_user(...)
        if ((lr->initiator == NL80211_REGDOM_SET_BY_CORE ||
             lr->initiator == NL80211_REGDOM_SET_BY_DRIVER ||
             lr->initiator == NL80211_REGDOM_SET_BY_USER) &&
             regdom_changes(lr->alpha2))
               return REG_REQ_IGNORE;

Last request still have "US" - shouldn't be "98" like we set in intersection?

Such patch setup same alpha2 for last request (also in case of we will
change this in intersection)
@Luis could you check this patch, I am not sure this is best fix for that?

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 1219a07..df70db7 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -271,6 +271,7 @@ static void reset_regdomains(bool full_reset,
                             const struct ieee80211_regdomain *new_regdom)
 {
        const struct ieee80211_regdomain *r;
+       struct regulatory_request *lr;

        ASSERT_RTNL();

@@ -284,6 +285,12 @@ static void reset_regdomains(bool full_reset,
        if (r == &world_regdom)
                r = NULL;

+       lr = get_last_request();
+       if (lr && new_regdom) {
+               lr->alpha2[0] = new_regdom->alpha2[0];
+               lr->alpha2[1] = new_regdom->alpha2[1];
+       }
+
        rcu_free_regdom(r);
        rcu_free_regdom(cfg80211_world_regdom);


BR
Janusz
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux