Skip to contentSkip to conversation

Please pull 'upstream-davem' branch of wireless-2.6

PATCH John W. Linville 4 participants 6 messages Jul 18, 2007 – Jul 19, 2007 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

A few more for 2.6.23...individual patches available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem

Thanks!

John
---

The following changes since commit 4ad1366376bfef32ec0ffa12d1faa483d6f330bd:
NeilBrown (1):
md: change bitmap_unplug and others to void functions

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-davem

Daniel Drake (1):
mac80211: regulatory domain cleanup

Johannes Berg (2):
mac80211: use debugfs_rename
mac80211: regdomain.c needs to include ieee80211_i.h

 net/mac80211/Makefile          |    1 +
 net/mac80211/debugfs_netdev.c  |    9 ++-
 net/mac80211/ieee80211.c       |    3 +-
 net/mac80211/ieee80211_i.h     |    5 +-
 net/mac80211/ieee80211_ioctl.c |  133 ---------------------------------
 net/mac80211/regdomain.c       |  158 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 171 insertions(+), 138 deletions(-)
 create mode 100644 net/mac80211/regdomain.c
net/mac80211/Makefile +1 -0
index e9738da..a9c2d07 100644
@@ -13,6 +13,7 @@ mac80211-objs := \
 	ieee80211_iface.o \
 	ieee80211_rate.o \
 	michael.o \
+	regdomain.o \
 	tkip.o \
 	aes_ccm.o \
 	wme.o \
net/mac80211/debugfs_netdev.c +6 -3
index a3e01d7..799a920 100644
@@ -397,6 +397,8 @@ static int netdev_notify(struct notifier_block * nb,
 			 void *ndev)
 {
 	struct net_device *dev = ndev;
+	struct dentry *dir;
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	char buf[10+IFNAMSIZ];
 
 	if (state != NETDEV_CHANGENAME)
@@ -408,10 +410,11 @@ static int netdev_notify(struct notifier_block * nb,
 	if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
 		return 0;
 
-	/* TODO
 	sprintf(buf, "netdev:%s", dev->name);
-	debugfs_rename(IEEE80211_DEV_TO_SUB_IF(dev)->debugfsdir, buf);
-	*/
+	dir = sdata->debugfsdir;
+	if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
+		printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
+		       "dir to %s\n", buf);
 
 	return 0;
 }
net/mac80211/ieee80211.c +2 -1
index 2ddf4ef..6c63dcf 100644
@@ -5095,7 +5095,7 @@ int ieee80211_register_hwmode(struct ieee80211_hw *hw,
 	}
 
 	if (!(hw->flags & IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED))
-		ieee80211_init_client(local->mdev);
+		ieee80211_set_default_regdomain(mode);
 
 	return 0;
 }
@@ -5246,6 +5246,7 @@ static int __init ieee80211_init(void)
 	}
 
 	ieee80211_debugfs_netdev_init();
+	ieee80211_regdomain_init();
 
 	return 0;
 }
net/mac80211/ieee80211_i.h +4 -1
index 055a2a9..6f7bae7 100644
@@ -759,7 +759,6 @@ void ieee80211_update_default_wep_only(struct ieee80211_local *local);
 /* ieee80211_ioctl.c */
 int ieee80211_set_compression(struct ieee80211_local *local,
 			      struct net_device *dev, struct sta_info *sta);
-int ieee80211_init_client(struct net_device *dev);
 int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq);
 /* ieee80211_sta.c */
 void ieee80211_sta_timer(unsigned long data);
@@ -798,6 +797,10 @@ void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata);
 int ieee80211_if_add_mgmt(struct ieee80211_local *local);
 void ieee80211_if_del_mgmt(struct ieee80211_local *local);
 
+/* regdomain.c */
+void ieee80211_regdomain_init(void);
+void ieee80211_set_default_regdomain(struct ieee80211_hw_mode *mode);
+
 /* for wiphy privid */
 extern void *mac80211_wiphy_privid;
 
net/mac80211/ieee80211_ioctl.c +0 -133

145 lines not on this page · raw message

net/mac80211/regdomain.c new file +158 -0

158 lines not on this page · raw message

Signature · 2 lines
John W. Linville
[email protected]
maintainer
#1 lore raw

From: "John W. Linville" <[email protected]>
Date: Tue, 17 Jul 2007 22:16:07 -0400

Quoted 3 lines

A few more for 2.6.23...individual patches available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem

What about this warning which I reported to you right after the last merge? Did this get fixed?

net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast

Please fix that up first, then I'll pull from your tree.

A message that is not in the archive (sent off-list or not yet received): 20070717.201716.112622844.davem-fT/PcQaiUtIeIZ0/[email protected]

#3 lore raw
Quoted 5 lines · David Miller

From: "John W. Linville" <[email protected]>
Date: Tue, 17 Jul 2007 22:16:07 -0400

Quoted 2 lines

A few more for 2.6.23...individual patches available here:

Quoted 8 lines
Quoted 1 line

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem

What about this warning which I reported to you right after the last merge? Did this get fixed?

net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast

Please fix that up first, then I'll pull from your tree.

Fair enough! :-)

John

---

The following changes since commit 4ad1366376bfef32ec0ffa12d1faa483d6f330bd:
NeilBrown (1):
md: change bitmap_unplug and others to void functions

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-davem

Daniel Drake (1):
mac80211: regulatory domain cleanup

Jiri Benc (1):
mac80211: fix GCC warning on 64bit platforms

Johannes Berg (2):
mac80211: use debugfs_rename
mac80211: regdomain.c needs to include ieee80211_i.h

 net/mac80211/Makefile          |    1 +
 net/mac80211/debugfs_netdev.c  |    9 ++-
 net/mac80211/ieee80211.c       |    7 +-
 net/mac80211/ieee80211_i.h     |    5 +-
 net/mac80211/ieee80211_ioctl.c |  133 ---------------------------------
 net/mac80211/regdomain.c       |  158 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 173 insertions(+), 140 deletions(-)
 create mode 100644 net/mac80211/regdomain.c
net/mac80211/Makefile +1 -0
index e9738da..a9c2d07 100644
@@ -13,6 +13,7 @@ mac80211-objs := \
 	ieee80211_iface.o \
 	ieee80211_rate.o \
 	michael.o \
+	regdomain.o \
 	tkip.o \
 	aes_ccm.o \
 	wme.o \
net/mac80211/debugfs_netdev.c +6 -3
index a3e01d7..799a920 100644
@@ -397,6 +397,8 @@ static int netdev_notify(struct notifier_block * nb,
 			 void *ndev)
 {
 	struct net_device *dev = ndev;
+	struct dentry *dir;
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	char buf[10+IFNAMSIZ];
 
 	if (state != NETDEV_CHANGENAME)
@@ -408,10 +410,11 @@ static int netdev_notify(struct notifier_block * nb,
 	if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
 		return 0;
 
-	/* TODO
 	sprintf(buf, "netdev:%s", dev->name);
-	debugfs_rename(IEEE80211_DEV_TO_SUB_IF(dev)->debugfsdir, buf);
-	*/
+	dir = sdata->debugfsdir;
+	if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
+		printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
+		       "dir to %s\n", buf);
 
 	return 0;
 }
net/mac80211/ieee80211.c +4 -3
index 2ddf4ef..272aae9 100644
@@ -4986,8 +4986,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	 * and we need some headroom for passing the frame to monitor
 	 * interfaces, but never both at the same time.
 	 */
-	local->tx_headroom = max(local->hw.extra_tx_headroom,
-				 sizeof(struct ieee80211_tx_status_rtap_hdr));
+	local->tx_headroom = max_t(unsigned, local->hw.extra_tx_headroom,
+				   sizeof(struct ieee80211_tx_status_rtap_hdr));
 
 	debugfs_hw_add(local);
 
@@ -5095,7 +5095,7 @@ int ieee80211_register_hwmode(struct ieee80211_hw *hw,
 	}
 
 	if (!(hw->flags & IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED))
-		ieee80211_init_client(local->mdev);
+		ieee80211_set_default_regdomain(mode);
 
 	return 0;
 }
@@ -5246,6 +5246,7 @@ static int __init ieee80211_init(void)
 	}
 
 	ieee80211_debugfs_netdev_init();
+	ieee80211_regdomain_init();
 
 	return 0;
 }
net/mac80211/ieee80211_i.h +4 -1
index 055a2a9..6f7bae7 100644
@@ -759,7 +759,6 @@ void ieee80211_update_default_wep_only(struct ieee80211_local *local);
 /* ieee80211_ioctl.c */
 int ieee80211_set_compression(struct ieee80211_local *local,
 			      struct net_device *dev, struct sta_info *sta);
-int ieee80211_init_client(struct net_device *dev);
 int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq);
 /* ieee80211_sta.c */
 void ieee80211_sta_timer(unsigned long data);
@@ -798,6 +797,10 @@ void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata);
 int ieee80211_if_add_mgmt(struct ieee80211_local *local);
 void ieee80211_if_del_mgmt(struct ieee80211_local *local);
 
+/* regdomain.c */
+void ieee80211_regdomain_init(void);
+void ieee80211_set_default_regdomain(struct ieee80211_hw_mode *mode);
+
 /* for wiphy privid */
 extern void *mac80211_wiphy_privid;
 
net/mac80211/ieee80211_ioctl.c +0 -133

145 lines not on this page · raw message

net/mac80211/regdomain.c new file +158 -0

158 lines not on this page · raw message

Signature · 2 lines
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

From: "John W. Linville" <[email protected]>
Date: Wed, 18 Jul 2007 11:34:49 -0400

Quoted 8 lines · David Miller
Quoted 7 lines

From: "John W. Linville" <[email protected]>
Date: Tue, 17 Jul 2007 22:16:07 -0400

Quoted 3 lines

A few more for 2.6.23...individual patches available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem

Quoted 8 lines
Quoted 6 lines

What about this warning which I reported to you right after the last merge? Did this get fixed?

net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast

Please fix that up first, then I'll pull from your tree.

Fair enough! :-)

As I pointed out to Jiri, you need to spell out the complete type warning fix, rather than just "unsigned".

#6 lore raw
Quoted 14 lines · David Miller

From: "John W. Linville" <[email protected]>
Date: Wed, 18 Jul 2007 11:34:49 -0400

Quoted 11 lines · David Miller
Quoted 10 lines

From: "John W. Linville" <[email protected]>
Date: Tue, 17 Jul 2007 22:16:07 -0400

Quoted 3 lines

A few more for 2.6.23...individual patches available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem

What about this warning which I reported to you right after the last merge? Did this get fixed?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast

Please fix that up first, then I'll pull from your tree.

Fair enough! :-)

As I pointed out to Jiri, you need to spell out the complete type warning fix, rather than just "unsigned".

I went ahead and made that change, including the mysterious space after "unsigned int " that seems to be common practice. I had considered asking for this before...oh well, it's there now! :-)

BTW, I also included an extra patch from Michael Wu which helps to avoid some possible deadlocks when shutting down an interface.

Thanks,

John

---

The following changes since commit 4ad1366376bfef32ec0ffa12d1faa483d6f330bd:
NeilBrown (1):
md: change bitmap_unplug and others to void functions

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-davem

Daniel Drake (1):
mac80211: regulatory domain cleanup

Jiri Benc (1):
mac80211: fix GCC warning on 64bit platforms

Johannes Berg (2):
mac80211: use debugfs_rename
mac80211: regdomain.c needs to include ieee80211_i.h

Michael Wu (1):

      mac80211: remove rtnl locking in ieee80211_sta.c
 net/mac80211/Makefile          |    1 +
 net/mac80211/debugfs_netdev.c  |    9 ++-
 net/mac80211/ieee80211.c       |    7 +-
 net/mac80211/ieee80211_i.h     |    5 +-
 net/mac80211/ieee80211_ioctl.c |  133 ---------------------------------
 net/mac80211/ieee80211_sta.c   |    6 --
 net/mac80211/regdomain.c       |  158 ++++++++++++++++++++++++++++++++++++++++
 7 files changed, 173 insertions(+), 146 deletions(-)
 create mode 100644 net/mac80211/regdomain.c
net/mac80211/Makefile +1 -0
index e9738da..a9c2d07 100644
@@ -13,6 +13,7 @@ mac80211-objs := \
 	ieee80211_iface.o \
 	ieee80211_rate.o \
 	michael.o \
+	regdomain.o \
 	tkip.o \
 	aes_ccm.o \
 	wme.o \
net/mac80211/debugfs_netdev.c +6 -3
index a3e01d7..799a920 100644
@@ -397,6 +397,8 @@ static int netdev_notify(struct notifier_block * nb,
 			 void *ndev)
 {
 	struct net_device *dev = ndev;
+	struct dentry *dir;
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	char buf[10+IFNAMSIZ];
 
 	if (state != NETDEV_CHANGENAME)
@@ -408,10 +410,11 @@ static int netdev_notify(struct notifier_block * nb,
 	if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
 		return 0;
 
-	/* TODO
 	sprintf(buf, "netdev:%s", dev->name);
-	debugfs_rename(IEEE80211_DEV_TO_SUB_IF(dev)->debugfsdir, buf);
-	*/
+	dir = sdata->debugfsdir;
+	if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
+		printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
+		       "dir to %s\n", buf);
 
 	return 0;
 }
net/mac80211/ieee80211.c +4 -3
index 2ddf4ef..c944b17 100644
@@ -4986,8 +4986,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	 * and we need some headroom for passing the frame to monitor
 	 * interfaces, but never both at the same time.
 	 */
-	local->tx_headroom = max(local->hw.extra_tx_headroom,
-				 sizeof(struct ieee80211_tx_status_rtap_hdr));
+	local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
+				   sizeof(struct ieee80211_tx_status_rtap_hdr));
 
 	debugfs_hw_add(local);
 
@@ -5095,7 +5095,7 @@ int ieee80211_register_hwmode(struct ieee80211_hw *hw,
 	}
 
 	if (!(hw->flags & IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED))
-		ieee80211_init_client(local->mdev);
+		ieee80211_set_default_regdomain(mode);
 
 	return 0;
 }
@@ -5246,6 +5246,7 @@ static int __init ieee80211_init(void)
 	}
 
 	ieee80211_debugfs_netdev_init();
+	ieee80211_regdomain_init();
 
 	return 0;
 }
net/mac80211/ieee80211_i.h +4 -1
index 055a2a9..6f7bae7 100644
@@ -759,7 +759,6 @@ void ieee80211_update_default_wep_only(struct ieee80211_local *local);
 /* ieee80211_ioctl.c */
 int ieee80211_set_compression(struct ieee80211_local *local,
 			      struct net_device *dev, struct sta_info *sta);
-int ieee80211_init_client(struct net_device *dev);
 int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq);
 /* ieee80211_sta.c */
 void ieee80211_sta_timer(unsigned long data);
@@ -798,6 +797,10 @@ void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata);
 int ieee80211_if_add_mgmt(struct ieee80211_local *local);
 void ieee80211_if_del_mgmt(struct ieee80211_local *local);
 
+/* regdomain.c */
+void ieee80211_regdomain_init(void);
+void ieee80211_set_default_regdomain(struct ieee80211_hw_mode *mode);
+
 /* for wiphy privid */
 extern void *mac80211_wiphy_privid;
 
net/mac80211/ieee80211_ioctl.c +0 -133

145 lines not on this page · raw message

net/mac80211/ieee80211_sta.c +0 -6
index ba2bf8f..952d8dd 100644
@@ -25,7 +25,6 @@
 #include <linux/wireless.h>
 #include <linux/random.h>
 #include <linux/etherdevice.h>
-#include <linux/rtnetlink.h>
 #include <net/iw_handler.h>
 #include <asm/types.h>
 
@@ -2107,12 +2106,9 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
 	struct ieee80211_sta_bss *bss, *selected = NULL;
 	int top_rssi = 0, freq;
 
-	rtnl_lock();
-
 	if (!ifsta->auto_channel_sel && !ifsta->auto_bssid_sel &&
 	    !ifsta->auto_ssid_sel) {
 		ifsta->state = IEEE80211_AUTHENTICATE;
-		rtnl_unlock();
 		ieee80211_sta_reset_auth(dev, ifsta);
 		return 0;
 	}
@@ -2155,7 +2151,6 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
 		ieee80211_sta_set_bssid(dev, selected->bssid);
 		ieee80211_rx_bss_put(dev, selected);
 		ifsta->state = IEEE80211_AUTHENTICATE;
-		rtnl_unlock();
 		ieee80211_sta_reset_auth(dev, ifsta);
 		return 0;
 	} else {
@@ -2166,7 +2161,6 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
 		} else
 			ifsta->state = IEEE80211_DISABLED;
 	}
-	rtnl_unlock();
 	return -1;
 }
 
net/mac80211/regdomain.c new file +158 -0

158 lines not on this page · raw message

Signature · 2 lines
John W. Linville
[email protected]
maintainer
#7 lore raw

From: "John W. Linville" <[email protected]>
Date: Wed, 18 Jul 2007 20:45:10 -0400

Quoted 24 lines · David Miller
Quoted 14 lines

From: "John W. Linville" <[email protected]>
Date: Wed, 18 Jul 2007 11:34:49 -0400

Quoted 11 lines · David Miller
Quoted 10 lines

From: "John W. Linville" <[email protected]>
Date: Tue, 17 Jul 2007 22:16:07 -0400

Quoted 3 lines

A few more for 2.6.23...individual patches available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem

What about this warning which I reported to you right after the last merge? Did this get fixed?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast

Please fix that up first, then I'll pull from your tree.

Fair enough! :-)

As I pointed out to Jiri, you need to spell out the complete type warning fix, rather than just "unsigned".

Quoted 6 lines

I went ahead and made that change, including the mysterious space after "unsigned int " that seems to be common practice. I had considered asking for this before...oh well, it's there now! :-)

BTW, I also included an extra patch from Michael Wu which helps to avoid some possible deadlocks when shutting down an interface.

Pulled, thanks John.