Skip to contentSkip to conversation

b43: Fix HostFlags data types

PATCH New Michael Buesch 1 participant 1 message Apr 18, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43: Fix HostFlags data types

The HostFlags are a bitmask of 48bit. So we must use an u64 datatype to hold all bits.

---

John, this is for 2.6.26.
There is no need to backport this to 2.6.25-stable, as the devices supported by 2.6.25 don't use the high 16 bits of the HostFlags.

drivers/net/wireless/b43/main.c +3 -2
Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
@@ -3707,13 +3707,13 @@ static void setup_struct_wldev_for_init(
 	memset(&dev->noisecalc, 0, sizeof(dev->noisecalc));
 }
 
 static void b43_bluetooth_coext_enable(struct b43_wldev *dev)
 {
 	struct ssb_sprom *sprom = &dev->dev->bus->sprom;
-	u32 hf;
+	u64 hf;
 
 	if (!modparam_btcoex)
 		return;
 	if (!(sprom->boardflags_lo & B43_BFL_BTCOEXIST))
 		return;
 	if (dev->phy.type != B43_PHYTYPE_B && !dev->phy.gmode)
@@ -3857,13 +3857,14 @@ static int b43_wireless_core_init(struct
 {
 	struct b43_wl *wl = dev->wl;
 	struct ssb_bus *bus = dev->dev->bus;
 	struct ssb_sprom *sprom = &bus->sprom;
 	struct b43_phy *phy = &dev->phy;
 	int err;
-	u32 hf, tmp;
+	u64 hf;
+	u32 tmp;
 
 	B43_WARN_ON(b43_status(dev) != B43_STAT_UNINIT);
 
 	err = ssb_bus_powerup(bus, 0);
 	if (err)
 		goto out;
drivers/net/wireless/b43/phy.c +1 -1
Index: wireless-testing/drivers/net/wireless/b43/phy.c
===================================================================
@@ -2040,13 +2040,13 @@ int b43_phy_init(struct b43_wldev *dev)
 	return err;
 }
 
 void b43_set_rx_antenna(struct b43_wldev *dev, int antenna)
 {
 	struct b43_phy *phy = &dev->phy;
-	u32 hf;
+	u64 hf;
 	u16 tmp;
 	int autodiv = 0;
 
 	if (antenna == B43_ANTENNA_AUTO0 || antenna == B43_ANTENNA_AUTO1)
 		autodiv = 1;