rpms/kernel/F-7 linux-2.6-wireless.patch,1.13,1.14

John W. Linville (linville) fedora-extras-commits at redhat.com
Wed Oct 17 21:23:49 UTC 2007


Author: linville

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30566

Modified Files:
	linux-2.6-wireless.patch 
Log Message:
actually checkin new wireless patch...

linux-2.6-wireless.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.13 -r 1.14 linux-2.6-wireless.patch
Index: linux-2.6-wireless.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-wireless.patch,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- linux-2.6-wireless.patch	10 Oct 2007 21:22:58 -0000	1.13
+++ linux-2.6-wireless.patch	17 Oct 2007 21:23:45 -0000	1.14
@@ -1,24 +1,130478 @@
-diff -up linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_wx.c.orig linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_wx.c
---- linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_wx.c.orig	2007-10-03 13:02:35.000000000 -0400
-+++ linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_wx.c	2007-10-03 13:27:23.000000000 -0400
-@@ -114,7 +114,7 @@ check_assoc_again:
- 	sm->associnfo.associating = 1;
- 	/* queue lower level code to do work (if necessary) */
- 	schedule_delayed_work(&sm->associnfo.work, 0);
--out:
+diff -up linux-2.6.22.noarch/CREDITS.orig linux-2.6.22.noarch/CREDITS
+--- linux-2.6.22.noarch/CREDITS.orig	2007-09-26 19:41:26.000000000 -0400
++++ linux-2.6.22.noarch/CREDITS	2007-09-26 19:49:37.000000000 -0400
+@@ -665,6 +665,11 @@ D: Minor updates to SCSI types, added /p
+ S: (ask for current address)
+ S: USA
+ 
++N: Robin Cornelius
++E: robincornelius at users.sourceforge.net
++D: Ralink rt2x00 WLAN driver
++S: Cornwall, U.K.
 +
- 	mutex_unlock(&sm->associnfo.mutex);
+ N: Mark Corner
+ E: mcorner at umich.edu
+ W: http://www.eecs.umich.edu/~mcorner/
+@@ -679,6 +684,11 @@ D: Kernel module SMART utilities
+ S: Santa Cruz, California
+ S: USA
  
- 	return 0;
-diff -up linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/bcm43xx_wx.c.orig linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/bcm43xx_wx.c
---- linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/bcm43xx_wx.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/bcm43xx_wx.c	2007-10-03 13:27:23.000000000 -0400
-@@ -444,7 +444,7 @@ static int bcm43xx_wx_set_xmitpower(stru
- 	u16 maxpower;
- 
- 	if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) {
--		printk(PFX KERN_ERR "TX power not in dBm.\n");
-+		printk(KERN_ERR PFX "TX power not in dBm.\n");
- 		return -EOPNOTSUPP;
- 	}
++N: Luis Correia
++E: lfcorreia at users.sf.net
++D: Ralink rt2x00 WLAN driver
++S: Belas, Portugal
++
+ N: Alan Cox
+ W: http://www.linux.org.uk/diary/
+ D: Linux Networking (0.99.10->2.0.29)
+@@ -833,6 +843,12 @@ S: Lancs
+ S: PR4 6AX
+ S: United Kingdom
+ 
++N: Ivo van Doorn
++E: IvDoorn at gmail.com
++W: http://www.mendiosus.nl
++D: Ralink rt2x00 WLAN driver
++S: Haarlem, The Netherlands
++
+ N: John G Dorsey
+ E: john+ at cs.cmu.edu
+ D: ARM Linux ports to Assabet/Neponset, Spot
+@@ -3517,6 +3533,12 @@ S: Maastrichterweg 63
+ S: 5554 GG Valkenswaard
+ S: The Netherlands
+ 
++N: Mark Wallis
++E: mwallis at serialmonkey.com
++W: http://mark.serialmonkey.com
++D: Ralink rt2x00 WLAN driver
++S: Newcastle, Australia
++
+ N: Peter Shaobo Wang
+ E: pwang at mmdcorp.com
+ W: http://www.mmdcorp.com/pw/linux
+@@ -3651,6 +3673,15 @@ S: Alte Regensburger Str. 11a
+ S: 93149 Nittenau
+ S: Germany
+ 
++N: Gertjan van Wingerde
++E: gwingerde at home.nl
++D: Ralink rt2x00 WLAN driver
++D: Minix V2 file-system
++D: Misc fixes
++S: Geessinkweg 177
++S: 7544 TX Enschede
++S: The Netherlands
++
+ N: Lars Wirzenius
+ E: liw at iki.fi
+ D: Linux System Administrator's Guide, author, former maintainer
+diff -up linux-2.6.22.noarch/include/linux/nl80211.h.orig linux-2.6.22.noarch/include/linux/nl80211.h
+--- linux-2.6.22.noarch/include/linux/nl80211.h.orig	2007-07-08 19:32:17.000000000 -0400
++++ linux-2.6.22.noarch/include/linux/nl80211.h	2007-09-26 19:49:38.000000000 -0400
+@@ -7,7 +7,97 @@
+  */
+ 
+ /**
++ * enum nl80211_commands - supported nl80211 commands
++ *
++ * @NL80211_CMD_UNSPEC: unspecified command to catch errors
++ *
++ * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request
++ *	to get a list of all present wiphys.
++ * @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and
++ *	%NL80211_ATTR_WIPHY_NAME.
++ * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
++ *	or rename notification. Has attributes %NL80211_ATTR_WIPHY and
++ *	%NL80211_ATTR_WIPHY_NAME.
++ * @NL80211_CMD_DEL_WIPHY: Wiphy deleted. Has attributes
++ *	%NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME.
++ *
++ * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration;
++ *	either a dump request on a %NL80211_ATTR_WIPHY or a specific get
++ *	on an %NL80211_ATTR_IFINDEX is supported.
++ * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires
++ 	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE.
++ * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response
++ *	to %NL80211_CMD_GET_INTERFACE. Has %NL80211_ATTR_IFINDEX,
++ *	%NL80211_ATTR_WIPHY and %NL80211_ATTR_IFTYPE attributes. Can also
++ *	be sent from userspace to request creation of a new virtual interface,
++ *	then requires attributes %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFTYPE and
++ *	%NL80211_ATTR_IFNAME.
++ * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes
++ *	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from
++ *	userspace to request deletion of a virtual interface, then requires
++ *	attribute %NL80211_ATTR_IFINDEX.
++ *
++ * @NL80211_CMD_MAX: highest used command number
++ * @__NL80211_CMD_AFTER_LAST: internal use
++ */
++enum nl80211_commands {
++/* don't change the order or add anything inbetween, this is ABI! */
++	NL80211_CMD_UNSPEC,
++
++	NL80211_CMD_GET_WIPHY,		/* can dump */
++	NL80211_CMD_SET_WIPHY,
++	NL80211_CMD_NEW_WIPHY,
++	NL80211_CMD_DEL_WIPHY,
++
++	NL80211_CMD_GET_INTERFACE,	/* can dump */
++	NL80211_CMD_SET_INTERFACE,
++	NL80211_CMD_NEW_INTERFACE,
++	NL80211_CMD_DEL_INTERFACE,
++
++	/* add commands here */
++
++	/* used to define NL80211_CMD_MAX below */
++	__NL80211_CMD_AFTER_LAST,
++	NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1
++};
++
++
++/**
++ * enum nl80211_attrs - nl80211 netlink attributes
++ *
++ * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors
++ *
++ * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
++ *	/sys/class/ieee80211/<phyname>/index
++ * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
++ *
++ * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
++ * @NL80211_ATTR_IFNAME: network interface name
++ * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype
++ *
++ * @NL80211_ATTR_MAX: highest attribute number currently defined
++ * @__NL80211_ATTR_AFTER_LAST: internal use
++ */
++enum nl80211_attrs {
++/* don't change the order or add anything inbetween, this is ABI! */
++	NL80211_ATTR_UNSPEC,
++
++	NL80211_ATTR_WIPHY,
++	NL80211_ATTR_WIPHY_NAME,
++
++	NL80211_ATTR_IFINDEX,
++	NL80211_ATTR_IFNAME,
++	NL80211_ATTR_IFTYPE,
++
++	/* add attributes here, update the policy in nl80211.c */
++
++	__NL80211_ATTR_AFTER_LAST,
++	NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
++};
++
++/**
+  * enum nl80211_iftype - (virtual) interface types
++ *
+  * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
+  * @NL80211_IFTYPE_ADHOC: independent BSS member
+  * @NL80211_IFTYPE_STATION: managed BSS member
[...130108 lines suppressed...]
++		return 0;
++
++	return !mips_busprobe32(tmp, (bus->mmio + (pc->dev->core_index * SSB_CORE_SIZE)));
++}
++#endif /* CONFIG_SSB_PCICORE_HOSTMODE */
++
++
++/**************************************************
++ * Generic and Clientmode operation code.
++ **************************************************/
++
++static void ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
++{
++	/* Disable PCI interrupts. */
++	ssb_write32(pc->dev, SSB_INTVEC, 0);
++}
++
++void ssb_pcicore_init(struct ssb_pcicore *pc)
++{
++	struct ssb_device *dev = pc->dev;
++	struct ssb_bus *bus;
++
++	if (!dev)
++		return;
++	bus = dev->bus;
++	if (!ssb_device_is_enabled(dev))
++		ssb_device_enable(dev, 0);
++
++#ifdef CONFIG_SSB_PCICORE_HOSTMODE
++	pc->hostmode = pcicore_is_in_hostmode(pc);
++	if (pc->hostmode)
++		ssb_pcicore_init_hostmode(pc);
++#endif /* CONFIG_SSB_PCICORE_HOSTMODE */
++	if (!pc->hostmode)
++		ssb_pcicore_init_clientmode(pc);
++}
++
++static u32 ssb_pcie_read(struct ssb_pcicore *pc, u32 address)
++{
++	pcicore_write32(pc, 0x130, address);
++	return pcicore_read32(pc, 0x134);
++}
++
++static void ssb_pcie_write(struct ssb_pcicore *pc, u32 address, u32 data)
++{
++	pcicore_write32(pc, 0x130, address);
++	pcicore_write32(pc, 0x134, data);
++}
++
++static void ssb_pcie_mdio_write(struct ssb_pcicore *pc, u8 device,
++				u8 address, u16 data)
++{
++	const u16 mdio_control = 0x128;
++	const u16 mdio_data = 0x12C;
++	u32 v;
++	int i;
++
++	v = 0x80; /* Enable Preamble Sequence */
++	v |= 0x2; /* MDIO Clock Divisor */
++	pcicore_write32(pc, mdio_control, v);
++
++	v = (1 << 30); /* Start of Transaction */
++	v |= (1 << 28); /* Write Transaction */
++	v |= (1 << 17); /* Turnaround */
++	v |= (u32)device << 22;
++	v |= (u32)address << 18;
++	v |= data;
++	pcicore_write32(pc, mdio_data, v);
++	/* Wait for the device to complete the transaction */
++	udelay(10);
++	for (i = 0; i < 10; i++) {
++		v = pcicore_read32(pc, mdio_control);
++		if (v & 0x100 /* Trans complete */)
++			break;
++		msleep(1);
++	}
++	pcicore_write32(pc, mdio_control, 0);
++}
++
++static void ssb_broadcast_value(struct ssb_device *dev,
++				u32 address, u32 data)
++{
++	/* This is used for both, PCI and ChipCommon core, so be careful. */
++	BUILD_BUG_ON(SSB_PCICORE_BCAST_ADDR != SSB_CHIPCO_BCAST_ADDR);
++	BUILD_BUG_ON(SSB_PCICORE_BCAST_DATA != SSB_CHIPCO_BCAST_DATA);
++
++	ssb_write32(dev, SSB_PCICORE_BCAST_ADDR, address);
++	ssb_read32(dev, SSB_PCICORE_BCAST_ADDR); /* flush */
++	ssb_write32(dev, SSB_PCICORE_BCAST_DATA, data);
++	ssb_read32(dev, SSB_PCICORE_BCAST_DATA); /* flush */
++}
++
++static void ssb_commit_settings(struct ssb_bus *bus)
++{
++	struct ssb_device *dev;
++
++	dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev;
++	if (WARN_ON(!dev))
++		return;
++	/* This forces an update of the cached registers. */
++	ssb_broadcast_value(dev, 0xFD8, 0);
++}
++
++int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
++				   struct ssb_device *dev)
++{
++	struct ssb_device *pdev = pc->dev;
++	struct ssb_bus *bus;
++	int err = 0;
++	u32 tmp;
++
++	might_sleep();
++
++	if (!pdev)
++		goto out;
++	bus = pdev->bus;
++
++	/* Enable interrupts for this device. */
++	if (bus->host_pci &&
++	    ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) {
++		u32 coremask;
++
++		/* Calculate the "coremask" for the device. */
++		coremask = (1 << dev->core_index);
++
++		err = pci_read_config_dword(bus->host_pci, SSB_PCI_IRQMASK, &tmp);
++		if (err)
++			goto out;
++		tmp |= coremask << 8;
++		err = pci_write_config_dword(bus->host_pci, SSB_PCI_IRQMASK, tmp);
++		if (err)
++			goto out;
++	} else {
++		u32 intvec;
++
++		intvec = ssb_read32(pdev, SSB_INTVEC);
++		if ((bus->chip_id & 0xFF00) == 0x4400) {
++			/* Workaround: On the BCM44XX the BPFLAG routing
++			 * bit is wrong. Use a hardcoded constant. */
++			intvec |= 0x00000002;
++		} else {
++			tmp = ssb_read32(dev, SSB_TPSFLAG);
++			tmp &= SSB_TPSFLAG_BPFLAG;
++			intvec |= tmp;
++		}
++		ssb_write32(pdev, SSB_INTVEC, intvec);
++	}
++
++	/* Setup PCIcore operation. */
++	if (pc->setup_done)
++		goto out;
++	if (pdev->id.coreid == SSB_DEV_PCI) {
++		tmp = pcicore_read32(pc, SSB_PCICORE_SBTOPCI2);
++		tmp |= SSB_PCICORE_SBTOPCI_PREF;
++		tmp |= SSB_PCICORE_SBTOPCI_BURST;
++		pcicore_write32(pc, SSB_PCICORE_SBTOPCI2, tmp);
++
++		if (pdev->id.revision < 5) {
++			tmp = ssb_read32(pdev, SSB_IMCFGLO);
++			tmp &= ~SSB_IMCFGLO_SERTO;
++			tmp |= 2;
++			tmp &= ~SSB_IMCFGLO_REQTO;
++			tmp |= 3 << SSB_IMCFGLO_REQTO_SHIFT;
++			ssb_write32(pdev, SSB_IMCFGLO, tmp);
++			ssb_commit_settings(bus);
++		} else if (pdev->id.revision >= 11) {
++			tmp = pcicore_read32(pc, SSB_PCICORE_SBTOPCI2);
++			tmp |= SSB_PCICORE_SBTOPCI_MRM;
++			pcicore_write32(pc, SSB_PCICORE_SBTOPCI2, tmp);
++		}
++	} else {
++		WARN_ON(pdev->id.coreid != SSB_DEV_PCIE);
++		//TODO: Better make defines for all these magic PCIE values.
++		if ((pdev->id.revision == 0) || (pdev->id.revision == 1)) {
++			/* TLP Workaround register. */
++			tmp = ssb_pcie_read(pc, 0x4);
++			tmp |= 0x8;
++			ssb_pcie_write(pc, 0x4, tmp);
++		}
++		if (pdev->id.revision == 0) {
++			const u8 serdes_rx_device = 0x1F;
++
++			ssb_pcie_mdio_write(pc, serdes_rx_device,
++					    2 /* Timer */, 0x8128);
++			ssb_pcie_mdio_write(pc, serdes_rx_device,
++					    6 /* CDR */, 0x0100);
++			ssb_pcie_mdio_write(pc, serdes_rx_device,
++					    7 /* CDR BW */, 0x1466);
++		} else if (pdev->id.revision == 1) {
++			/* DLLP Link Control register. */
++			tmp = ssb_pcie_read(pc, 0x100);
++			tmp |= 0x40;
++			ssb_pcie_write(pc, 0x100, tmp);
++		}
++	}
++	pc->setup_done = 1;
++out:
++	return err;
++}
++EXPORT_SYMBOL(ssb_pcicore_dev_irqvecs_enable);




More information about the fedora-extras-commits mailing list