Skip to contentSkip to conversation

bcm43xx: do not rebuild when kernel version changes

PATCH In review Sam Ravnborg 3 participants 5 messages Mar 3, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm43xx: do not rebuild when kernel version changes

Replacing use of UTS_RELEASE with utsname()->release avoids that this module is rebuild each
time the kernel version changes.

Compile tested only.

---

drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c +2 -2
index c947025..d2df6a0 100644
@@ -32,7 +32,7 @@
 #include <linux/netdevice.h>
 #include <linux/pci.h>
 #include <linux/string.h>
-#include <linux/utsrelease.h>
+#include <linux/utsname.h>
 
 
 static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
@@ -40,7 +40,7 @@ static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *
 	struct bcm43xx_private *bcm = bcm43xx_priv(dev);
 
 	strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
-	strncpy(info->version, UTS_RELEASE, sizeof(info->version));
+	strncpy(info->version, utsname()->release, sizeof(info->version));
 	strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
 }
 
#1 lore raw
Quoted 5 lines · Sam Ravnborg

Replacing use of UTS_RELEASE with utsname()->release avoids that this module is rebuild each
time the kernel version changes.

Compile tested only.

I vote to get rid of the whole bcm43xx_ethtool.c file, as it's useless. It will vanish with the advent of d80211, anyway.
Larry?

Quoted 30 lines

---

drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c +2 -3
index c947025..d2df6a0 100644
@@ -32,7 +32,7 @@
 #include <linux/netdevice.h>
 #include <linux/pci.h>
 #include <linux/string.h>
-#include <linux/utsrelease.h>
+#include <linux/utsname.h>
 
 
 static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
@@ -40,7 +40,7 @@ static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *
 	struct bcm43xx_private *bcm = bcm43xx_priv(dev);
 
 	strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
-	strncpy(info->version, UTS_RELEASE, sizeof(info->version));
+	strncpy(info->version, utsname()->release, sizeof(info->version));
 	strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
 }
 
-

To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Greetings Michael.
#2 lore raw
Quoted 10 lines · Michael Buesch
Quoted 5 lines · Sam Ravnborg

Replacing use of UTS_RELEASE with utsname()->release avoids that this module is rebuild each
time the kernel version changes.

Compile tested only.

I vote to get rid of the whole bcm43xx_ethtool.c file, as it's useless. It will vanish with the advent of d80211, anyway.
Larry?

Is bcm43xx_ethtool.c really useless? If so, I vote to remove it. I have never tried to use ethtool on bcm43xx. Similarly, it isn't very often that I recompile the kernel when bcm43xx hasn't changed and would not have noticed the bug that Sam reported.

Larry

#3 lore raw
Quoted 6 lines · Larry Finger
Quoted 5 lines · Michael Buesch
Quoted 4 lines · Sam Ravnborg

Replacing use of UTS_RELEASE with utsname()->release avoids that this module is rebuild each
time the kernel version changes.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Compile tested only.

I vote to get rid of the whole bcm43xx_ethtool.c file, as it's useless. It will vanish with the advent of d80211, anyway.
Larry?

Is bcm43xx_ethtool.c really useless?

Yes it is useless.
1) There isn't really anything ethtool related implemented. Just the useless info stuff.
2) ethtool is rather useless for wireless in general (that's why there isn't anything implemented ;) )

Please remove the file, kill it from Makefile and remove the ethtool ops set in main.c (one line).

Signature · 1 line
Greetings Michael.
#4 lore raw
In reply to Larry Finger
Quoted 8 lines · Larry Finger
Quoted 7 lines · Michael Buesch
Quoted 5 lines · Sam Ravnborg

Replacing use of UTS_RELEASE with utsname()->release avoids that this module is rebuild each
time the kernel version changes.

Compile tested only.

Quoted 7 lines
Quoted 3 lines

I vote to get rid of the whole bcm43xx_ethtool.c file, as it's useless. It will vanish with the advent of d80211, anyway.
Larry?

Is bcm43xx_ethtool.c really useless? If so, I vote to remove it. I have never tried to use ethtool on bcm43xx. Similarly, it isn't very often that I recompile the kernel when bcm43xx hasn't changed and would not have noticed the bug that Sam reported.

I saw it only because I tossed around with a allmodconfig build. I do not care if it is fixed one way or the other - but I like that only relevant parts are rebuild when kernel version changes.

Sam