Skip to contentSkip to conversation

: staging - mac80211 - unify config_interface and bss_info_changed

GIT Tim Gardner 2 participants 6 messages Apr 29, 2009 – Apr 30, 2009 Staging

lore
Share & tools
lore
#0 lore raw

Greg,

I did a build test to make sure things at least compile. checkpatch is fine with these patches, but the drivers clearly have other formatting issues.

Lemme know if you have any problems.

rtg

The following changes since commit 789a03102c542f34ae831a3aa8af37c6538449e3:
Stephen Rothwell (1):
Add linux-next specific files for 20090429

are available in the git repository at:

git://kernel.ubuntu.com/rtg/linux-next staging-for-gregkh

Tim Gardner (3):
staging: winbond: mac80211 - unify config_interface and bss_info_changed
staging: agnx: mac80211 - unify config_interface and bss_info_changed
staging: stlc45xx: mac80211 - unify config_interface and bss_info_changed

 drivers/staging/agnx/pci.c          |   17 +++++++++--------
 drivers/staging/stlc45xx/stlc45xx.c |   28 +++++++++-------------------
 drivers/staging/winbond/wbusb.c     |    9 ---------
 3 files changed, 18 insertions(+), 36 deletions(-)
Quoted 1 line

From a86a4c50b3ea4bfb59ef0b2b410b173f8b164e32 Mon Sep 17 00:00:00 2001

From: Tim Gardner <[email protected]>
Date: Wed, 29 Apr 2009 11:43:57 -0600
Subject: [PATCH] staging: winbond: mac80211 - unify config_interface and bss_info_changed

The commit 'mac80211: unify config_interface and bss_info_changed' from Johannes Berg <[email protected]> removed the config_interface structure tag from struct ieee80211_ops. The BSSID detection functionality migrated to ieee80211_ops.bss_info_changed.

Since wbsoft_config_interface() was largely empty, there wasn't much to do other then to remove the function itself. There is currently no support for BSSID change detection.

---
 drivers/staging/winbond/wbusb.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
drivers/staging/winbond/wbusb.c +0 -9
index c46ff47..745279c 100644
@@ -264,14 +264,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)
 	return 0;
 }
 
-static int wbsoft_config_interface(struct ieee80211_hw *dev,
-				   struct ieee80211_vif *vif,
-				   struct ieee80211_if_conf *conf)
-{
-	printk("wbsoft_config_interface called\n");
-	return 0;
-}
-
 static u64 wbsoft_get_tsf(struct ieee80211_hw *dev)
 {
 	printk("wbsoft_get_tsf called\n");
@@ -285,7 +277,6 @@ static const struct ieee80211_ops wbsoft_ops = {
 	.add_interface		= wbsoft_add_interface,
 	.remove_interface	= wbsoft_remove_interface,
 	.config			= wbsoft_config,
-	.config_interface	= wbsoft_config_interface,
 	.configure_filter	= wbsoft_configure_filter,
 	.get_stats		= wbsoft_get_stats,
 	.get_tx_stats		= wbsoft_get_tx_stats,
Signature · 1 line
1.5.6.3
Quoted 1 line

From 4c018c21ce053262557d2273f6419be678e01820 Mon Sep 17 00:00:00 2001

From: Tim Gardner <[email protected]>
Date: Wed, 29 Apr 2009 12:52:02 -0600
Subject: [PATCH] staging: agnx: mac80211 - unify config_interface and bss_info_changed

The commit 'mac80211: unify config_interface and bss_info_changed' from Johannes Berg <[email protected]> removed the config_interface structure tag from struct ieee80211_ops. The BSSID detection functionality migrated to ieee80211_ops.bss_info_changed.

Renamed agnx_config_interface() to agnc_bss_info_changed() with suitable refactoring.

---
 drivers/staging/agnx/pci.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
drivers/staging/agnx/pci.c +9 -8
index 61b15fa..f078b98 100644
@@ -302,9 +302,10 @@ static int agnx_config(struct ieee80211_hw *dev, u32 changed)
 	return 0;
 }
 
-static int agnx_config_interface(struct ieee80211_hw *dev,
+static void agnx_bss_info_changed(struct ieee80211_hw *dev,
 				 struct ieee80211_vif *vif,
-				 struct ieee80211_if_conf *conf)
+				 struct ieee80211_bss_conf *info,
+				 u32 changes)
 {
 	struct agnx_priv *priv = dev->priv;
 	void __iomem *ctl = priv->ctl;
@@ -312,17 +313,17 @@ static int agnx_config_interface(struct ieee80211_hw *dev,
 
 	spin_lock(&priv->lock);
 
-	if (memcmp(conf->bssid, priv->bssid, ETH_ALEN)) {
-		agnx_set_bssid(priv, conf->bssid);
-		memcpy(priv->bssid, conf->bssid, ETH_ALEN);
-		hash_write(priv, conf->bssid, BSSID_STAID);
+	if ((changes & BSS_CHANGED_BSSID) ||
+		memcmp(info->bssid, priv->bssid, ETH_ALEN)) {
+		agnx_set_bssid(priv, info->bssid);
+		memcpy(priv->bssid, info->bssid, ETH_ALEN);
+		hash_write(priv, info->bssid, BSSID_STAID);
 		sta_init(priv, BSSID_STAID);
 		/* FIXME needed? */
 		sta_power_init(priv, BSSID_STAID);
 		agnx_write32(ctl, AGNX_BM_MTSM, 0xff & ~0x1);
 	}
 	spin_unlock(&priv->lock);
-	return 0;
 } /* agnx_config_interface */
 
 
@@ -421,7 +422,7 @@ static struct ieee80211_ops agnx_ops = {
 	.add_interface		= agnx_add_interface,
 	.remove_interface	= agnx_remove_interface,
 	.config			= agnx_config,
-	.config_interface	= agnx_config_interface,
+	.bss_info_changed	= agnx_bss_info_changed,
 	.configure_filter	= agnx_configure_filter,
 	.get_stats		= agnx_get_stats,
 	.get_tx_stats		= agnx_get_tx_stats,
Signature · 1 line
1.5.6.3
Quoted 1 line

From de7452482673977c8f526997dbf033e78117ffd1 Mon Sep 17 00:00:00 2001

From: Tim Gardner <[email protected]>
Date: Wed, 29 Apr 2009 13:02:18 -0600
Subject: [PATCH] staging: stlc45xx: mac80211 - unify config_interface and bss_info_changed

The commit 'mac80211: unify config_interface and bss_info_changed' from Johannes Berg <[email protected]> removed the config_interface structure tag from struct ieee80211_ops. The BSSID detection functionality migrated to ieee80211_ops.bss_info_changed.

Merged BSSID change detection from stlc45xx_op_config_interface() into stlc45xx_op_bss_info_changed() and removed stlc45xx_op_config_interface(). Also added missing mutex locking to stlc45xx_op_bss_info_changed().

---
 drivers/staging/stlc45xx/stlc45xx.c |   28 +++++++++-------------------
 1 files changed, 9 insertions(+), 19 deletions(-)
drivers/staging/stlc45xx/stlc45xx.c +9 -19
index cfdaac9..32b2354 100644
@@ -2235,24 +2235,6 @@ static void stlc45xx_op_remove_interface(struct ieee80211_hw *hw,
 	stlc45xx_debug(DEBUG_FUNC, "%s", __func__);
 }
 
-static int stlc45xx_op_config_interface(struct ieee80211_hw *hw,
-					struct ieee80211_vif *vif,
-					struct ieee80211_if_conf *conf)
-{
-	struct stlc45xx *stlc = hw->priv;
-
-	stlc45xx_debug(DEBUG_FUNC, "%s", __func__);
-
-	mutex_lock(&stlc->mutex);
-
-	memcpy(stlc->bssid, conf->bssid, ETH_ALEN);
-	stlc45xx_tx_setup(stlc);
-
-	mutex_unlock(&stlc->mutex);
-
-	return 0;
-}
-
 static int stlc45xx_op_config(struct ieee80211_hw *hw, u32 changed)
 {
 	struct stlc45xx *stlc = hw->priv;
@@ -2295,6 +2277,8 @@ static void stlc45xx_op_bss_info_changed(struct ieee80211_hw *hw,
 {
 	struct stlc45xx *stlc = hw->priv;
 
+	mutex_lock(&stlc->mutex);
+
 	if (changed & BSS_CHANGED_ASSOC) {
 		stlc->associated = info->assoc;
 		if (info->assoc)
@@ -2307,6 +2291,13 @@ static void stlc45xx_op_bss_info_changed(struct ieee80211_hw *hw,
 			stlc45xx_tx_nullfunc(stlc, stlc->psm);
 		}
 	}
+
+	if (changed & BSS_CHANGED_BSSID) {
+			memcpy(stlc->bssid, info->bssid, ETH_ALEN);
+			stlc45xx_tx_setup(stlc);
+	}
+
+	mutex_unlock(&stlc->mutex);
 }
 
 
@@ -2357,7 +2348,6 @@ static const struct ieee80211_ops stlc45xx_ops = {
 	.add_interface = stlc45xx_op_add_interface,
 	.remove_interface = stlc45xx_op_remove_interface,
 	.config = stlc45xx_op_config,
-	.config_interface = stlc45xx_op_config_interface,
 	.configure_filter = stlc45xx_op_configure_filter,
 	.tx = stlc45xx_op_tx,
 	.bss_info_changed = stlc45xx_op_bss_info_changed,
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 6 lines · Tim Gardner

Greg,

I did a build test to make sure things at least compile. checkpatch is fine with these patches, but the drivers clearly have other formatting issues.

Lemme know if you have any problems.

Only thing that is a problem is that I can't pull 3 individual patches out of one email :)

Care to use git send-email to send them to me?

thanks,

greg k-h

#2 lore raw
Quoted 6 lines · Greg KH
Quoted 5 lines · Tim Gardner

Greg,

I did a build test to make sure things at least compile. checkpatch is fine with these patches, but the drivers clearly have other formatting issues.

Quoted 7 lines
Quoted 1 line

Lemme know if you have any problems.

Only thing that is a problem is that I can't pull 3 individual patches out of one email :)

Care to use git send-email to send them to me?

Done, though I didn't Cc LKML again. I take it this is your preferred method for receiving patches? I thought you were a git weenie.

rtg

Signature · 2 lines
Tim Gardner [email protected] www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
#3 lore raw
Quoted 12 lines · Tim Gardner
Quoted 11 lines · Greg KH
Quoted 6 lines · Tim Gardner

Greg,

I did a build test to make sure things at least compile. checkpatch is fine with these patches, but the drivers clearly have other formatting issues.

Lemme know if you have any problems.

Only thing that is a problem is that I can't pull 3 individual patches out of one email :)

Quoted 7 lines
Quoted 2 lines

Care to use git send-email to send them to me?

Done, though I didn't Cc LKML again. I take it this is your preferred method for receiving patches? I thought you were a git weenie.

From the MAINTAINERS file:

STAGING SUBSYSTEM
P: Greg Kroah-Hartman
M: [email protected]
L: [email protected]
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S: Maintained

I use quilt to handle the large patch queues.

I also didn't see a 'pull' request in your email, did I miss it?

And yes, emails are best.

thanks,

greg k-h

#4 lore raw
Quoted 27 lines · Greg KH
Quoted 7 lines · Tim Gardner
Quoted 6 lines · Greg KH
Quoted 5 lines · Tim Gardner

Greg,

I did a build test to make sure things at least compile. checkpatch is fine with these patches, but the drivers clearly have other formatting issues.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Lemme know if you have any problems.

Only thing that is a problem is that I can't pull 3 individual patches out of one email :)

Care to use git send-email to send them to me?

Done, though I didn't Cc LKML again. I take it this is your preferred method for receiving patches? I thought you were a git weenie.

From the MAINTAINERS file:
STAGING SUBSYSTEM
P: Greg Kroah-Hartman
M: [email protected]
L: [email protected]
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S: Maintained

I use quilt to handle the large patch queues.

Quoted 8 lines

I also didn't see a 'pull' request in your email, did I miss it?

And yes, emails are best.

thanks,

greg k-h

It was in the original email:

The following changes since commit 789a03102c542f34ae831a3aa8af37c6538449e3:
Stephen Rothwell (1):
Add linux-next specific files for 20090429

are available in the git repository at:

git://kernel.ubuntu.com/rtg/linux-next staging-for-gregkh

Tim Gardner (3):
staging: winbond: mac80211 - unify config_interface and
bss_info_changed
staging: agnx: mac80211 - unify config_interface and bss_info_changed
staging: stlc45xx: mac80211 - unify config_interface and
bss_info_changed

 drivers/staging/agnx/pci.c          |   17 +++++++++--------
 drivers/staging/stlc45xx/stlc45xx.c |   28 +++++++++-------------------
 drivers/staging/winbond/wbusb.c     |    9 ---------
 3 files changed, 18 insertions(+), 36 deletions(-)

Why do you want a pull request if you're using quilt?

rtg

Signature · 2 lines
Tim Gardner [email protected] www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
#5 lore raw
Quoted 9 lines · Tim Gardner

It was in the original email:

The following changes since commit 789a03102c542f34ae831a3aa8af37c6538449e3:
Stephen Rothwell (1):
Add linux-next specific files for 20090429

are available in the git repository at:

git://kernel.ubuntu.com/rtg/linux-next staging-for-gregkh

Oops, sorry, you are correct, my mistake.

Quoted 1 line

Why do you want a pull request if you're using quilt?

I don't, it's a pain, that's why I want patches instead :)

thanks,

greg k-h