Re: [RFC 1/3] cfg80211: Add support for HE
From: Arend van Spriel <arend.vanspriel@broadcom.com>
Date: 2018-05-28 09:05:36
On 5/25/2018 9:51 PM, Luca Coelho wrote:
Arend, On Fri, 2018-05-25 at 13:11 +0300, Luca Coelho wrote:quoted
On Mon, 2018-05-21 at 21:47 +0200, Arend van Spriel wrote:quoted
On 5/18/2018 4:05 PM, Luca Coelho wrote:quoted
@@ -781,6 +783,23 @@ int wiphy_register(struct wiphy *wiphy) sband->channels[i].band = band; } + for (i = 0; i < sband->n_iftype_data; i++) { + const struct ieee80211_sband_iftype_data*iftd; + + iftd = &sband->iftype_data[i]; + + if (WARN_ON(!iftd->types)) + return -EINVAL; + if (WARN_ON(types & iftd->types)) + return -EINVAL;I suspected the types mask was not allowed to overlap for the iftype_data entries, but may be worth documenting that in struct ieee80211_sband_iftype_data kerneldoc.Sure, I'll add it.Actually, looking into this again, I'm not sure I understand your comment. AFAICT this prevents the same type from appearing twice, right? I don't get the "not allowed to overlap"... Can you clarify?
I mean that iftdata entries can not overlap by having the same iftypes set in their mask. So yes, a particular iftype may only be used in a single entry (yet another way to say it ;-) ). Gr. AvS