History

cfg80211: set custom regdomain after wiphy registration

We used to set regulatory info before the registration of the device and then the regulatory info didn't get set, because the device isn't registered so there isn't a device to set the regulatory info for. So set the regulatory info after the device registration. Call reg_process_self_managed_hints() once again after the device registration because it does nothing before it.

Miri Korenblit committed 5 years ago

Commit 1b7b3ac1 parent 0bc47052 files · +5 −4Browse files

Unified · Split

2 files
  1. net/wireless/core.c +4 −4
  2. net/wireless/reg.c +1 −0
net/wireless/core.c+4−4
@@ -5,7 +5,7 @@ · 4 unmodified lines
5 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>5 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2014 Intel Mobile Communications GmbH6 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 * Copyright 2015-2017 Intel Deutschland GmbH7 * Copyright 2015-2017 Intel Deutschland GmbH
8 * Copyright (C) 2018-2020 Intel Corporation8 * Copyright (C) 2018-2021 Intel Corporation
9 */9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -928,9 +928,6 @@ int wiphy_register(struct wiphy *wiphy) · 916 unmodified lines
928 return res;928 return res;
929 }929 }
930 930
931 /* set up regulatory info */
932 wiphy_regulatory_register(wiphy);
933
934 list_add_rcu(&rdev->list, &cfg80211_rdev_list);931 list_add_rcu(&rdev->list, &cfg80211_rdev_list);
935 cfg80211_rdev_list_generation++;932 cfg80211_rdev_list_generation++;
936 933
@@ -941,6 +938,9 @@ int wiphy_register(struct wiphy *wiphy) · 4 unmodified lines
941 cfg80211_debugfs_rdev_add(rdev);938 cfg80211_debugfs_rdev_add(rdev);
942 nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY);939 nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY);
943 940
941 /* set up regulatory info */
942 wiphy_regulatory_register(wiphy);
943
944 if (wiphy->regulatory_flags & REGULATORY_CUSTOM_REG) {944 if (wiphy->regulatory_flags & REGULATORY_CUSTOM_REG) {
945 struct regulatory_request request;945 struct regulatory_request request;
946 946
net/wireless/reg.c+1−0
@@ -4051,6 +4051,7 @@ void wiphy_regulatory_register(struct wiphy *wiphy) · 4050 unmodified lines
4051 4051
4052 wiphy_update_regulatory(wiphy, lr->initiator);4052 wiphy_update_regulatory(wiphy, lr->initiator);
4053 wiphy_all_share_dfs_chan_state(wiphy);4053 wiphy_all_share_dfs_chan_state(wiphy);
4054 reg_process_self_managed_hints();
4054}4055}
4055 4056
4056void wiphy_regulatory_deregister(struct wiphy *wiphy)4057void wiphy_regulatory_deregister(struct wiphy *wiphy)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t