R Rafał Miłecki #
Message details and related content
On 28 December 2016 at 22:07, Arend van Spriel [off-list ref] wrote:
On 28-12-16 16:59, Rafa=C5=82 Mi=C5=82ecki wrote:quoted
From: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl> They allow 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. E.g. some tri-band routers have separated radios for lower and higher part of 5 GHz band. Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl> --- net/wireless/reg.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 5dbac37..35ba5c7 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c@@ -1123,6 +1123,26 @@ const char *reg_initiator_name(enum nl80211_reg_i=
nitiator initiator)
quoted
} EXPORT_SYMBOL(reg_initiator_name); +static bool reg_center_freq_of_valid(struct wiphy *wiphy, + struct ieee80211_channel *chan) +{ + struct device_node *np =3D wiphy_dev(wiphy)->of_node; + u32 val; + + if (!np) + return true; + + if (!of_property_read_u32(np, "ieee80211-min-center-freq", &val) &=
&
quoted
+ chan->center_freq < KHZ_TO_MHZ(val)) + return false; + + if (!of_property_read_u32(np, "ieee80211-max-center-freq", &val) &=
&
quoted
+ chan->center_freq > KHZ_TO_MHZ(val)) + return false;I suspect these functions rely on CONFIG_OF. So might not build for !CONFIG_OF.
I compiled it with
# CONFIG_OF is not set
Can you test it and provide a non-working config if you see a
compilation error, please?
--=20
Rafa=C5=82