Firmware do not support change interface from micro-ap mode to
station mode, forbidden this operation in driver accordingly.
Signed-off-by: Cathy Luo <[email protected]>
Signed-off-by: Xinming Hu <[email protected]>
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 6e0d9a9..a87758f 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -1181,6 +1181,12 @@ static int mwifiex_deinit_priv_params(struct mwifiex_private *priv)
switch (type) {
case NL80211_IFTYPE_ADHOC:
case NL80211_IFTYPE_STATION:
+ if (mwifiex_get_priv_by_id(priv->adapter, priv->bss_num,
+ MWIFIEX_BSS_TYPE_STA)){
+ mwifiex_dbg(priv->adapter, INFO,
+ "Skip change virtual interface\n");
+ return 0;
+ }
return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype,
type, params);
break;
--
1.9.1
SGkgSmFtZXMsDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogcXVvemxA
bGFwdG9wLm9yZyBbbWFpbHRvOnF1b3psQGxhcHRvcC5vcmddDQo+IFNlbnQ6IDIwMTfE6jEx1MIy
McjVIDE2OjA0DQo+IFRvOiBYaW5taW5nIEh1IDxodXhtQG1hcnZlbGwuY29tPg0KPiBDYzogTGlu
dXggV2lyZWxlc3MgPGxpbnV4LXdpcmVsZXNzQHZnZXIua2VybmVsLm9yZz47IEthbGxlIFZhbG8N
Cj4gPGt2YWxvQGNvZGVhdXJvcmEub3JnPjsgQnJpYW4gTm9ycmlzIDxicmlhbm5vcnJpc0BjaHJv
bWl1bS5vcmc+OyBEbWl0cnkNCj4gVG9yb2tob3YgPGR0b3JAZ29vZ2xlLmNvbT47IHJhamF0amFA
Z29vZ2xlLmNvbTsgWmhpeXVhbiBZYW5nDQo+IDx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> Sent: 2017年11月21日 16:04
> > To: Xinming Hu <[email protected]>
> > Cc: Linux Wireless <[email protected]>; Kalle Valo
> > <[email protected]>; Brian Norris <[email protected]>; Dmitry
> > Torokhov <[email protected]>; [email protected]; Zhiyuan Yang
> > <[email protected]>; Tim Song <[email protected]>; Cathy Luo
> > <[email protected]>; James Cao <[email protected]>; Ganapathi Bhat
> > <[email protected]>; Ellie Reeves <[email protected]>
> > Subject: [EXT] Re: [PATCH] mwifiex: do not support change AP interface to
> > station mode
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On Tue, Nov 21, 2017 at 03:24:03PM +0800, Xinming Hu wrote:
> > > Firmware do not support change interface from micro-ap mode to station
> > > mode, forbidden this operation in driver accordingly.
> >
> > All firmware or specific versions?
> >
>
> This property result from the initial design consideration in
> firmware.
Thanks. I maintain a product that uses your MV8787 device with
firmware sd8787_uapsta.bin and review mwifiex patches for local
backport.
>
> > >
> > > Signed-off-by: Cathy Luo <[email protected]>
> > > Signed-off-by: Xinming Hu <[email protected]>
> > > ---
> > > drivers/net/wireless/marvell/mwifiex/cfg80211.c | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> > > b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> > > index 6e0d9a9..a87758f 100644
> > > --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> > > +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> > > @@ -1181,6 +1181,12 @@ static int mwifiex_deinit_priv_params(struct
> > mwifiex_private *priv)
> > > switch (type) {
> > > case NL80211_IFTYPE_ADHOC:
> > > case NL80211_IFTYPE_STATION:
> > > + if (mwifiex_get_priv_by_id(priv->adapter, priv->bss_num,
> > > + MWIFIEX_BSS_TYPE_STA)){
> >
> > Is this test necessary?
>
> Hhn, yes, Will remove this check, which comes from a fix for combo sta/uap case.
> Thanks for the suggestion.
>
> >
> > dev->ieee80211_ptr->iftype is always NL80211_IFTYPE_AP at this point.
> >
> > > + mwifiex_dbg(priv->adapter, INFO,
> > > + "Skip change virtual interface\n");
> >
> > Is this message easy to understand? Other messages in the same function
> > seem easier; e.g. "%s: changing to %d not supported\n"
>
> OK.
>
> >
> > > + return 0;
> >
> > Should this be -EOPNOTSUPP rather than 0?
>
> Yes.
>
> >
> > > + }
> > > return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype,
> > > type, params);
> > > break;
> > > --
> > > 1.9.1
> > >
> >
> > --
> > James Cameron
> > http://quozl.netrek.org/
--
James Cameron
http://quozl.netrek.org/
On Tue, Nov 21, 2017 at 03:24:03PM +0800, Xinming Hu wrote:
> Firmware do not support change interface from micro-ap mode to
> station mode, forbidden this operation in driver accordingly.
All firmware or specific versions?
>
> Signed-off-by: Cathy Luo <[email protected]>
> Signed-off-by: Xinming Hu <[email protected]>
> ---
> drivers/net/wireless/marvell/mwifiex/cfg80211.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> index 6e0d9a9..a87758f 100644
> --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> @@ -1181,6 +1181,12 @@ static int mwifiex_deinit_priv_params(struct mwifiex_private *priv)
> switch (type) {
> case NL80211_IFTYPE_ADHOC:
> case NL80211_IFTYPE_STATION:
> + if (mwifiex_get_priv_by_id(priv->adapter, priv->bss_num,
> + MWIFIEX_BSS_TYPE_STA)){
Is this test necessary?
dev->ieee80211_ptr->iftype is always NL80211_IFTYPE_AP at this point.
> + mwifiex_dbg(priv->adapter, INFO,
> + "Skip change virtual interface\n");
Is this message easy to understand? Other messages in the same
function seem easier; e.g. "%s: changing to %d not supported\n"
> + return 0;
Should this be -EOPNOTSUPP rather than 0?
> + }
> return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype,
> type, params);
> break;
> --
> 1.9.1
>
--
James Cameron
http://quozl.netrek.org/