Skip to contentSkip to conversation

cfg80211: allow passing struct device in the wiphy_new call

PATCH In review Rafał Miłecki 3 participants 13 messages Jan 2, 2017 – Jan 8, 2017 7 messages not in the archive

Subsystems (12)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 cfg80211: allow passing struct device in the wiphy_new call

From: Rafał Miłecki <[email protected]>

So far wiphy's device had to be set using separated set_wiphy_dev call. Most drivers were doing this right after calling wiphy_new anyway so this just simplifies the code a bit.
The real advantage of this however is having access to struct dev during early wiphy init. This allows e.g. reading extra DT info thanks to of_node reference. It's important for things that may happen before wiphy_register like custom regulatory.

---
V2: This is a new patch, wasn't used in V1

---
 drivers/net/wireless/ath/ath6kl/cfg80211.c                  | 7 ++-----
 drivers/net/wireless/ath/ath6kl/cfg80211.h                  | 2 +-
 drivers/net/wireless/ath/ath6kl/core.c                      | 2 +-
 drivers/net/wireless/ath/wil6210/cfg80211.c                 | 3 +--
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +--
 drivers/net/wireless/intel/ipw2x00/libipw_module.c          | 2 +-
 drivers/net/wireless/intersil/orinoco/cfg.c                 | 2 --
 drivers/net/wireless/intersil/orinoco/main.c                | 2 +-
 drivers/net/wireless/marvell/libertas/cfg.c                 | 3 ++-
 drivers/net/wireless/marvell/mwifiex/cfg80211.c             | 4 +---
 drivers/net/wireless/rndis_wlan.c                           | 5 ++---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c           | 9 ++++-----
 drivers/staging/wlan-ng/cfg80211.c                          | 3 +--
 include/net/cfg80211.h                                      | 9 +++++----
 net/mac80211/main.c                                         | 3 ++-
 net/wireless/core.c                                         | 6 ++++--
 16 files changed, 29 insertions(+), 36 deletions(-)
drivers/net/wireless/ath/ath6kl/cfg80211.c +2 -5
index b7fe0af..0f9f7e7 100644
@@ -3870,9 +3870,6 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
 
 	wiphy->max_remain_on_channel_duration = 5000;
 
-	/* set device pointer for wiphy */
-	set_wiphy_dev(wiphy, ar->dev);
-
 	wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
 				 BIT(NL80211_IFTYPE_ADHOC) |
 				 BIT(NL80211_IFTYPE_AP);
@@ -4004,13 +4001,13 @@ void ath6kl_cfg80211_cleanup(struct ath6kl *ar)
 	ar->wiphy_registered = false;
 }
 
-struct ath6kl *ath6kl_cfg80211_create(void)
+struct ath6kl *ath6kl_cfg80211_create(struct device *dev)
 {
 	struct ath6kl *ar;
 	struct wiphy *wiphy;
 
 	/* create a new wiphy for use with cfg80211 */
-	wiphy = wiphy_new(&ath6kl_cfg80211_ops, sizeof(struct ath6kl));
+	wiphy = wiphy_new(dev, &ath6kl_cfg80211_ops, sizeof(struct ath6kl));
 
 	if (!wiphy) {
 		ath6kl_err("couldn't allocate wiphy device\n");
drivers/net/wireless/ath/ath6kl/cfg80211.h +1 -1
index 5aa57a7..994ba2c 100644
@@ -60,7 +60,7 @@ void ath6kl_cfg80211_stop_all(struct ath6kl *ar);
 int ath6kl_cfg80211_init(struct ath6kl *ar);
 void ath6kl_cfg80211_cleanup(struct ath6kl *ar);
 
-struct ath6kl *ath6kl_cfg80211_create(void);
+struct ath6kl *ath6kl_cfg80211_create(struct device *dev);
 void ath6kl_cfg80211_destroy(struct ath6kl *ar);
 
 #endif /* ATH6KL_CFG80211_H */
drivers/net/wireless/ath/ath6kl/core.c +1 -1
index ebb9f16..d3f3822 100644
@@ -267,7 +267,7 @@ struct ath6kl *ath6kl_core_create(struct device *dev)
 	struct ath6kl *ar;
 	u8 ctr;
 
-	ar = ath6kl_cfg80211_create();
+	ar = ath6kl_cfg80211_create(dev);
 	if (!ar)
 		return NULL;
 
drivers/net/wireless/ath/wil6210/cfg80211.c +1 -2
index 6aa3ff4..ce4d7d4 100644
@@ -1575,14 +1575,13 @@ struct wireless_dev *wil_cfg80211_init(struct device *dev)
 	if (!wdev)
 		return ERR_PTR(-ENOMEM);
 
-	wdev->wiphy = wiphy_new(&wil_cfg80211_ops,
+	wdev->wiphy = wiphy_new(dev, &wil_cfg80211_ops,
 				sizeof(struct wil6210_priv));
 	if (!wdev->wiphy) {
 		rc = -ENOMEM;
 		goto out;
 	}
 
-	set_wiphy_dev(wdev->wiphy, dev);
 	wil_wiphy_init(wdev->wiphy);
 
 	return wdev;
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +1 -2
index ccae3bb..29cb1e9 100644
@@ -6779,13 +6779,12 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
 	if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK))
 		ops->set_rekey_data = brcmf_cfg80211_set_rekey_data;
 #endif
-	wiphy = wiphy_new(ops, sizeof(struct brcmf_cfg80211_info));
+	wiphy = wiphy_new(busdev, ops, sizeof(struct brcmf_cfg80211_info));
 	if (!wiphy) {
 		brcmf_err("Could not allocate wiphy device\n");
 		return NULL;
 	}
 	memcpy(wiphy->perm_addr, drvr->mac, ETH_ALEN);
-	set_wiphy_dev(wiphy, busdev);
 
 	cfg = wiphy_priv(wiphy);
 	cfg->wiphy = wiphy;
drivers/net/wireless/intel/ipw2x00/libipw_module.c +1 -1
index 2332075..555ef56 100644
@@ -135,7 +135,7 @@ struct net_device *alloc_libipw(int sizeof_priv, int monitor)
 	ieee->dev = dev;
 
 	if (!monitor) {
-		ieee->wdev.wiphy = wiphy_new(&libipw_config_ops, 0);
+		ieee->wdev.wiphy = wiphy_new(NULL, &libipw_config_ops, 0);
 		if (!ieee->wdev.wiphy) {
 			LIBIPW_ERROR("Unable to allocate wiphy.\n");
 			goto failed_free_netdev;
drivers/net/wireless/intersil/orinoco/cfg.c +0 -2
index 7aa4706..5848fd6 100644
@@ -26,8 +26,6 @@ void orinoco_wiphy_init(struct wiphy *wiphy)
 	struct orinoco_private *priv = wiphy_priv(wiphy);
 
 	wiphy->privid = orinoco_wiphy_privid;
-
-	set_wiphy_dev(wiphy, priv->dev);
 }
 
 /* Called after firmware is initialised */
drivers/net/wireless/intersil/orinoco/main.c +1 -1
index 9d96b7c..3465ea6 100644
@@ -2178,7 +2178,7 @@ struct orinoco_private
 	 * NOTE: We only support a single virtual interface
 	 *       but this may change when monitor mode is added
 	 */
-	wiphy = wiphy_new(&orinoco_cfg_ops,
+	wiphy = wiphy_new(device, &orinoco_cfg_ops,
 			  sizeof(struct orinoco_private) + sizeof_card);
 	if (!wiphy)
 		return NULL;
drivers/net/wireless/marvell/libertas/cfg.c +2 -1
index 7ff2efa..f87d279 100644
@@ -2120,7 +2120,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
 	if (!wdev)
 		return ERR_PTR(-ENOMEM);
 
-	wdev->wiphy = wiphy_new(&lbs_cfg80211_ops, sizeof(struct lbs_private));
+	wdev->wiphy = wiphy_new(dev, &lbs_cfg80211_ops,
+				sizeof(struct lbs_private));
 	if (!wdev->wiphy) {
 		dev_err(dev, "cannot allocate wiphy\n");
 		ret = -ENOMEM;
drivers/net/wireless/marvell/mwifiex/cfg80211.c +1 -3
index 1e3bd43..d92a649 100644
@@ -4232,7 +4232,7 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
 	u32 thr, retry;
 
 	/* create a new wiphy for use with cfg80211 */
-	wiphy = wiphy_new(&mwifiex_cfg80211_ops,
+	wiphy = wiphy_new(priv->adapter->dev, &mwifiex_cfg80211_ops,
 			  sizeof(struct mwifiex_adapter *));
 	if (!wiphy) {
 		mwifiex_dbg(adapter, ERROR,
@@ -4328,8 +4328,6 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
 	wdev_priv = wiphy_priv(wiphy);
 	*(unsigned long *)wdev_priv = (unsigned long)adapter;
 
-	set_wiphy_dev(wiphy, priv->adapter->dev);
-
 	ret = wiphy_register(wiphy);
 	if (ret < 0) {
 		mwifiex_dbg(adapter, ERROR,
drivers/net/wireless/rndis_wlan.c +2 -3
index 603c904..6535f26 100644
@@ -3408,7 +3408,8 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf)
 	 * NOTE: We only support a single virtual interface, so wiphy
 	 * and wireless_dev are somewhat synonymous for this device.
 	 */
-	wiphy = wiphy_new(&rndis_config_ops, sizeof(struct rndis_wlan_private));
+	wiphy = wiphy_new(&usbdev->udev->dev, &rndis_config_ops,
+			  sizeof(struct rndis_wlan_private));
 	if (!wiphy)
 		return -ENOMEM;
 
@@ -3486,8 +3487,6 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf)
 	wiphy->cipher_suites = priv->cipher_suites;
 	wiphy->n_cipher_suites = ARRAY_SIZE(rndis_cipher_suites);
 
-	set_wiphy_dev(wiphy, &usbdev->udev->dev);
-
 	if (wiphy_register(wiphy)) {
 		retval = -ENODEV;
 		goto fail;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +4 -5
index 60d8b05..dd87557 100644
@@ -2243,7 +2243,7 @@ static const struct cfg80211_ops wilc_cfg80211_ops = {
 
 };
 
-static struct wireless_dev *WILC_WFI_CfgAlloc(void)
+static struct wireless_dev *WILC_WFI_CfgAlloc(struct device *dev)
 {
 	struct wireless_dev *wdev;
 
@@ -2251,7 +2251,8 @@ static struct wireless_dev *WILC_WFI_CfgAlloc(void)
 	if (!wdev)
 		goto _fail_;
 
-	wdev->wiphy = wiphy_new(&wilc_cfg80211_ops, sizeof(struct wilc_priv));
+	wdev->wiphy = wiphy_new(dev, &wilc_cfg80211_ops,
+				sizeof(struct wilc_priv));
 	if (!wdev->wiphy)
 		goto _fail_mem_;
 
@@ -2277,7 +2278,7 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de
 	struct wireless_dev *wdev;
 	s32 s32Error = 0;
 
-	wdev = WILC_WFI_CfgAlloc();
+	wdev = WILC_WFI_CfgAlloc(dev);
 	if (!wdev) {
 		netdev_err(net, "wiphy new allocate failed\n");
 		return NULL;
@@ -2302,8 +2303,6 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de
 	wdev->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
 	wdev->iftype = NL80211_IFTYPE_STATION;
 
-	set_wiphy_dev(wdev->wiphy, dev);
-
 	s32Error = wiphy_register(wdev->wiphy);
 	if (s32Error)
 		netdev_err(net, "Cannot register wiphy device\n");
drivers/staging/wlan-ng/cfg80211.c +1 -2
index 182b2d5..444b7fc 100644
@@ -694,7 +694,7 @@ static struct wiphy *wlan_create_wiphy(struct device *dev, struct wlandevice *wl
 	struct wiphy *wiphy;
 	struct prism2_wiphy_private *priv;
 
-	wiphy = wiphy_new(&prism2_usb_cfg_ops, sizeof(*priv));
+	wiphy = wiphy_new(dev, &prism2_usb_cfg_ops, sizeof(*priv));
 	if (!wiphy)
 		return NULL;
 
@@ -710,7 +710,6 @@ static struct wiphy *wlan_create_wiphy(struct device *dev, struct wlandevice *wl
 	priv->band.ht_cap.ht_supported = false;
 	wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
 
-	set_wiphy_dev(wiphy, dev);
 	wiphy->privid = prism2_wiphy_privid;
 	wiphy->max_scan_ssids = 1;
 	wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION)
include/net/cfg80211.h +5 -4
index ca2ac1c..e952cca 100644
@@ -3730,8 +3730,8 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
  * Return: A pointer to the new wiphy. This pointer must be
  * assigned to each netdev's ieee80211_ptr for proper operation.
  */
-struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
-			   const char *requested_name);
+struct wiphy *wiphy_new_nm(struct device *dev, const struct cfg80211_ops *ops,
+			   int sizeof_priv, const char *requested_name);
 
 /**
  * wiphy_new - create a new wiphy for use with cfg80211
@@ -3745,10 +3745,11 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
  * Return: A pointer to the new wiphy. This pointer must be
  * assigned to each netdev's ieee80211_ptr for proper operation.
  */
-static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,
+static inline struct wiphy *wiphy_new(struct device *dev,
+				      const struct cfg80211_ops *ops,
 				      int sizeof_priv)
 {
-	return wiphy_new_nm(ops, sizeof_priv, NULL);
+	return wiphy_new_nm(dev, ops, sizeof_priv, NULL);
 }
 
 /**
net/mac80211/main.c +2 -1
index 1822c77..a0f780f 100644
@@ -524,7 +524,8 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
 	 */
 	priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
 
-	wiphy = wiphy_new_nm(&mac80211_config_ops, priv_size, requested_name);
+	wiphy = wiphy_new_nm(NULL, &mac80211_config_ops, priv_size,
+			     requested_name);
 
 	if (!wiphy)
 		return NULL;
net/wireless/core.c +4 -2
index 158c59e..398922a 100644
@@ -359,8 +359,8 @@ static void cfg80211_sched_scan_stop_wk(struct work_struct *work)
 
 /* exported functions */
 
-struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
-			   const char *requested_name)
+struct wiphy *wiphy_new_nm(struct device *dev, const struct cfg80211_ops *ops,
+			   int sizeof_priv, const char *requested_name)
 {
 	static atomic_t wiphy_counter = ATOMIC_INIT(0);
 
@@ -404,6 +404,8 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
 	/* atomic_inc_return makes it start at 1, make it start at 0 */
 	rdev->wiphy_idx--;
 
+	set_wiphy_dev(&rdev->wiphy, dev);
+
 	/* give it a proper name */
 	if (requested_name && requested_name[0]) {
 		int rv;
Signature · 1 line
2.10.1

A message that is not in the archive (sent off-list or not yet received): 20170102132747.3491-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH v2 2/3 dt-bindings: document common IEEE 802.11 frequency limit property

From: Rafał Miłecki <[email protected]>

This new file should be used for properties that apply to all wireless devices.

---
V2: Switch to a single ieee80211-freq-limit property that allows specifying
*multiple* ranges. This resolves problem with more complex rules as pointed by Felx.
Make description implementation agnostic as pointed by Arend. Rename node to wifi as suggested by Martin.

---
 .../devicetree/bindings/net/wireless/ieee80211.txt     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.txt
Documentation/devicetree/bindings/net/wireless/ieee80211.txt new file +18 -0
new file mode 100644
index 0000000..658c721
@@ -0,0 +1,18 @@
+Common IEEE 802.11 properties
+
+This provides documentation of common properties that are valid for all wireless
+devices.
+
+Optional properties:
+ - ieee80211-freq-limit : list of supported frequency ranges in KHz
+
+Example:
+
+pcie@0,0 {
+	reg = <0x0000 0 0 0 0>;
+	wifi@0,0 {
+		reg = <0x0000 0 0 0 0>;
+		ieee80211-freq-limit = <2402000 2432000>,
+				       <2432000 2462000>;
+	};
+};
Signature · 6 lines
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170102132747.3491-2-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw

Re: [PATCH V2 2/3] dt-bindings: document common IEEE 802.11 frequency limit property

Documentation/devicetree/bindings/net/wireless/ieee80211.txt line 18

Quoted 9 lines
Documentation/devicetree/bindings/net/wireless/ieee80211.txt new file +8 -0
+pcie@0,0 {
+	reg = <0x0000 0 0 0 0>;
+	wifi@0,0 {
+		reg = <0x0000 0 0 0 0>;
+		ieee80211-freq-limit = <2402000 2432000>,
+				       <2432000 2462000>;
+	};
+};

Syntactically, that might be a good example, but semantically it doesn't really make sense to have those ranges that have a common endpoint?

johannes

#5 lore raw

PATCH v2 3/3 cfg80211: support ieee80211-freq-limit DT property

In reply to a message not in the archive

From: Rafał Miłecki <[email protected]>

It allows specifying hardware limitations of supported channels. This may be useful for specifying single band devices or devices that support only some part of the whole band.
This can be useful for some tri-band routers that have separated radios for lower and higher part of 5 GHz band.

---
V2: Put main code in core.c as it isn't strictly part of regulatory - pointed
by Arend.
Update to support ieee80211-freq-limit (new property).

---
 include/net/cfg80211.h |   6 +++
 net/wireless/core.c    | 110 +++++++++++++++++++++++++++++++++++++++++++++++++
 net/wireless/core.h    |   2 +
 net/wireless/reg.c     |   8 +++-
 net/wireless/reg.h     |   2 +
 5 files changed, 126 insertions(+), 2 deletions(-)
include/net/cfg80211.h +6 -0
index e952cca..6609c39 100644
@@ -3515,6 +3515,9 @@ struct wiphy_iftype_ext_capab {
  *	attribute indices defined in &enum nl80211_bss_select_attr.
  *
  * @cookie_counter: unique generic cookie counter, used to identify objects.
+ *
+ * @n_freq_limits: number of frequency limits
+ * @freq_limits: array of extra frequency limits
  */
 struct wiphy {
 	/* assign these fields before you register the wiphy */
@@ -3646,6 +3649,9 @@ struct wiphy {
 
 	u64 cookie_counter;
 
+	unsigned int n_freq_limits;
+	struct ieee80211_freq_range *freq_limits;
+
 	char priv[0] __aligned(NETDEV_ALIGN);
 };
 
net/wireless/core.c +110 -0

128 lines not on this page · raw message

net/wireless/core.h +2 -0
index af6e023..ce94f82 100644
@@ -271,6 +271,8 @@ struct cfg80211_iface_destroy {
 	u32 nlportid;
 };
 
+void wiphy_freq_limits_apply(struct wiphy *wiphy);
+
 void cfg80211_destroy_ifaces(struct cfg80211_registered_device *rdev);
 
 /* free object */
net/wireless/reg.c +6 -2
index 5dbac37..cb5a264 100644
@@ -748,8 +748,8 @@ static bool is_valid_rd(const struct ieee80211_regdomain *rd)
 	return true;
 }
 
-static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range,
-			    u32 center_freq_khz, u32 bw_khz)
+bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range,
+		     u32 center_freq_khz, u32 bw_khz)
 {
 	u32 start_freq_khz, end_freq_khz;
 
@@ -1693,6 +1693,8 @@ static void wiphy_update_regulatory(struct wiphy *wiphy,
 	for (band = 0; band < NUM_NL80211_BANDS; band++)
 		handle_band(wiphy, initiator, wiphy->bands[band]);
 
+	wiphy_freq_limits_apply(wiphy);
+
 	reg_process_beacons(wiphy);
 	reg_process_ht_flags(wiphy);
 	reg_call_notifier(wiphy, lr);
@@ -1800,6 +1802,8 @@ void wiphy_apply_custom_regulatory(struct wiphy *wiphy,
 		bands_set++;
 	}
 
+	wiphy_freq_limits_apply(wiphy);
+
 	/*
 	 * no point in calling this if it won't have any effect
 	 * on your device's supported bands.
net/wireless/reg.h +2 -0
index f6ced31..90eddc3 100644
@@ -25,6 +25,8 @@ extern const struct ieee80211_regdomain __rcu *cfg80211_regdomain;
 
 bool reg_is_valid_request(const char *alpha2);
 bool is_world_regdom(const char *alpha2);
+bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range,
+		     u32 center_freq_khz, u32 bw_khz);
 bool reg_supported_dfs_region(enum nl80211_dfs_regions dfs_region);
 enum nl80211_dfs_regions reg_get_dfs_region(struct wiphy *wiphy);
 
Signature · 6 lines
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170102132747.3491-3-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#7 lore raw

Re: [PATCH V2 3/3] cfg80211: support ieee80211-freq-limit DT property

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 112

Quoted 6 lines
net/wireless/core.c +5 -0
+	prop = of_find_property(np, "ieee80211-freq-limit", &i);
+	if (!prop)
+		return 0;
+
+	i = i / sizeof(u32);

What if it's not even a multiple of sizeof(u32)? Shouldn't you check that, in case it's completely bogus?

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 114

Quoted 2 lines
net/wireless/core.c +2 -0
+	if (i % 2) {
+		dev_err(dev, "ieee80211-freq-limit wrong value");

say "wrong format" perhaps? we don't care (much) above the values.

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 117

Quoted 3 lines
net/wireless/core.c +3 -0
+		return -EPROTO;
+	}
+	wiphy->n_freq_limits = i / 2;

I don't like this use of the 'i' variable - use something like 'len[gth]' instead?

Quoted 16 lines
(quoted diff) +1 -0
+	wiphy->freq_limits = kzalloc(wiphy->n_freq_limits *

sizeof(*wiphy->freq_limits),

net/wireless/core.c +9 -0
+				     GFP_KERNEL);
+	if (!wiphy->freq_limits) {
+		err = -ENOMEM;
+		goto out;
+	}
+
+	p = NULL;
+	for (i = 0; i < wiphy->n_freq_limits; i++) {
+		struct ieee80211_freq_range *limit = &wiphy-
Quoted 1 line

freq_limits[i];

(quoted diff) +2 -0
+
+		p = of_prop_next_u32(prop, p, &limit-
Quoted 1 line

start_freq_khz);

net/wireless/core.c +1 -0
+		if (!p) {

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 141

Quoted 10 lines
net/wireless/core.c +10 -0
+			err = -EINVAL;
+			goto out;
+		}
+
+		p = of_prop_next_u32(prop, p, &limit->end_freq_khz);
+		if (!p) {
+			err = -EINVAL;
+			goto out;
+		}
+	}

You should also reject nonsense like empty ranges, or ranges with a higher beginning than end, etc. I think

put

	return 0;

here.

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 144

Quoted 2 lines
net/wireless/core.c +2 -0
+out:
+	if (err) {

then you can make that a pure "error" label and remove the "if (err)" check.

Quoted 1 line

+void wiphy_freq_limits_apply(struct wiphy *wiphy)

I don't see any point in having this here rather than in reg.c, which is the only user.

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 191

Quoted 6 lines
(quoted diff) +1 -0
+			if (!wiphy_freq_limits_valid_chan(wiphy,

chan)) {

(quoted diff) +1 -0
+				pr_debug("Disabling freq %d MHz as

it's out of OF limits\n",

net/wireless/core.c +2 -0
+					 chan->center_freq);
+				chan->flags |= IEEE80211_CHAN_DISABLED;

This seems wrong.

The sband and channels can be static data and be shared across different wiphys for the same driver. If the driver has custom regulatory etc. then this can't work, but that's up to the driver. OF data is handled here though, so if OF data for one device disables a channel, this would also cause the channel to be disabled for another device, if the data is shared.

To avoid this, you'd have to have drivers that never share it - but you can't really guarantee that at this level.

In order to fix that, you probably need to memdup the sband/channel structs during wiphy registration. Then, if you set it up the right way, you can actually simply edit them according to the OF data directly there, so that *orig_flags* (rather than just flags) already gets the DISABLED bit - and that allows you to get rid of the reg.c hooks entirely since it'll look the same to reg.c independent of the driver or the OF stuff doing this.

That can actually be inefficient though, since drivers may already have copied the channel data somewhere and then you copy it again since you can't know.

Perhaps a better approach would be to not combine this with wiphy registration, but require drivers that may use this to call a new helper function *before* wiphy registration (and *after* calling set_wiphy_dev()), like e.g.

   ieee80211_read_of_data(wiphy);

You can then also make this an inline when OF is not configured in (something which you haven't really taken into account now, you should have used dev_of_node() too instead of dev->of_node)

Yes, this would mean that it doesn't automatically get applied to arbitrary drivers, but it seems unlikely that arbitrary drivers like realtek USB would suddenly get OF node entries ... so that's not necessarily a bad thing.

In the documentation for this function you could then document that it will modify flags, and as such must not be called when the sband and channel data is shared, getting rid of the waste/complexity of the copy you otherwise have to make in cfg80211.

johannes

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: [PATCH V2 3/3] cfg80211: support ieee80211-freq-limit DT property

Quoted 117 lines · Johannes Berg

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 112

Quoted 5 lines
net/wireless/core.c +5 -0
+     prop = of_find_property(np, "ieee80211-freq-limit", &i);
+     if (!prop)
+             return 0;
+
+     i = i / sizeof(u32);

What if it's not even a multiple of sizeof(u32)? Shouldn't you check that, in case it's completely bogus?

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 114

Quoted 2 lines
net/wireless/core.c +2 -0
+     if (i % 2) {
+             dev_err(dev, "ieee80211-freq-limit wrong value");

say "wrong format" perhaps? we don't care (much) above the values.

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 117

Quoted 3 lines
net/wireless/core.c +3 -0
+             return -EPROTO;
+     }
+     wiphy->n_freq_limits = i / 2;

I don't like this use of the 'i' variable - use something like 'len[gth]' instead?

Quoted 16 lines

+ wiphy->freq_limits = kzalloc(wiphy->n_freq_limits *
sizeof(*wiphy->freq_limits),

net/wireless/core.c +9 -0
+                                  GFP_KERNEL);
+     if (!wiphy->freq_limits) {
+             err = -ENOMEM;
+             goto out;
+     }
+
+     p = NULL;
+     for (i = 0; i < wiphy->n_freq_limits; i++) {
+             struct ieee80211_freq_range *limit = &wiphy-
Quoted 1 line

freq_limits[i];

(quoted diff) +2 -0
+
+             p = of_prop_next_u32(prop, p, &limit-
Quoted 1 line

start_freq_khz);

net/wireless/core.c +1 -0
+             if (!p) {

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 141

Quoted 10 lines
net/wireless/core.c +10 -0
+                     err = -EINVAL;
+                     goto out;
+             }
+
+             p = of_prop_next_u32(prop, p, &limit->end_freq_khz);
+             if (!p) {
+                     err = -EINVAL;
+                     goto out;
+             }
+     }

You should also reject nonsense like empty ranges, or ranges with a higher beginning than end, etc. I think

put

        return 0;

here.

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 144

Quoted 2 lines
net/wireless/core.c +2 -0
+out:
+     if (err) {

then you can make that a pure "error" label and remove the "if (err)" check.

Quoted 1 line

+void wiphy_freq_limits_apply(struct wiphy *wiphy)

I don't see any point in having this here rather than in reg.c, which is the only user.

net/wireless/core.c struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx) · line 191

Quoted 6 lines

+ if (!wiphy_freq_limits_valid_chan(wiphy,
chan)) {
+ pr_debug("Disabling freq %d MHz as
it's out of OF limits\n",

net/wireless/core.c +2 -0
+                                      chan->center_freq);
+                             chan->flags |= IEEE80211_CHAN_DISABLED;

This seems wrong.

The sband and channels can be static data and be shared across different wiphys for the same driver. If the driver has custom regulatory etc. then this can't work, but that's up to the driver. OF data is handled here though, so if OF data for one device disables a channel, this would also cause the channel to be disabled for another device, if the data is shared.

To avoid this, you'd have to have drivers that never share it - but you can't really guarantee that at this level.

In order to fix that, you probably need to memdup the sband/channel structs during wiphy registration. Then, if you set it up the right way, you can actually simply edit them according to the OF data directly there, so that *orig_flags* (rather than just flags) already gets the DISABLED bit - and that allows you to get rid of the reg.c hooks entirely since it'll look the same to reg.c independent of the driver or the OF stuff doing this.

That can actually be inefficient though, since drivers may already have copied the channel data somewhere and then you copy it again since you can't know.

Perhaps a better approach would be to not combine this with wiphy registration, but require drivers that may use this to call a new helper function *before* wiphy registration (and *after* calling set_wiphy_dev()), like e.g.

   ieee80211_read_of_data(wiphy);

You can then also make this an inline when OF is not configured in (something which you haven't really taken into account now, you should have used dev_of_node() too instead of dev->of_node)

Yes, this would mean that it doesn't automatically get applied to arbitrary drivers, but it seems unlikely that arbitrary drivers like realtek USB would suddenly get OF node entries ... so that's not necessarily a bad thing.

Quoted 4 lines

In the documentation for this function you could then document that it will modify flags, and as such must not be called when the sband and channel data is shared, getting rid of the waste/complexity of the copy you otherwise have to make in cfg80211.

Thank you, I appreciate your review a lot, I'll work on this according to your comments!

Signature · 5 lines
Rafał
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#10 lore raw

Re: [PATCH V2 3/3] cfg80211: support ieee80211-freq-limit DT property

In reply to a message not in the archive
Quoted 14 lines · Johannes Berg

Perhaps a better approach would be to not combine this with wiphy registration, but require drivers that may use this to call a new helper function *before* wiphy registration (and *after* calling set_wiphy_dev()), like e.g.

   ieee80211_read_of_data(wiphy);

(...)

Yes, this would mean that it doesn't automatically get applied to arbitrary drivers, but it seems unlikely that arbitrary drivers like realtek USB would suddenly get OF node entries ... so that's not necessarily a bad thing.

Quoted 4 lines

In the documentation for this function you could then document that it will modify flags, and as such must not be called when the sband and channel data is shared, getting rid of the waste/complexity of the copy you otherwise have to make in cfg80211.

I just think it may be better to stick to something like ieee80211_read_of_freq_limits
or
wiphy_read_of_freq_limits

As you noted this function will be a bit specific because of modifying (possibly shared) band channels. At some point we may want to add more helpers for other OF properties which won't have extra requirements for driver code. Some drivers may want to use them while not necessary risking have shared band channels modified.

Signature · 5 lines
Rafał
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CACna6rzvvkXBBHrDj4vVgcM0GmzTxM-Bh60nXYOkRH1-2WrWMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#12 lore raw

Re: [PATCH V2 3/3] cfg80211: support ieee80211-freq-limit DT property

Quoted 7 lines · Rafał Miłecki
Quoted 5 lines · Johannes Berg

Perhaps a better approach would be to not combine this with wiphy registration, but require drivers that may use this to call a new helper function *before* wiphy registration (and *after* calling set_wiphy_dev()), like e.g.

Quoted 8 lines
Quoted 3 lines

   ieee80211_read_of_data(wiphy);

(...)

I just think it may be better to stick to something like ieee80211_read_of_freq_limits
or
wiphy_read_of_freq_limits

I have no objection to that.

Quoted 5 lines

As you noted this function will be a bit specific because of modifying (possibly shared) band channels. At some point we may want to add more helpers for other OF properties which won't have extra requirements for driver code. Some drivers may want to use them while not necessary risking have shared band channels modified.

That makes sense, although at that time we might still wish to have a common "read it all" with the combined requirements. But we can cross that bridge when we get to it.

johannes

#13 lore raw
In reply to a message not in the archive
Quoted 14 lines
include/net/cfg80211.h +2 -2
@@ -3730,8 +3730,8 @@ static inline const char *wiphy_name(const
 struct wiphy *wiphy)
   * Return: A pointer to the new wiphy. This pointer must be
   * assigned to each netdev's ieee80211_ptr for proper operation.
   */
-struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int
 sizeof_priv,
-			   const char *requested_name);
+struct wiphy *wiphy_new_nm(struct device *dev, const struct
 cfg80211_ops *ops,
+			   int sizeof_priv, const char
Quoted 1 line

*requested_name);

This is obviously missing documentation updates.

Quoted 6 lines

  */
-static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,

include/net/cfg80211.h +2 -0
+static inline struct wiphy *wiphy_new(struct device *dev,
+				      const struct cfg80211_ops

*ops,

Ditto.

It looks like you practically removed all users of set_wiphy_dev(), why not do that completely and remove that entirely?

johannes
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 27 lines · Johannes Berg
Quoted 14 lines
include/net/cfg80211.h +2 -2
@@ -3730,8 +3730,8 @@ static inline const char *wiphy_name(const
 struct wiphy *wiphy)
  * Return: A pointer to the new wiphy. This pointer must be
  * assigned to each netdev's ieee80211_ptr for proper operation.
  */
-struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int
 sizeof_priv,
-                        const char *requested_name);
+struct wiphy *wiphy_new_nm(struct device *dev, const struct
 cfg80211_ops *ops,
+                        int sizeof_priv, const char
Quoted 1 line

*requested_name);

This is obviously missing documentation updates.

Quoted 6 lines

*/
-static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,

include/net/cfg80211.h +2 -0
+static inline struct wiphy *wiphy_new(struct device *dev,
+                                   const struct cfg80211_ops

*ops,

Ditto.

Quoted 2 lines

It looks like you practically removed all users of set_wiphy_dev(), why not do that completely and remove that entirely?

There are 2 users left:
1) ipw2x00 - I missed that one
2) mac80211 - it's a big one as it's used in SET_IEEE80211_DEV

I was planning to work on mac80211 drivers later. This will require similar modification of ieee80211_alloc_hw.

Signature · 5 lines
Rafał
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CACna6rzc2hk2xosd54eZVSUCtqgtT5E2vii24rgWBV96PR1W7A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#17 lore raw
Quoted 5 lines

2) mac80211 - it's a big one as it's used in SET_IEEE80211_DEV

I was planning to work on mac80211 drivers later. This will require similar modification of ieee80211_alloc_hw.

Ah, ok, thanks for the explanation.

johannes

#18 lore raw
In reply to a message not in the archive
All warnings (new ones prefixed by >>):

Hi Rafał,

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on v4.10-rc2 next-20161224]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Rafa-Mi-ecki/cfg80211-allow-passing-struct-device-in-the-wiphy_new-call/20170103-014525
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.

>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'
   include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'
>> include/net/cfg80211.h:3734: warning: No description found for parameter 'dev'

include/net/cfg80211.h:3751: warning: No description found for parameter 'dev'

vim +/dev +3734 include/net/cfg80211.h

3718
3719 /**
3720 * wiphy_new_nm - create a new wiphy for use with cfg80211
3721 *
3722 * @ops: The configuration operations for this device
3723 * @sizeof_priv: The size of the private area to allocate
3724 * @requested_name: Request a particular name.
3725 * NULL is valid value, and means use the default phy%d naming.
3726 *
3727 * Create a new wiphy and associate the given operations with it.
3728 * @sizeof_priv bytes are allocated for private use.
3729 *
3730 * Return: A pointer to the new wiphy. This pointer must be
3731 * assigned to each netdev's ieee80211_ptr for proper operation.
3732 */
3733 struct wiphy *wiphy_new_nm(struct device *dev, const struct cfg80211_ops *ops,

> 3734				   int sizeof_priv, const char *requested_name);

3735
3736 /**
3737 * wiphy_new - create a new wiphy for use with cfg80211
3738 *
3739 * @ops: The configuration operations for this device
3740 * @sizeof_priv: The size of the private area to allocate
3741 *
3742 * Create a new wiphy and associate the given operations with it.

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#19 lore raw
In reply to a message not in the archive
reproduce:

Hi Rafał,

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on v4.10-rc2 next-20170106]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Rafa-Mi-ecki/cfg80211-allow-passing-struct-device-in-the-wiphy_new-call/20170103-014525
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-randconfig-s2-01081447 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

drivers/net/wireless/intersil/orinoco/cfg.c: In function 'orinoco_wiphy_init':

>> drivers/net/wireless/intersil/orinoco/cfg.c:26: warning: unused variable 'priv'

drivers/net/wireless/intersil/orinoco/cfg.o: warning: objtool: orinoco_set_wiphy_params()+0x1e: function has unreachable instruction

vim +/priv +26 drivers/net/wireless/intersil/orinoco/cfg.c

ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  10  
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  11  #include "cfg.h"
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  12  
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  13  /* Supported bitrates. Must agree with hw.c */
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  14  static struct ieee80211_rate orinoco_rates[] = {
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  15  	{ .bitrate = 10 },
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  16  	{ .bitrate = 20 },
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  17  	{ .bitrate = 55 },
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  18  	{ .bitrate = 110 },
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  19  };
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  20  
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  21  static const void * const orinoco_wiphy_privid = &orinoco_wiphy_privid;
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  22  
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  23  /* Called after orinoco_private is allocated. */
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  24  void orinoco_wiphy_init(struct wiphy *wiphy)
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  25  {
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18 @26  	struct orinoco_private *priv = wiphy_priv(wiphy);
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  27  
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  28  	wiphy->privid = orinoco_wiphy_privid;
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  29  }
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  30  
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  31  /* Called after firmware is initialised */
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  32  int orinoco_wiphy_register(struct wiphy *wiphy)
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  33  {
ea60a6aa drivers/net/wireless/orinoco/cfg.c David Kilroy 2009-06-18  34  	struct orinoco_private *priv = wiphy_priv(wiphy);

:::::: The code at line 26 was first introduced by commit
:::::: ea60a6aaf55984a13a7150568cc103d006e86ab2 orinoco: initiate cfg80211 conversion

:::::: TO: David Kilroy <kilroyd-gM/[email protected]> :::::: CC: John W. Linville <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation