2013-01-25 10:59:32

by Yogesh Ashok Powar

[permalink] [raw]
Subject: [PATCH] mwl8k: Announcing AP_VLAN suport

AP_VLAN support is needed in order to support
wds_sta in the hostapd. This will allow us
adding support for 4-address for AP and client
mode

Signed-off-by: Yogesh Ashok Powar <[email protected]>
Signed-off-by: Nishant Sarmukadam <[email protected]>
---
drivers/net/wireless/mwl8k.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index ee5c7ea..8788157 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -5920,6 +5920,7 @@ static int mwl8k_firmware_load_success(struct mwl8k_priv *priv)

if (priv->ap_macids_supported || priv->device_info->fw_image_ap) {
hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
+ hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_STATION);
hw->wiphy->iface_combinations = &ap_if_comb;
hw->wiphy->n_iface_combinations = 1;
--
1.8.0.3



2013-01-28 07:11:45

by Yogesh Ashok Powar

[permalink] [raw]
Subject: Re: [PATCH] mwl8k: Announcing AP_VLAN suport

> > if (priv->ap_macids_supported || priv->device_info->fw_image_ap) {
> > hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
> > + hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
> > hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_STATION);
>
> Hmm, why is this needed? mac80211 should add it:
>
> /* if low-level driver supports AP, we also support VLAN */
> if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
> hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
> hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_AP_VLAN);
> }
>
> Is this run too late, i.e. after registering hw? If so, that's a bug.

Hi Johannes,

We agree with you. There is no need to explicitly set
NL80211_IFTYPE_AP_VLAN support for AP driver. This patch
is redundant.

@John: Please ignore this patch.

Thanks
Yogesh

>
> johannes
>

2013-01-25 11:45:16

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mwl8k: Announcing AP_VLAN suport

On Fri, 2013-01-25 at 16:21 +0530, Yogesh Ashok Powar wrote:
> AP_VLAN support is needed in order to support
> wds_sta in the hostapd. This will allow us
> adding support for 4-address for AP and client
> mode
>
> Signed-off-by: Yogesh Ashok Powar <[email protected]>
> Signed-off-by: Nishant Sarmukadam <[email protected]>
> ---
> drivers/net/wireless/mwl8k.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
> index ee5c7ea..8788157 100644
> --- a/drivers/net/wireless/mwl8k.c
> +++ b/drivers/net/wireless/mwl8k.c
> @@ -5920,6 +5920,7 @@ static int mwl8k_firmware_load_success(struct mwl8k_priv *priv)
>
> if (priv->ap_macids_supported || priv->device_info->fw_image_ap) {
> hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
> + hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
> hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_STATION);

Hmm, why is this needed? mac80211 should add it:

/* if low-level driver supports AP, we also support VLAN */
if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_AP_VLAN);
}

Is this run too late, i.e. after registering hw? If so, that's a bug.

johannes