* [PATCH 3.9] rt2x00: error in configurations with mesh support disabled
@ 2013-02-26 15:09 Felix Fietkau
2013-02-27 12:37 ` Gertjan van Wingerde
2013-02-27 15:08 ` Gertjan van Wingerde
0 siblings, 2 replies; 5+ messages in thread
From: Felix Fietkau @ 2013-02-26 15:09 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, users
If CONFIG_MAC80211_MESH is not set, cfg80211 will now allow advertising
interface combinations with NL80211_IFTYPE_MESH_POINT present.
Add appropriate ifdefs to avoid running into errors.
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/rt2x00/rt2x00dev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 1031db6..189744d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1236,8 +1236,10 @@ static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev)
*/
if_limit = &rt2x00dev->if_limits_ap;
if_limit->max = rt2x00dev->ops->max_ap_intf;
- if_limit->types = BIT(NL80211_IFTYPE_AP) |
- BIT(NL80211_IFTYPE_MESH_POINT);
+ if_limit->types = BIT(NL80211_IFTYPE_AP);
+#ifdef CONFIG_MAC80211_MESH
+ if_limit->types |= BIT(NL80211_IFTYPE_MESH_POINT);
+#endif
/*
* Build up AP interface combinations structure.
@@ -1309,7 +1311,9 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
rt2x00dev->hw->wiphy->interface_modes |=
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP) |
+#ifdef CONFIG_MAC80211_MESH
BIT(NL80211_IFTYPE_MESH_POINT) |
+#endif
BIT(NL80211_IFTYPE_WDS);
rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
--
1.8.0.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3.9] rt2x00: error in configurations with mesh support disabled
2013-02-26 15:09 [PATCH 3.9] rt2x00: error in configurations with mesh support disabled Felix Fietkau
@ 2013-02-27 12:37 ` Gertjan van Wingerde
2013-02-27 12:39 ` Johannes Berg
2013-02-27 15:08 ` Gertjan van Wingerde
1 sibling, 1 reply; 5+ messages in thread
From: Gertjan van Wingerde @ 2013-02-27 12:37 UTC (permalink / raw)
To: Felix Fietkau, Johannes Berg
Cc: linux-wireless@vger.kernel.org, John Linville, rt2x00 Users List
Hi Felix,
On Tue, Feb 26, 2013 at 4:09 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> If CONFIG_MAC80211_MESH is not set, cfg80211 will now allow advertising
> interface combinations with NL80211_IFTYPE_MESH_POINT present.
> Add appropriate ifdefs to avoid running into errors.
I'm not sure if rt2x00 is the proper place to fix this. To me it
doesn't look good to have to sprinkle these kind of ifdefs throughout
the drivers to check if mac80211 has mesh enabled.
I would prefer a solution where drivers are still able to indicate
that they support mesh interfaces, but where mac80211/cfg80211 prevent
these kind of interfaces from being created.
@Johannes: What is your view on this?
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> ---
> drivers/net/wireless/rt2x00/rt2x00dev.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
> index 1031db6..189744d 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
> @@ -1236,8 +1236,10 @@ static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev)
> */
> if_limit = &rt2x00dev->if_limits_ap;
> if_limit->max = rt2x00dev->ops->max_ap_intf;
> - if_limit->types = BIT(NL80211_IFTYPE_AP) |
> - BIT(NL80211_IFTYPE_MESH_POINT);
> + if_limit->types = BIT(NL80211_IFTYPE_AP);
> +#ifdef CONFIG_MAC80211_MESH
> + if_limit->types |= BIT(NL80211_IFTYPE_MESH_POINT);
> +#endif
>
> /*
> * Build up AP interface combinations structure.
> @@ -1309,7 +1311,9 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
> rt2x00dev->hw->wiphy->interface_modes |=
> BIT(NL80211_IFTYPE_ADHOC) |
> BIT(NL80211_IFTYPE_AP) |
> +#ifdef CONFIG_MAC80211_MESH
> BIT(NL80211_IFTYPE_MESH_POINT) |
> +#endif
> BIT(NL80211_IFTYPE_WDS);
>
> rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
> --
> 1.8.0.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
---
Gertjan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3.9] rt2x00: error in configurations with mesh support disabled
2013-02-27 12:37 ` Gertjan van Wingerde
@ 2013-02-27 12:39 ` Johannes Berg
2013-02-27 15:06 ` Gertjan van Wingerde
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2013-02-27 12:39 UTC (permalink / raw)
To: Gertjan van Wingerde
Cc: Felix Fietkau, linux-wireless@vger.kernel.org, John Linville,
rt2x00 Users List
On Wed, 2013-02-27 at 13:37 +0100, Gertjan van Wingerde wrote:
> Hi Felix,
>
> On Tue, Feb 26, 2013 at 4:09 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> > If CONFIG_MAC80211_MESH is not set, cfg80211 will now allow advertising
typo: "will not allow"
> > interface combinations with NL80211_IFTYPE_MESH_POINT present.
> > Add appropriate ifdefs to avoid running into errors.
>
> I'm not sure if rt2x00 is the proper place to fix this. To me it
> doesn't look good to have to sprinkle these kind of ifdefs throughout
> the drivers to check if mac80211 has mesh enabled.
> I would prefer a solution where drivers are still able to indicate
> that they support mesh interfaces, but where mac80211/cfg80211 prevent
> these kind of interfaces from being created.
>
> @Johannes: What is your view on this?
It would be nicer, but the data is const so mac80211 can't modify it,
and I don't see that we should add a lot of code/handshaking to
mac80211/cfg80211 just to avoid one ifdef here.
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3.9] rt2x00: error in configurations with mesh support disabled
2013-02-27 12:39 ` Johannes Berg
@ 2013-02-27 15:06 ` Gertjan van Wingerde
0 siblings, 0 replies; 5+ messages in thread
From: Gertjan van Wingerde @ 2013-02-27 15:06 UTC (permalink / raw)
To: Johannes Berg
Cc: Felix Fietkau, linux-wireless@vger.kernel.org, John Linville,
rt2x00 Users List
On Wed, Feb 27, 2013 at 1:39 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Wed, 2013-02-27 at 13:37 +0100, Gertjan van Wingerde wrote:
>> Hi Felix,
>>
>> On Tue, Feb 26, 2013 at 4:09 PM, Felix Fietkau <nbd@openwrt.org> wrote:
>> > If CONFIG_MAC80211_MESH is not set, cfg80211 will now allow advertising
>
> typo: "will not allow"
>
>> > interface combinations with NL80211_IFTYPE_MESH_POINT present.
>> > Add appropriate ifdefs to avoid running into errors.
>>
>> I'm not sure if rt2x00 is the proper place to fix this. To me it
>> doesn't look good to have to sprinkle these kind of ifdefs throughout
>> the drivers to check if mac80211 has mesh enabled.
>> I would prefer a solution where drivers are still able to indicate
>> that they support mesh interfaces, but where mac80211/cfg80211 prevent
>> these kind of interfaces from being created.
>>
>> @Johannes: What is your view on this?
>
> It would be nicer, but the data is const so mac80211 can't modify it,
> and I don't see that we should add a lot of code/handshaking to
> mac80211/cfg80211 just to avoid one ifdef here.
>
OK. No worries. Was just looking if there was an alternative.
I'll ack Felix' patch then
--
---
Gertjan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3.9] rt2x00: error in configurations with mesh support disabled
2013-02-26 15:09 [PATCH 3.9] rt2x00: error in configurations with mesh support disabled Felix Fietkau
2013-02-27 12:37 ` Gertjan van Wingerde
@ 2013-02-27 15:08 ` Gertjan van Wingerde
1 sibling, 0 replies; 5+ messages in thread
From: Gertjan van Wingerde @ 2013-02-27 15:08 UTC (permalink / raw)
To: Felix Fietkau
Cc: linux-wireless@vger.kernel.org, John Linville, rt2x00 Users List
On Tue, Feb 26, 2013 at 4:09 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> If CONFIG_MAC80211_MESH is not set, cfg80211 will now allow advertising
> interface combinations with NL80211_IFTYPE_MESH_POINT present.
> Add appropriate ifdefs to avoid running into errors.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
> ---
> drivers/net/wireless/rt2x00/rt2x00dev.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
> index 1031db6..189744d 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
> @@ -1236,8 +1236,10 @@ static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev)
> */
> if_limit = &rt2x00dev->if_limits_ap;
> if_limit->max = rt2x00dev->ops->max_ap_intf;
> - if_limit->types = BIT(NL80211_IFTYPE_AP) |
> - BIT(NL80211_IFTYPE_MESH_POINT);
> + if_limit->types = BIT(NL80211_IFTYPE_AP);
> +#ifdef CONFIG_MAC80211_MESH
> + if_limit->types |= BIT(NL80211_IFTYPE_MESH_POINT);
> +#endif
>
> /*
> * Build up AP interface combinations structure.
> @@ -1309,7 +1311,9 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
> rt2x00dev->hw->wiphy->interface_modes |=
> BIT(NL80211_IFTYPE_ADHOC) |
> BIT(NL80211_IFTYPE_AP) |
> +#ifdef CONFIG_MAC80211_MESH
> BIT(NL80211_IFTYPE_MESH_POINT) |
> +#endif
> BIT(NL80211_IFTYPE_WDS);
>
> rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
> --
> 1.8.0.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
---
Gertjan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-27 15:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 15:09 [PATCH 3.9] rt2x00: error in configurations with mesh support disabled Felix Fietkau
2013-02-27 12:37 ` Gertjan van Wingerde
2013-02-27 12:39 ` Johannes Berg
2013-02-27 15:06 ` Gertjan van Wingerde
2013-02-27 15:08 ` Gertjan van Wingerde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).