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

Commit 54dceb00 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-next-2.6

parents 11a100f8 b4637271
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -611,14 +611,20 @@ config RTL8180
	  Thanks to Realtek for their support!

config RTL8187
	tristate "Realtek 8187 USB support"
	tristate "Realtek 8187 and 8187B USB support"
	depends on MAC80211 && USB && WLAN_80211 && EXPERIMENTAL
	select EEPROM_93CX6
	---help---
	  This is a driver for RTL8187 based cards.
	  These are USB based chips found in cards such as:
	  This is a driver for RTL8187 and RTL8187B based cards.
	  These are USB based chips found in devices such as:

	  Netgear WG111v2
	  Level 1 WNC-0301USB
	  Micronet SP907GK V5
	  Encore ENUWI-G2
	  Trendnet TEW-424UB
	  ASUS P5B Deluxe
	  Toshiba Satellite Pro series of laptops

	  Thanks to Realtek for their support!

+51 −15
Original line number Diff line number Diff line
@@ -859,6 +859,18 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
	return DMA_30BIT_MASK;
}

static enum b43legacy_dmatype dma_mask_to_engine_type(u64 dmamask)
{
	if (dmamask == DMA_30BIT_MASK)
		return B43legacy_DMA_30BIT;
	if (dmamask == DMA_32BIT_MASK)
		return B43legacy_DMA_32BIT;
	if (dmamask == DMA_64BIT_MASK)
		return B43legacy_DMA_64BIT;
	B43legacy_WARN_ON(1);
	return B43legacy_DMA_30BIT;
}

/* Main initialization function. */
static
struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
@@ -1018,6 +1030,43 @@ void b43legacy_dma_free(struct b43legacy_wldev *dev)
	dma->tx_ring0 = NULL;
}

static int b43legacy_dma_set_mask(struct b43legacy_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;
		}
		b43legacyerr(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) {
		b43legacyinfo(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 b43legacy_dma_init(struct b43legacy_wldev *dev)
{
	struct b43legacy_dma *dma = &dev->dma;
@@ -1027,21 +1076,8 @@ int b43legacy_dma_init(struct b43legacy_wldev *dev)
	enum b43legacy_dmatype type;

	dmamask = supported_dma_mask(dev);
	switch (dmamask) {
	default:
		B43legacy_WARN_ON(1);
	case DMA_30BIT_MASK:
		type = B43legacy_DMA_30BIT;
		break;
	case DMA_32BIT_MASK:
		type = B43legacy_DMA_32BIT;
		break;
	case DMA_64BIT_MASK:
		type = B43legacy_DMA_64BIT;
		break;
	}

	err = ssb_dma_set_mask(dev->dev, dmamask);
	type = dma_mask_to_engine_type(dmamask);
	err = b43legacy_dma_set_mask(dev, dmamask);
	if (err) {
#ifdef CONFIG_B43LEGACY_PIO
		b43legacywarn(dev->wl, "DMA for this device not supported. "
+2 −2
Original line number Diff line number Diff line
@@ -3417,7 +3417,7 @@ static void prism2_free_local_data(struct net_device *dev)
}


#ifndef PRISM2_PLX
#if (defined(PRISM2_PCI) && defined(CONFIG_PM)) || defined(PRISM2_PCCARD)
static void prism2_suspend(struct net_device *dev)
{
	struct hostap_interface *iface;
@@ -3436,7 +3436,7 @@ static void prism2_suspend(struct net_device *dev)
	/* Disable hardware and firmware */
	prism2_hw_shutdown(dev, 0);
}
#endif /* PRISM2_PLX */
#endif /* (PRISM2_PCI && CONFIG_PM) || PRISM2_PCCARD */


/* These might at some point be compiled separately and used as separate
+5 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ config IWL3945
	select IWLWIFI
	select MAC80211_LEDS if IWL3945_LEDS
	select LEDS_CLASS if IWL3945_LEDS
	select RFKILL if IWL3945_RFKILL
	---help---
	  Select to build the driver supporting the:

@@ -126,6 +127,10 @@ config IWL3945
	  say M here and read <file:Documentation/kbuild/modules.txt>.  The
	  module will be called iwl3945.ko.

config IWL3945_RFKILL
	bool "Enable RF kill support in iwl3945 drivers"
	depends on IWL3945

config IWL3945_SPECTRUM_MEASUREMENT
	bool "Enable Spectrum Measurement in iwl3945 drivers"
	depends on IWL3945
+3 −8
Original line number Diff line number Diff line
@@ -690,14 +690,9 @@ enum {

#endif

#ifdef CONFIG_IWLWIFI_RFKILL
#ifdef CONFIG_IWL3945_RFKILL
struct iwl3945_priv;

struct iwl3945_rfkill_mngr {
	struct rfkill *rfkill;
	struct input_dev *input_dev;
};

void iwl3945_rfkill_set_hw_state(struct iwl3945_priv *priv);
void iwl3945_rfkill_unregister(struct iwl3945_priv *priv);
int iwl3945_rfkill_init(struct iwl3945_priv *priv);
@@ -800,8 +795,8 @@ struct iwl3945_priv {
	struct iwl3945_init_alive_resp card_alive_init;
	struct iwl3945_alive_resp card_alive;

#ifdef CONFIG_IWLWIFI_RFKILL
	struct iwl3945_rfkill_mngr rfkill_mngr;
#ifdef CONFIG_IWL3945_RFKILL
	struct rfkill *rfkill;
#endif

#ifdef CONFIG_IWL3945_LEDS
Loading