Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6440be17 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6

parents 49186b4a 09971493
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2547,12 +2547,10 @@ W: http://www.tazenda.demon.co.uk/phil/linux-hp
S:	Maintained

MAC80211
P:	Michael Wu
M:	flamingice@sourmilk.net
P:	Johannes Berg
M:	johannes@sipsolutions.net
P:	Jiri Benc
M:	jbenc@suse.cz
P:	Michael Wu
M:	flamingice@sourmilk.net
L:	linux-wireless@vger.kernel.org
W:	http://linuxwireless.org/
T:	git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git
+10 −4
Original line number Diff line number Diff line
@@ -304,14 +304,20 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
		ah->ah_radio = AR5K_RF2413;
		ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
	} else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) {

		ah->ah_radio = AR5K_RF5413;
		ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
	} else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_5133) {

		if (ah->ah_mac_srev <= AR5K_SREV_VER_AR5424 &&
			ah->ah_mac_srev >= AR5K_SREV_VER_AR2424)
		/* AR5424 */
		if (srev >= AR5K_SREV_VER_AR5424) {
			ah->ah_radio = AR5K_RF5413;
			ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424;
		else
		/* AR2424 */
		} else {
			ah->ah_radio = AR5K_RF2413; /* For testing */
			ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
		}

	/*
	 * Register returns 0x4 for radio revision
	 * so ath5k_hw_radio_revision doesn't parse the value
+39 −8
Original line number Diff line number Diff line
@@ -980,6 +980,42 @@ void b43_dma_free(struct b43_wldev *dev)
	destroy_ring(dma, tx_ring_mcast);
}

static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
{
	u64 orig_mask = mask;
	bool fallback = 0;
	int err;

	/* Try to set the DMA mask. If it fails, try falling back to a
	 * lower mask, as we can always also support a lower one. */
	while (1) {
		err = ssb_dma_set_mask(dev->dev, mask);
		if (!err)
			break;
		if (mask == DMA_64BIT_MASK) {
			mask = DMA_32BIT_MASK;
			fallback = 1;
			continue;
		}
		if (mask == DMA_32BIT_MASK) {
			mask = DMA_30BIT_MASK;
			fallback = 1;
			continue;
		}
		b43err(dev->wl, "The machine/kernel does not support "
		       "the required %u-bit DMA mask\n",
		       (unsigned int)dma_mask_to_engine_type(orig_mask));
		return -EOPNOTSUPP;
	}
	if (fallback) {
		b43info(dev->wl, "DMA mask fallback from %u-bit to %u-bit\n",
			(unsigned int)dma_mask_to_engine_type(orig_mask),
			(unsigned int)dma_mask_to_engine_type(mask));
	}

	return 0;
}

int b43_dma_init(struct b43_wldev *dev)
{
	struct b43_dma *dma = &dev->dma;
@@ -989,14 +1025,9 @@ int b43_dma_init(struct b43_wldev *dev)

	dmamask = supported_dma_mask(dev);
	type = dma_mask_to_engine_type(dmamask);
	err = ssb_dma_set_mask(dev->dev, dmamask);
	if (err) {
		b43err(dev->wl, "The machine/kernel does not support "
		       "the required DMA mask (0x%08X%08X)\n",
		       (unsigned int)((dmamask & 0xFFFFFFFF00000000ULL) >> 32),
		       (unsigned int)(dmamask & 0x00000000FFFFFFFFULL));
		return -EOPNOTSUPP;
	}
	err = b43_dma_set_mask(dev, dmamask);
	if (err)
		return err;

	err = -ENOMEM;
	/* setup TX DMA channels. */
+28 −4
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@ int b43_modparam_qos = 1;
module_param_named(qos, b43_modparam_qos, int, 0444);
MODULE_PARM_DESC(qos, "Enable QOS support (default on)");

static int modparam_btcoex = 1;
module_param_named(btcoex, modparam_btcoex, int, 0444);
MODULE_PARM_DESC(btcoex, "Enable Bluetooth coexistance (default on)");


static const struct ssb_device_id b43_ssb_tbl[] = {
	SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 5),
@@ -3706,8 +3710,10 @@ static void setup_struct_wldev_for_init(struct b43_wldev *dev)
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)
@@ -3719,11 +3725,13 @@ static void b43_bluetooth_coext_enable(struct b43_wldev *dev)
	else
		hf |= B43_HF_BTCOEX;
	b43_hf_write(dev, hf);
	//TODO
}

static void b43_bluetooth_coext_disable(struct b43_wldev *dev)
{				//TODO
{
	if (!modparam_btcoex)
		return;
	//TODO
}

static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev)
@@ -3852,7 +3860,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
	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);

@@ -4414,8 +4423,16 @@ static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl)
	return err;
}

#define IS_PDEV(pdev, _vendor, _device, _subvendor, _subdevice)		( \
	(pdev->vendor == PCI_VENDOR_ID_##_vendor) &&			\
	(pdev->device == _device) &&					\
	(pdev->subsystem_vendor == PCI_VENDOR_ID_##_subvendor) &&	\
	(pdev->subsystem_device == _subdevice)				)

static void b43_sprom_fixup(struct ssb_bus *bus)
{
	struct pci_dev *pdev;

	/* boardflags workarounds */
	if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL &&
	    bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74)
@@ -4423,6 +4440,13 @@ static void b43_sprom_fixup(struct ssb_bus *bus)
	if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE &&
	    bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40)
		bus->sprom.boardflags_lo |= B43_BFL_PACTRL;
	if (bus->bustype == SSB_BUSTYPE_PCI) {
		pdev = bus->host_pci;
		if (IS_PDEV(pdev, BROADCOM, 0x4318, ASUSTEK, 0x100F) ||
		    IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0015) ||
		    IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0013))
			bus->sprom.boardflags_lo &= ~B43_BFL_BTCOEXIST;
	}
}

static void b43_wireless_exit(struct ssb_device *dev, struct b43_wl *wl)
+1 −1
Original line number Diff line number Diff line
@@ -2043,7 +2043,7 @@ int b43_phy_init(struct b43_wldev *dev)
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;

Loading