[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/devel linux-2.6-bcm43xx-mac80211-fixes.patch, NONE, 1.1 kernel-2.6.spec, 1.3172, 1.3173



Author: linville

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29194

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-bcm43xx-mac80211-fixes.patch 
Log Message:
important phy and ssb bus fixes for bcm43xx-mac80211

linux-2.6-bcm43xx-mac80211-fixes.patch:

--- NEW FILE linux-2.6-bcm43xx-mac80211-fixes.patch ---
--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c.orig	2007-05-18 15:07:43.000000000 -0400
+++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c	2007-05-18 15:07:06.000000000 -0400
@@ -3243,9 +3243,6 @@ static int bcm43xx_wireless_core_init(st
 		tmp = phy->gmode ? BCM43xx_TMSLOW_GMODE : 0;
 		bcm43xx_wireless_core_reset(dev, tmp);
 	}
-	err = bcm43xx_phy_versioning(dev);
-	if (err)
-		goto err_busdown;
 
 	if ((phy->type == BCM43xx_PHYTYPE_B) || (phy->type == BCM43xx_PHYTYPE_G)) {
 		phy->lo_control = kzalloc(sizeof(*(phy->lo_control)), GFP_KERNEL);
@@ -3628,20 +3625,19 @@ static int bcm43xx_wireless_core_attach(
 	tmp = dev->phy.gmode ? BCM43xx_TMSLOW_GMODE : 0;
 	bcm43xx_wireless_core_reset(dev, tmp);
 
+	err = bcm43xx_phy_versioning(dev);
+	if (err)
+		goto err_leds_exit;
 	/* Check if this device supports multiband. */
 	if (!pdev ||
 	    (pdev->device != 0x4312 &&
 	     pdev->device != 0x4319 &&
 	     pdev->device != 0x4324)) {
 		/* No multiband support. */
-		u8 phytype;
-
-		tmp = bcm43xx_read16(dev, BCM43xx_MMIO_PHY_VER);
-		phytype = (tmp & 0x0F00) >> 8;
 		have_aphy = 0;
 		have_bphy = 0;
 		have_gphy = 0;
-		switch (phytype) {
+		switch (dev->phy.type) {
 		case BCM43xx_PHYTYPE_A:
 			have_aphy = 1;
 			break;
--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c.orig	2007-05-18 15:07:37.000000000 -0400
+++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c	2007-05-18 15:07:06.000000000 -0400
@@ -603,11 +603,11 @@ static void bcm43xx_phy_agcsetup(struct 
 	bcm43xx_phy_write(dev, 0x04A1,
 			  (bcm43xx_phy_read(dev, 0x04A1)
 			   & 0xF0FF) | 0x0600);
-	bcm43xx_phy_write(dev, 0x0412,
-			  (bcm43xx_phy_read(dev, 0x0412)
+	bcm43xx_phy_write(dev, 0x04A2,
+			  (bcm43xx_phy_read(dev, 0x04A2)
 			   & 0xF0FF) | 0x0700);
-	bcm43xx_phy_write(dev, 0x0410,
-			  (bcm43xx_phy_read(dev, 0x0410)
+	bcm43xx_phy_write(dev, 0x04A0,
+			  (bcm43xx_phy_read(dev, 0x04A0)
 			   & 0xF0FF) | 0x0100);
 
 	if (phy->rev == 1) {
@@ -741,7 +741,7 @@ static void bcm43xx_phy_setupg(struct bc
 	if (phy->rev <= 2)
 		for (i = 0; i < BCM43xx_TAB_NOISESCALEG_SIZE; i++)
 			bcm43xx_ofdmtab_write16(dev, 0x1400, i, bcm43xx_tab_noisescaleg1[i]);
-	else if ((phy->rev == 7) && (bcm43xx_phy_read(dev, 0x0449) & 0x0200))
+	else if ((phy->rev >= 7) && (bcm43xx_phy_read(dev, 0x0449) & 0x0200))
 		for (i = 0; i < BCM43xx_TAB_NOISESCALEG_SIZE; i++)
 			bcm43xx_ofdmtab_write16(dev, 0x1400, i, bcm43xx_tab_noisescaleg3[i]);
 	else
@@ -751,7 +751,7 @@ static void bcm43xx_phy_setupg(struct bc
 	if (phy->rev == 2)
 		for (i = 0; i < BCM43xx_TAB_SIGMASQR_SIZE; i++)
 			bcm43xx_ofdmtab_write16(dev, 0x5000, i, bcm43xx_tab_sigmasqr1[i]);
-	else if ((phy->rev > 2) && (phy->rev <= 7))
+	else if ((phy->rev > 2) && (phy->rev <= 8))
 		for (i = 0; i < BCM43xx_TAB_SIGMASQR_SIZE; i++)
 			bcm43xx_ofdmtab_write16(dev, 0x5000, i, bcm43xx_tab_sigmasqr2[i]);
 
@@ -1420,7 +1420,7 @@ static void bcm43xx_calc_loopback_gain(s
 	}
 	bcm43xx_phy_write(dev, BCM43xx_PHY_RFOVER,
 			  bcm43xx_phy_read(dev, BCM43xx_PHY_RFOVER) | 0x000C);
-	bcm43xx_phy_write(dev, BCM43xx_PHY_RFOVER,
+	bcm43xx_phy_write(dev, BCM43xx_PHY_RFOVERVAL,
 			  bcm43xx_phy_read(dev, BCM43xx_PHY_RFOVERVAL) | 0x000C);
 	bcm43xx_phy_write(dev, BCM43xx_PHY_RFOVER,
 			  bcm43xx_phy_read(dev, BCM43xx_PHY_RFOVER) | 0x0030);
--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_lo.c.orig	2007-05-18 15:07:49.000000000 -0400
+++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_lo.c	2007-05-18 15:07:06.000000000 -0400
@@ -435,7 +435,8 @@ static void lo_measure_txctl_values(stru
 					       & 0xFF00) | lo->tx_bias | lo->tx_magn);
 		}
 	} else {
-		lo->tx_magn = 0; /* unused */
+		lo->tx_magn = 0; /* FIXME */
+		lo->tx_bias = 0;
 		bcm43xx_radio_write16(dev, 0x52,
 				      bcm43xx_radio_read16(dev, 0x52)
 				      & 0xFFF0); /* TX bias == 0 */
--- linux-2.6.21.noarch/drivers/ssb/main.c.orig	2007-05-18 15:07:54.000000000 -0400
+++ linux-2.6.21.noarch/drivers/ssb/main.c	2007-05-18 15:07:06.000000000 -0400
@@ -383,15 +383,18 @@ static int ssb_devices_register(struct s
 			break;
 		}
 
+		sdev->dev = dev;
 		err = device_register(dev);
 		if (err) {
 			ssb_printk(KERN_ERR PFX
 				   "Could not register %s\n",
 				   dev->bus_id);
+			/* Set dev to NULL to not unregister
+			 * dev on error unwinding. */
+			sdev->dev = NULL;
 			kfree(devwrap);
 			goto error;
 		}
-		sdev->dev = dev;
 		dev_idx++;
 	}
 
@@ -549,14 +552,15 @@ int ssb_bus_pcibus_register(struct ssb_b
 {
 	int err;
 
-	ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on "
-		   "PCI device %s\n", bus->host_pci->dev.bus_id);
-
 	bus->bustype = SSB_BUSTYPE_PCI;
 	bus->host_pci = host_pci;
 	bus->ops = &ssb_pci_ops;
 
 	err = ssb_bus_register(bus, 0);
+	if (!err) {
+		ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on "
+			   "PCI device %s\n", host_pci->dev.bus_id);
+	}
 
 	return err;
 }
@@ -571,15 +575,16 @@ int ssb_bus_pcmciabus_register(struct ss
 {
 	int err;
 
-	ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on "
-		   "PCMCIA device %s\n", bus->host_pcmcia->devname);
-
 	bus->bustype = SSB_BUSTYPE_PCMCIA;
 	bus->host_pcmcia = pcmcia_dev;
 	bus->ops = &ssb_pcmcia_ops;
 	fill_sprom(&bus->sprom);
 
 	err = ssb_bus_register(bus, baseaddr);
+	if (!err) {
+		ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on "
+			   "PCMCIA device %s\n", pcmcia_dev->devname);
+	}
 
 	return err;
 }
@@ -592,13 +597,15 @@ int ssb_bus_ssbbus_register(struct ssb_b
 {
 	int err;
 
-	ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found at "
-		   "address 0x%08lX\n", baseaddr);
-
 	bus->bustype = SSB_BUSTYPE_SSB;
 	bus->ops = &ssb_ssb_ops;
 	fill_sprom(&bus->sprom);
+
 	err = ssb_bus_register(bus, baseaddr);
+	if (!err) {
+		ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found at "
+			   "address 0x%08lX\n", baseaddr);
+	}
 
 	return err;
 }


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3172
retrieving revision 1.3173
diff -u -r1.3172 -r1.3173
--- kernel-2.6.spec	18 May 2007 16:19:12 -0000	1.3172
+++ kernel-2.6.spec	18 May 2007 19:20:08 -0000	1.3173
@@ -621,6 +621,7 @@
 Patch2306: linux-2.6-mac80211-fixes.patch
 Patch2307: linux-2.6-iwlwifi-sw-scan-default.patch
 Patch2308: linux-2.6-mac80211-scan-optimizations.patch
+Patch2309: linux-2.6-bcm43xx-mac80211-fixes.patch
 
 # Assorted dyntick/clock/timer fixes.
 Patch2400: linux-2.6-highres-dyntick-avoid-xtime-lock-contention.patch
@@ -1397,6 +1398,8 @@
 %patch2307 -p1
 # mac80211: improve scan performance
 %patch2308 -p1
+# bcm43xx-mac80211: important phy and ssb bus fixes
+%patch2309 -p1
 
 # Assorted dyntick/clock/timer fixes.
 %patch2400 -p1
@@ -2385,6 +2388,9 @@
 %endif
 
 %changelog
+* Fri May 18 2007 John W. Linville <linville redhat com>
+- important phy and ssb bus fixes for bcm43xx-mac80211
+
 * Fri May 18 2007 Dave Jones <davej redhat com>
 - Disable ub driver. (#204396)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]