linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: ieee80211_sta_set_bssid should call config_interface()
@ 2009-01-23  1:30 Samuel Ortiz
  2009-01-23  2:44 ` Sedat Dilek
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Ortiz @ 2009-01-23  1:30 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Alina Friedrichsen, Kalle Valo, Larry Finger,
	Reinette Chatre

From: Samuel Ortiz <samuel.ortiz@intel.com>

With commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, we end up not calling
config_interface() when we're in STA, but not Ad-Hoc. This breaks several
drivers, and the fix is to get ieee80211_sta_set_bssid() to call
ieee80211_if_config() again.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 net/mac80211/mlme.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: wireless-testing/net/mac80211/mlme.c
===================================================================
--- wireless-testing.orig/net/mac80211/mlme.c	2009-01-23 01:33:54.000000000 +0100
+++ wireless-testing/net/mac80211/mlme.c	2009-01-23 01:36:51.000000000 +0100
@@ -2650,6 +2650,18 @@ int ieee80211_sta_set_bssid(struct ieee8
 		ifsta->flags &= ~IEEE80211_STA_BSSID_SET;
 	}
 
+	if (netif_running(sdata->dev)) {
+		int ret;
+
+		ret = ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID);
+
+		if (ret) {
+			printk(KERN_DEBUG "%s: Failed to config new BSSID to "
+			       "the low-level driver\n", sdata->dev->name);
+			return ret;
+		}
+	}
+
 	return ieee80211_sta_set_ssid(sdata, ifsta->ssid, ifsta->ssid_len);
 }
 
-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: ieee80211_sta_set_bssid should call config_interface()
  2009-01-23  1:30 [PATCH] mac80211: ieee80211_sta_set_bssid should call config_interface() Samuel Ortiz
@ 2009-01-23  2:44 ` Sedat Dilek
  2009-01-23 18:50   ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Sedat Dilek @ 2009-01-23  2:44 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: John W. Linville, linux-wireless, Alina Friedrichsen, Kalle Valo,
	Larry Finger, Reinette Chatre

Just to clarify:
The revert-patch of Alina's fix (causing regression) is no more needed?

-SD

On Fri, Jan 23, 2009 at 2:30 AM, Samuel Ortiz <samuel@sortiz.org> wrote:
> From: Samuel Ortiz <samuel.ortiz@intel.com>
>
> With commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, we end up not calling
> config_interface() when we're in STA, but not Ad-Hoc. This breaks several
> drivers, and the fix is to get ieee80211_sta_set_bssid() to call
> ieee80211_if_config() again.
>
> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
> ---
>  net/mac80211/mlme.c |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> Index: wireless-testing/net/mac80211/mlme.c
> ===================================================================
> --- wireless-testing.orig/net/mac80211/mlme.c   2009-01-23 01:33:54.000000000 +0100
> +++ wireless-testing/net/mac80211/mlme.c        2009-01-23 01:36:51.000000000 +0100
> @@ -2650,6 +2650,18 @@ int ieee80211_sta_set_bssid(struct ieee8
>                ifsta->flags &= ~IEEE80211_STA_BSSID_SET;
>        }
>
> +       if (netif_running(sdata->dev)) {
> +               int ret;
> +
> +               ret = ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID);
> +
> +               if (ret) {
> +                       printk(KERN_DEBUG "%s: Failed to config new BSSID to "
> +                              "the low-level driver\n", sdata->dev->name);
> +                       return ret;
> +               }
> +       }
> +
>        return ieee80211_sta_set_ssid(sdata, ifsta->ssid, ifsta->ssid_len);
>  }
>
> --
> Intel Open Source Technology Centre
> http://oss.intel.com/
> --
> 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: ieee80211_sta_set_bssid should call config_interface()
  2009-01-23  2:44 ` Sedat Dilek
@ 2009-01-23 18:50   ` John W. Linville
  0 siblings, 0 replies; 3+ messages in thread
From: John W. Linville @ 2009-01-23 18:50 UTC (permalink / raw)
  To: Sedat Dilek
  Cc: Samuel Ortiz, linux-wireless, Alina Friedrichsen, Kalle Valo,
	Larry Finger, Reinette Chatre

I'm going to drop this patch too.

Alina, please account for this change when reposting the original patch.

Thanks,

John

On Fri, Jan 23, 2009 at 03:44:53AM +0100, Sedat Dilek wrote:
> Just to clarify:
> The revert-patch of Alina's fix (causing regression) is no more needed?
> 
> -SD
> 
> On Fri, Jan 23, 2009 at 2:30 AM, Samuel Ortiz <samuel@sortiz.org> wrote:
> > From: Samuel Ortiz <samuel.ortiz@intel.com>
> >
> > With commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, we end up not calling
> > config_interface() when we're in STA, but not Ad-Hoc. This breaks several
> > drivers, and the fix is to get ieee80211_sta_set_bssid() to call
> > ieee80211_if_config() again.
> >
> > Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
> > Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
> > ---
> >  net/mac80211/mlme.c |   12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > Index: wireless-testing/net/mac80211/mlme.c
> > ===================================================================
> > --- wireless-testing.orig/net/mac80211/mlme.c   2009-01-23 01:33:54.000000000 +0100
> > +++ wireless-testing/net/mac80211/mlme.c        2009-01-23 01:36:51.000000000 +0100
> > @@ -2650,6 +2650,18 @@ int ieee80211_sta_set_bssid(struct ieee8
> >                ifsta->flags &= ~IEEE80211_STA_BSSID_SET;
> >        }
> >
> > +       if (netif_running(sdata->dev)) {
> > +               int ret;
> > +
> > +               ret = ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID);
> > +
> > +               if (ret) {
> > +                       printk(KERN_DEBUG "%s: Failed to config new BSSID to "
> > +                              "the low-level driver\n", sdata->dev->name);
> > +                       return ret;
> > +               }
> > +       }
> > +
> >        return ieee80211_sta_set_ssid(sdata, ifsta->ssid, ifsta->ssid_len);
> >  }
> >
> > --
> > Intel Open Source Technology Centre
> > http://oss.intel.com/
> > --
> > 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
> >
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-23 19:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23  1:30 [PATCH] mac80211: ieee80211_sta_set_bssid should call config_interface() Samuel Ortiz
2009-01-23  2:44 ` Sedat Dilek
2009-01-23 18:50   ` John W. Linville

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).