diff options
Diffstat (limited to 'drivers/net/wireless/b43')
| -rw-r--r-- | drivers/net/wireless/b43/Kconfig | 44 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/b43.h | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/bus.h | 10 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/debugfs.h | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/dma.c | 9 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/main.c | 528 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/main.h | 35 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/phy_common.c | 100 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/phy_common.h | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/phy_g.c | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 338 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/phy_n.h | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/pio.c | 10 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/radio_2056.c | 1336 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/sysfs.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/tables_nphy.c | 150 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/tables_nphy.h | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/wa.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/xmit.c | 28 | 
19 files changed, 2039 insertions, 581 deletions
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig index 51ff0b198d0..40fd9b7b142 100644 --- a/drivers/net/wireless/b43/Kconfig +++ b/drivers/net/wireless/b43/Kconfig @@ -1,7 +1,8 @@  config B43  	tristate "Broadcom 43xx wireless support (mac80211 stack)" -	depends on SSB_POSSIBLE && MAC80211 && HAS_DMA -	select SSB +	depends on (BCMA_POSSIBLE || SSB_POSSIBLE) && MAC80211 && HAS_DMA +	select BCMA if B43_BCMA +	select SSB if B43_SSB  	select FW_LOADER  	---help---  	  b43 is a driver for the Broadcom 43xx series wireless devices. @@ -27,14 +28,33 @@ config B43  	  If unsure, say M.  config B43_BCMA -	bool "Support for BCMA bus" -	depends on B43 && (BCMA = y || BCMA = B43) -	default y +	bool  config B43_SSB  	bool -	depends on B43 && (SSB = y || SSB = B43) -	default y + +choice +	prompt "Supported bus types" +	depends on B43 +	default B43_BUSES_BCMA_AND_SSB + +config B43_BUSES_BCMA_AND_SSB +	bool "BCMA and SSB" +	depends on BCMA_POSSIBLE && SSB_POSSIBLE +	select B43_BCMA +	select B43_SSB + +config B43_BUSES_BCMA +	bool "BCMA only" +	depends on BCMA_POSSIBLE +	select B43_BCMA + +config B43_BUSES_SSB +	bool "SSB only" +	depends on SSB_POSSIBLE +	select B43_SSB + +endchoice  # Auto-select SSB PCI-HOST support, if possible  config B43_PCI_AUTOSELECT @@ -53,7 +73,7 @@ config B43_PCICORE_AUTOSELECT  config B43_PCMCIA  	bool "Broadcom 43xx PCMCIA device support" -	depends on B43 && SSB_PCMCIAHOST_POSSIBLE +	depends on B43 && B43_SSB && SSB_PCMCIAHOST_POSSIBLE  	select SSB_PCMCIAHOST  	---help---  	  Broadcom 43xx PCMCIA device support. @@ -73,7 +93,7 @@ config B43_PCMCIA  config B43_SDIO  	bool "Broadcom 43xx SDIO device support" -	depends on B43 && SSB_SDIOHOST_POSSIBLE +	depends on B43 && B43_SSB && SSB_SDIOHOST_POSSIBLE  	select SSB_SDIOHOST  	---help---  	  Broadcom 43xx device support for Soft-MAC SDIO devices. @@ -92,13 +112,13 @@ config B43_SDIO  # if we can do DMA.  config B43_BCMA_PIO  	bool -	depends on B43_BCMA +	depends on B43 && B43_BCMA  	select BCMA_BLOCKIO  	default y  config B43_PIO  	bool -	depends on B43 +	depends on B43 && B43_SSB  	select SSB_BLOCKIO  	default y @@ -116,7 +136,7 @@ config B43_PHY_N  config B43_PHY_LP  	bool "Support for low-power (LP-PHY) devices" -	depends on B43 +	depends on B43 && B43_SSB  	default y  	---help---  	  Support for the LP-PHY. diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 7f3d461f7e8..4113b693476 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h @@ -731,8 +731,6 @@ enum b43_firmware_file_type {  struct b43_request_fw_context {  	/* The device we are requesting the fw for. */  	struct b43_wldev *dev; -	/* a completion event structure needed if this call is asynchronous */ -	struct completion fw_load_complete;  	/* a pointer to the firmware object */  	const struct firmware *blob;  	/* The type of firmware to request. */ @@ -809,6 +807,8 @@ enum {  struct b43_wldev {  	struct b43_bus_dev *dev;  	struct b43_wl *wl; +	/* a completion event structure needed if this call is asynchronous */ +	struct completion fw_load_complete;  	/* The device initialization status.  	 * Use b43_status() to query. */ @@ -915,10 +915,6 @@ struct b43_wl {  	char rng_name[30 + 1];  #endif /* CONFIG_B43_HWRNG */ -	/* List of all wireless devices on this chip */ -	struct list_head devlist; -	u8 nr_devs; -  	bool radiotap_enabled;  	bool radio_enabled; diff --git a/drivers/net/wireless/b43/bus.h b/drivers/net/wireless/b43/bus.h index 184c9565927..f3205c6988b 100644 --- a/drivers/net/wireless/b43/bus.h +++ b/drivers/net/wireless/b43/bus.h @@ -5,7 +5,9 @@ enum b43_bus_type {  #ifdef CONFIG_B43_BCMA  	B43_BUS_BCMA,  #endif +#ifdef CONFIG_B43_SSB  	B43_BUS_SSB, +#endif  };  struct b43_bus_dev { @@ -52,13 +54,21 @@ struct b43_bus_dev {  static inline bool b43_bus_host_is_pcmcia(struct b43_bus_dev *dev)  { +#ifdef CONFIG_B43_SSB  	return (dev->bus_type == B43_BUS_SSB &&  		dev->sdev->bus->bustype == SSB_BUSTYPE_PCMCIA); +#else +	return false; +#endif  }  static inline bool b43_bus_host_is_sdio(struct b43_bus_dev *dev)  { +#ifdef CONFIG_B43_SSB  	return (dev->bus_type == B43_BUS_SSB &&  		dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO); +#else +	return false; +#endif  }  struct b43_bus_dev *b43_bus_dev_bcma_init(struct bcma_device *core); diff --git a/drivers/net/wireless/b43/debugfs.h b/drivers/net/wireless/b43/debugfs.h index 822aad8842f..50517b801cb 100644 --- a/drivers/net/wireless/b43/debugfs.h +++ b/drivers/net/wireless/b43/debugfs.h @@ -86,7 +86,7 @@ void b43_debugfs_log_txstat(struct b43_wldev *dev,  static inline bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)  { -	return 0; +	return false;  }  static inline void b43_debugfs_init(void) diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index c51d2dc489e..1d7982afc0a 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c @@ -1065,12 +1065,9 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)  	/* 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 = dma_set_mask(dev->dev->dma_dev, mask); -		if (!err) { -			err = dma_set_coherent_mask(dev->dev->dma_dev, mask); -			if (!err) -				break; -		} +		err = dma_set_mask_and_coherent(dev->dev->dma_dev, mask); +		if (!err) +			break;  		if (mask == DMA_BIT_MASK(64)) {  			mask = DMA_BIT_MASK(32);  			fallback = true; diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index ccd24f0acb8..0d6a0bb1f87 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -182,7 +182,7 @@ static struct ieee80211_rate __b43_ratetable[] = {  #define b43_g_ratetable		(__b43_ratetable + 0)  #define b43_g_ratetable_size	12 -#define CHAN4G(_channel, _freq, _flags) {			\ +#define CHAN2G(_channel, _freq, _flags) {			\  	.band			= IEEE80211_BAND_2GHZ,		\  	.center_freq		= (_freq),			\  	.hw_value		= (_channel),			\ @@ -191,23 +191,31 @@ static struct ieee80211_rate __b43_ratetable[] = {  	.max_power		= 30,				\  }  static struct ieee80211_channel b43_2ghz_chantable[] = { -	CHAN4G(1, 2412, 0), -	CHAN4G(2, 2417, 0), -	CHAN4G(3, 2422, 0), -	CHAN4G(4, 2427, 0), -	CHAN4G(5, 2432, 0), -	CHAN4G(6, 2437, 0), -	CHAN4G(7, 2442, 0), -	CHAN4G(8, 2447, 0), -	CHAN4G(9, 2452, 0), -	CHAN4G(10, 2457, 0), -	CHAN4G(11, 2462, 0), -	CHAN4G(12, 2467, 0), -	CHAN4G(13, 2472, 0), -	CHAN4G(14, 2484, 0), +	CHAN2G(1, 2412, 0), +	CHAN2G(2, 2417, 0), +	CHAN2G(3, 2422, 0), +	CHAN2G(4, 2427, 0), +	CHAN2G(5, 2432, 0), +	CHAN2G(6, 2437, 0), +	CHAN2G(7, 2442, 0), +	CHAN2G(8, 2447, 0), +	CHAN2G(9, 2452, 0), +	CHAN2G(10, 2457, 0), +	CHAN2G(11, 2462, 0), +	CHAN2G(12, 2467, 0), +	CHAN2G(13, 2472, 0), +	CHAN2G(14, 2484, 0),  }; -#undef CHAN4G +#undef CHAN2G +#define CHAN4G(_channel, _flags) {				\ +	.band			= IEEE80211_BAND_5GHZ,		\ +	.center_freq		= 4000 + (5 * (_channel)),	\ +	.hw_value		= (_channel),			\ +	.flags			= (_flags),			\ +	.max_antenna_gain	= 0,				\ +	.max_power		= 30,				\ +}  #define CHAN5G(_channel, _flags) {				\  	.band			= IEEE80211_BAND_5GHZ,		\  	.center_freq		= 5000 + (5 * (_channel)),	\ @@ -217,6 +225,18 @@ static struct ieee80211_channel b43_2ghz_chantable[] = {  	.max_power		= 30,				\  }  static struct ieee80211_channel b43_5ghz_nphy_chantable[] = { +	CHAN4G(184, 0),		CHAN4G(186, 0), +	CHAN4G(188, 0),		CHAN4G(190, 0), +	CHAN4G(192, 0),		CHAN4G(194, 0), +	CHAN4G(196, 0),		CHAN4G(198, 0), +	CHAN4G(200, 0),		CHAN4G(202, 0), +	CHAN4G(204, 0),		CHAN4G(206, 0), +	CHAN4G(208, 0),		CHAN4G(210, 0), +	CHAN4G(212, 0),		CHAN4G(214, 0), +	CHAN4G(216, 0),		CHAN4G(218, 0), +	CHAN4G(220, 0),		CHAN4G(222, 0), +	CHAN4G(224, 0),		CHAN4G(226, 0), +	CHAN4G(228, 0),  	CHAN5G(32, 0),		CHAN5G(34, 0),  	CHAN5G(36, 0),		CHAN5G(38, 0),  	CHAN5G(40, 0),		CHAN5G(42, 0), @@ -260,18 +280,7 @@ static struct ieee80211_channel b43_5ghz_nphy_chantable[] = {  	CHAN5G(170, 0),		CHAN5G(172, 0),  	CHAN5G(174, 0),		CHAN5G(176, 0),  	CHAN5G(178, 0),		CHAN5G(180, 0), -	CHAN5G(182, 0),		CHAN5G(184, 0), -	CHAN5G(186, 0),		CHAN5G(188, 0), -	CHAN5G(190, 0),		CHAN5G(192, 0), -	CHAN5G(194, 0),		CHAN5G(196, 0), -	CHAN5G(198, 0),		CHAN5G(200, 0), -	CHAN5G(202, 0),		CHAN5G(204, 0), -	CHAN5G(206, 0),		CHAN5G(208, 0), -	CHAN5G(210, 0),		CHAN5G(212, 0), -	CHAN5G(214, 0),		CHAN5G(216, 0), -	CHAN5G(218, 0),		CHAN5G(220, 0), -	CHAN5G(222, 0),		CHAN5G(224, 0), -	CHAN5G(226, 0),		CHAN5G(228, 0), +	CHAN5G(182, 0),  };  static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { @@ -295,6 +304,7 @@ static struct ieee80211_channel b43_5ghz_aphy_chantable[] = {  	CHAN5G(208, 0),		CHAN5G(212, 0),  	CHAN5G(216, 0),  }; +#undef CHAN4G  #undef CHAN5G  static struct ieee80211_supported_band b43_band_5GHz_nphy = { @@ -1175,18 +1185,7 @@ static void b43_bcma_phy_reset(struct b43_wldev *dev)  	bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, flags);  	udelay(2); -	/* Take PHY out of reset */ -	flags = bcma_aread32(dev->dev->bdev, BCMA_IOCTL); -	flags &= ~B43_BCMA_IOCTL_PHY_RESET; -	flags |= BCMA_IOCTL_FGC; -	bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, flags); -	udelay(1); - -	/* Do not force clock anymore */ -	flags = bcma_aread32(dev->dev->bdev, BCMA_IOCTL); -	flags &= ~BCMA_IOCTL_FGC; -	bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, flags); -	udelay(1); +	b43_phy_take_out_of_reset(dev);  }  static void b43_bcma_wireless_core_reset(struct b43_wldev *dev, bool gmode) @@ -1195,18 +1194,22 @@ static void b43_bcma_wireless_core_reset(struct b43_wldev *dev, bool gmode)  		  B43_BCMA_CLKCTLST_PHY_PLL_REQ;  	u32 status = B43_BCMA_CLKCTLST_80211_PLL_ST |  		     B43_BCMA_CLKCTLST_PHY_PLL_ST; +	u32 flags; + +	flags = B43_BCMA_IOCTL_PHY_CLKEN; +	if (gmode) +		flags |= B43_BCMA_IOCTL_GMODE; +	b43_device_enable(dev, flags); -	b43_device_enable(dev, B43_BCMA_IOCTL_PHY_CLKEN);  	bcma_core_set_clockmode(dev->dev->bdev, BCMA_CLKMODE_FAST);  	b43_bcma_phy_reset(dev);  	bcma_core_pll_ctl(dev->dev->bdev, req, status, true);  }  #endif +#ifdef CONFIG_B43_SSB  static void b43_ssb_wireless_core_reset(struct b43_wldev *dev, bool gmode)  { -	struct ssb_device *sdev = dev->dev->sdev; -	u32 tmslow;  	u32 flags = 0;  	if (gmode) @@ -1218,18 +1221,9 @@ static void b43_ssb_wireless_core_reset(struct b43_wldev *dev, bool gmode)  	b43_device_enable(dev, flags);  	msleep(2);		/* Wait for the PLL to turn on. */ -	/* Now take the PHY out of Reset again */ -	tmslow = ssb_read32(sdev, SSB_TMSLOW); -	tmslow |= SSB_TMSLOW_FGC; -	tmslow &= ~B43_TMSLOW_PHYRESET; -	ssb_write32(sdev, SSB_TMSLOW, tmslow); -	ssb_read32(sdev, SSB_TMSLOW);	/* flush */ -	msleep(1); -	tmslow &= ~SSB_TMSLOW_FGC; -	ssb_write32(sdev, SSB_TMSLOW, tmslow); -	ssb_read32(sdev, SSB_TMSLOW);	/* flush */ -	msleep(1); +	b43_phy_take_out_of_reset(dev);  } +#endif  void b43_wireless_core_reset(struct b43_wldev *dev, bool gmode)  { @@ -1549,7 +1543,7 @@ static void b43_write_beacon_template(struct b43_wldev *dev,  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(dev->wl->current_beacon);  	bcn = (const struct ieee80211_mgmt *)(dev->wl->current_beacon->data); -	len = min((size_t) dev->wl->current_beacon->len, +	len = min_t(size_t, dev->wl->current_beacon->len,  		  0x200 - sizeof(struct b43_plcp_hdr6));  	rate = ieee80211_get_tx_rate(dev->wl->hw, info)->hw_value; @@ -2070,6 +2064,7 @@ void b43_do_release_fw(struct b43_firmware_file *fw)  static void b43_release_firmware(struct b43_wldev *dev)  { +	complete(&dev->fw_load_complete);  	b43_do_release_fw(&dev->fw.ucode);  	b43_do_release_fw(&dev->fw.pcm);  	b43_do_release_fw(&dev->fw.initvals); @@ -2095,7 +2090,7 @@ static void b43_fw_cb(const struct firmware *firmware, void *context)  	struct b43_request_fw_context *ctx = context;  	ctx->blob = firmware; -	complete(&ctx->fw_load_complete); +	complete(&ctx->dev->fw_load_complete);  }  int b43_do_request_fw(struct b43_request_fw_context *ctx, @@ -2142,7 +2137,7 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx,  	}  	if (async) {  		/* do this part asynchronously */ -		init_completion(&ctx->fw_load_complete); +		init_completion(&ctx->dev->fw_load_complete);  		err = request_firmware_nowait(THIS_MODULE, 1, ctx->fwname,  					      ctx->dev->dev->dev, GFP_KERNEL,  					      ctx, b43_fw_cb); @@ -2150,12 +2145,11 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx,  			pr_err("Unable to load firmware\n");  			return err;  		} -		/* stall here until fw ready */ -		wait_for_completion(&ctx->fw_load_complete); +		wait_for_completion(&ctx->dev->fw_load_complete);  		if (ctx->blob)  			goto fw_ready;  	/* On some ARM systems, the async request will fail, but the next sync -	 * request works. For this reason, we dall through here +	 * request works. For this reason, we fall through here  	 */  	}  	err = request_firmware(&ctx->blob, ctx->fwname, @@ -2424,6 +2418,7 @@ error:  static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl);  static void b43_one_core_detach(struct b43_bus_dev *dev); +static int b43_rng_init(struct b43_wl *wl);  static void b43_request_firmware(struct work_struct *work)  { @@ -2475,6 +2470,10 @@ start_ieee80211:  		goto err_one_core_detach;  	wl->hw_registred = true;  	b43_leds_register(wl->current_dev); + +	/* Register HW RNG driver */ +	b43_rng_init(wl); +  	goto out;  err_one_core_detach: @@ -2699,32 +2698,37 @@ static int b43_upload_initvals(struct b43_wldev *dev)  	struct b43_firmware *fw = &dev->fw;  	const struct b43_iv *ivals;  	size_t count; -	int err;  	hdr = (const struct b43_fw_header *)(fw->initvals.data->data);  	ivals = (const struct b43_iv *)(fw->initvals.data->data + hdr_len);  	count = be32_to_cpu(hdr->size); -	err = b43_write_initvals(dev, ivals, count, +	return b43_write_initvals(dev, ivals, count,  				 fw->initvals.data->size - hdr_len); -	if (err) -		goto out; -	if (fw->initvals_band.data) { -		hdr = (const struct b43_fw_header *)(fw->initvals_band.data->data); -		ivals = (const struct b43_iv *)(fw->initvals_band.data->data + hdr_len); -		count = be32_to_cpu(hdr->size); -		err = b43_write_initvals(dev, ivals, count, -					 fw->initvals_band.data->size - hdr_len); -		if (err) -			goto out; -	} -out: +} -	return err; +static int b43_upload_initvals_band(struct b43_wldev *dev) +{ +	const size_t hdr_len = sizeof(struct b43_fw_header); +	const struct b43_fw_header *hdr; +	struct b43_firmware *fw = &dev->fw; +	const struct b43_iv *ivals; +	size_t count; + +	if (!fw->initvals_band.data) +		return 0; + +	hdr = (const struct b43_fw_header *)(fw->initvals_band.data->data); +	ivals = (const struct b43_iv *)(fw->initvals_band.data->data + hdr_len); +	count = be32_to_cpu(hdr->size); +	return b43_write_initvals(dev, ivals, count, +				  fw->initvals_band.data->size - hdr_len);  }  /* Initialize the GPIOs   * http://bcm-specs.sipsolutions.net/GPIO   */ + +#ifdef CONFIG_B43_SSB  static struct ssb_device *b43_ssb_gpio_dev(struct b43_wldev *dev)  {  	struct ssb_bus *bus = dev->dev->sdev->bus; @@ -2735,10 +2739,13 @@ static struct ssb_device *b43_ssb_gpio_dev(struct b43_wldev *dev)  	return bus->chipco.dev;  #endif  } +#endif  static int b43_gpio_init(struct b43_wldev *dev)  { +#ifdef CONFIG_B43_SSB  	struct ssb_device *gpiodev; +#endif  	u32 mask, set;  	b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0); @@ -2797,7 +2804,9 @@ static int b43_gpio_init(struct b43_wldev *dev)  /* Turn off all GPIO stuff. Call this on module unload, for example. */  static void b43_gpio_cleanup(struct b43_wldev *dev)  { +#ifdef CONFIG_B43_SSB  	struct ssb_device *gpiodev; +#endif  	switch (dev->dev->bus_type) {  #ifdef CONFIG_B43_BCMA @@ -3081,6 +3090,10 @@ static int b43_chip_init(struct b43_wldev *dev)  	if (err)  		goto err_gpio_clean; +	err = b43_upload_initvals_band(dev); +	if (err) +		goto err_gpio_clean; +  	/* Turn the Analog on and initialize the PHY. */  	phy->ops->switch_analog(dev, 1);  	err = b43_phy_init(dev); @@ -3680,37 +3693,6 @@ static void b43_op_set_tsf(struct ieee80211_hw *hw,  	mutex_unlock(&wl->mutex);  } -static void b43_put_phy_into_reset(struct b43_wldev *dev) -{ -	u32 tmp; - -	switch (dev->dev->bus_type) { -#ifdef CONFIG_B43_BCMA -	case B43_BUS_BCMA: -		b43err(dev->wl, -		       "Putting PHY into reset not supported on BCMA\n"); -		break; -#endif -#ifdef CONFIG_B43_SSB -	case B43_BUS_SSB: -		tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW); -		tmp &= ~B43_TMSLOW_GMODE; -		tmp |= B43_TMSLOW_PHYRESET; -		tmp |= SSB_TMSLOW_FGC; -		ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp); -		msleep(1); - -		tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW); -		tmp &= ~SSB_TMSLOW_FGC; -		tmp |= B43_TMSLOW_PHYRESET; -		ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp); -		msleep(1); - -		break; -#endif -	} -} -  static const char *band_to_string(enum ieee80211_band band)  {  	switch (band) { @@ -3726,94 +3708,75 @@ static const char *band_to_string(enum ieee80211_band band)  }  /* Expects wl->mutex locked */ -static int b43_switch_band(struct b43_wl *wl, struct ieee80211_channel *chan) +static int b43_switch_band(struct b43_wldev *dev, +			   struct ieee80211_channel *chan)  { -	struct b43_wldev *up_dev = NULL; -	struct b43_wldev *down_dev; -	struct b43_wldev *d; -	int err; -	bool uninitialized_var(gmode); -	int prev_status; +	struct b43_phy *phy = &dev->phy; +	bool gmode; +	u32 tmp; -	/* Find a device and PHY which supports the band. */ -	list_for_each_entry(d, &wl->devlist, list) { -		switch (chan->band) { -		case IEEE80211_BAND_5GHZ: -			if (d->phy.supports_5ghz) { -				up_dev = d; -				gmode = false; -			} -			break; -		case IEEE80211_BAND_2GHZ: -			if (d->phy.supports_2ghz) { -				up_dev = d; -				gmode = true; -			} -			break; -		default: -			B43_WARN_ON(1); -			return -EINVAL; -		} -		if (up_dev) -			break; +	switch (chan->band) { +	case IEEE80211_BAND_5GHZ: +		gmode = false; +		break; +	case IEEE80211_BAND_2GHZ: +		gmode = true; +		break; +	default: +		B43_WARN_ON(1); +		return -EINVAL;  	} -	if (!up_dev) { -		b43err(wl, "Could not find a device for %s-GHz band operation\n", + +	if (!((gmode && phy->supports_2ghz) || +	      (!gmode && phy->supports_5ghz))) { +		b43err(dev->wl, "This device doesn't support %s-GHz band\n",  		       band_to_string(chan->band));  		return -ENODEV;  	} -	if ((up_dev == wl->current_dev) && -	    (!!wl->current_dev->phy.gmode == !!gmode)) { + +	if (!!phy->gmode == !!gmode) {  		/* This device is already running. */  		return 0;  	} -	b43dbg(wl, "Switching to %s-GHz band\n", + +	b43dbg(dev->wl, "Switching to %s GHz band\n",  	       band_to_string(chan->band)); -	down_dev = wl->current_dev; -	prev_status = b43_status(down_dev); -	/* Shutdown the currently running core. */ -	if (prev_status >= B43_STAT_STARTED) -		down_dev = b43_wireless_core_stop(down_dev); -	if (prev_status >= B43_STAT_INITIALIZED) -		b43_wireless_core_exit(down_dev); +	/* Some new devices don't need disabling radio for band switching */ +	if (!(phy->type == B43_PHYTYPE_N && phy->rev >= 3)) +		b43_software_rfkill(dev, true); -	if (down_dev != up_dev) { -		/* We switch to a different core, so we put PHY into -		 * RESET on the old core. */ -		b43_put_phy_into_reset(down_dev); +	phy->gmode = gmode; +	b43_phy_put_into_reset(dev); +	switch (dev->dev->bus_type) { +#ifdef CONFIG_B43_BCMA +	case B43_BUS_BCMA: +		tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL); +		if (gmode) +			tmp |= B43_BCMA_IOCTL_GMODE; +		else +			tmp &= ~B43_BCMA_IOCTL_GMODE; +		bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp); +		break; +#endif +#ifdef CONFIG_B43_SSB +	case B43_BUS_SSB: +		tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW); +		if (gmode) +			tmp |= B43_TMSLOW_GMODE; +		else +			tmp &= ~B43_TMSLOW_GMODE; +		ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp); +		break; +#endif  	} +	b43_phy_take_out_of_reset(dev); -	/* Now start the new core. */ -	up_dev->phy.gmode = gmode; -	if (prev_status >= B43_STAT_INITIALIZED) { -		err = b43_wireless_core_init(up_dev); -		if (err) { -			b43err(wl, "Fatal: Could not initialize device for " -			       "selected %s-GHz band\n", -			       band_to_string(chan->band)); -			goto init_failure; -		} -	} -	if (prev_status >= B43_STAT_STARTED) { -		err = b43_wireless_core_start(up_dev); -		if (err) { -			b43err(wl, "Fatal: Could not start device for " -			       "selected %s-GHz band\n", -			       band_to_string(chan->band)); -			b43_wireless_core_exit(up_dev); -			goto init_failure; -		} -	} -	B43_WARN_ON(b43_status(up_dev) != prev_status); +	b43_upload_initvals_band(dev); -	wl->current_dev = up_dev; +	b43_phy_init(dev);  	return 0; -init_failure: -	/* Whoops, failed to init the new core. No core is operating now. */ -	wl->current_dev = NULL; -	return err;  }  /* Write the short and long frame retry limit values. */ @@ -3846,8 +3809,10 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)  	dev = wl->current_dev; +	b43_mac_suspend(dev); +  	/* Switch the band (if necessary). This might change the active core. */ -	err = b43_switch_band(wl, conf->chandef.chan); +	err = b43_switch_band(dev, conf->chandef.chan);  	if (err)  		goto out_unlock_mutex; @@ -3866,8 +3831,6 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)  	else  		phy->is_40mhz = false; -	b43_mac_suspend(dev); -  	if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS)  		b43_set_retry_limits(dev, conf->short_frame_max_tx_count,  					  conf->long_frame_max_tx_count); @@ -4577,8 +4540,12 @@ static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev)  	struct ssb_bus *bus;  	u32 tmp; +#ifdef CONFIG_B43_SSB  	if (dev->dev->bus_type != B43_BUS_SSB)  		return; +#else +	return; +#endif  	bus = dev->dev->sdev->bus; @@ -4636,9 +4603,6 @@ static void b43_wireless_core_exit(struct b43_wldev *dev)  	if (!dev || b43_status(dev) != B43_STAT_INITIALIZED)  		return; -	/* Unregister HW RNG driver */ -	b43_rng_exit(dev->wl); -  	b43_set_status(dev, B43_STAT_UNINIT);  	/* Stop the microcode PSM. */ @@ -4736,7 +4700,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)  	}  	if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)  		hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */ -#ifdef CONFIG_SSB_DRIVER_PCICORE +#if defined(CONFIG_B43_SSB) && defined(CONFIG_SSB_DRIVER_PCICORE)  	if (dev->dev->bus_type == B43_BUS_SSB &&  	    dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI &&  	    dev->dev->sdev->bus->pcicore.dev->id.revision <= 10) @@ -4795,9 +4759,6 @@ static int b43_wireless_core_init(struct b43_wldev *dev)  	b43_set_status(dev, B43_STAT_INITIALIZED); -	/* Register HW RNG driver */ -	b43_rng_init(dev->wl); -  out:  	return err; @@ -5130,10 +5091,82 @@ static void b43_wireless_core_detach(struct b43_wldev *dev)  	b43_phy_free(dev);  } +static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy, +				bool *have_5ghz_phy) +{ +	u16 dev_id = 0; + +#ifdef CONFIG_B43_BCMA +	if (dev->dev->bus_type == B43_BUS_BCMA && +	    dev->dev->bdev->bus->hosttype == BCMA_HOSTTYPE_PCI) +		dev_id = dev->dev->bdev->bus->host_pci->device; +#endif +#ifdef CONFIG_B43_SSB +	if (dev->dev->bus_type == B43_BUS_SSB && +	    dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI) +		dev_id = dev->dev->sdev->bus->host_pci->device; +#endif +	/* Override with SPROM value if available */ +	if (dev->dev->bus_sprom->dev_id) +		dev_id = dev->dev->bus_sprom->dev_id; + +	/* Note: below IDs can be "virtual" (not maching e.g. real PCI ID) */ +	switch (dev_id) { +	case 0x4324: /* BCM4306 */ +	case 0x4312: /* BCM4311 */ +	case 0x4319: /* BCM4318 */ +	case 0x4328: /* BCM4321 */ +	case 0x432b: /* BCM4322 */ +	case 0x4350: /* BCM43222 */ +	case 0x4353: /* BCM43224 */ +	case 0x0576: /* BCM43224 */ +	case 0x435f: /* BCM6362 */ +	case 0x4331: /* BCM4331 */ +	case 0x4359: /* BCM43228 */ +	case 0x43a0: /* BCM4360 */ +	case 0x43b1: /* BCM4352 */ +		/* Dual band devices */ +		*have_2ghz_phy = true; +		*have_5ghz_phy = true; +		return; +	case 0x4321: /* BCM4306 */ +	case 0x4313: /* BCM4311 */ +	case 0x431a: /* BCM4318 */ +	case 0x432a: /* BCM4321 */ +	case 0x432d: /* BCM4322 */ +	case 0x4352: /* BCM43222 */ +	case 0x4333: /* BCM4331 */ +	case 0x43a2: /* BCM4360 */ +	case 0x43b3: /* BCM4352 */ +		/* 5 GHz only devices */ +		*have_2ghz_phy = false; +		*have_5ghz_phy = true; +		return; +	} + +	/* As a fallback, try to guess using PHY type */ +	switch (dev->phy.type) { +	case B43_PHYTYPE_A: +		*have_2ghz_phy = false; +		*have_5ghz_phy = true; +		return; +	case B43_PHYTYPE_G: +	case B43_PHYTYPE_N: +	case B43_PHYTYPE_LP: +	case B43_PHYTYPE_HT: +	case B43_PHYTYPE_LCN: +		*have_2ghz_phy = true; +		*have_5ghz_phy = false; +		return; +	} + +	B43_WARN_ON(1); +} +  static int b43_wireless_core_attach(struct b43_wldev *dev)  {  	struct b43_wl *wl = dev->wl; -	struct pci_dev *pdev = NULL; +	struct b43_phy *phy = &dev->phy;  	int err;  	u32 tmp;  	bool have_2ghz_phy = false, have_5ghz_phy = false; @@ -5145,19 +5178,15 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)  	 * that in core_init(), too.  	 */ -#ifdef CONFIG_B43_SSB -	if (dev->dev->bus_type == B43_BUS_SSB && -	    dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI) -		pdev = dev->dev->sdev->bus->host_pci; -#endif -  	err = b43_bus_powerup(dev, 0);  	if (err) {  		b43err(wl, "Bus powerup failed\n");  		goto out;  	} -	/* Get the PHY type. */ +	phy->do_full_init = true; + +	/* Try to guess supported bands for the first init needs */  	switch (dev->dev->bus_type) {  #ifdef CONFIG_B43_BCMA  	case B43_BUS_BCMA: @@ -5179,51 +5208,32 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)  	}  	dev->phy.gmode = have_2ghz_phy; -	dev->phy.radio_on = true;  	b43_wireless_core_reset(dev, dev->phy.gmode); +	/* Get the PHY type. */  	err = b43_phy_versioning(dev);  	if (err)  		goto err_powerdown; -	/* Check if this device supports multiband. */ -	if (!pdev || -	    (pdev->device != 0x4312 && -	     pdev->device != 0x4319 && pdev->device != 0x4324)) { -		/* No multiband support. */ -		have_2ghz_phy = false; + +	/* Get real info about supported bands */ +	b43_supported_bands(dev, &have_2ghz_phy, &have_5ghz_phy); + +	/* We don't support 5 GHz on some PHYs yet */ +	switch (dev->phy.type) { +	case B43_PHYTYPE_A: +	case B43_PHYTYPE_G: +	case B43_PHYTYPE_N: +	case B43_PHYTYPE_LP: +	case B43_PHYTYPE_HT: +		b43warn(wl, "5 GHz band is unsupported on this PHY\n");  		have_5ghz_phy = false; -		switch (dev->phy.type) { -		case B43_PHYTYPE_A: -			have_5ghz_phy = true; -			break; -		case B43_PHYTYPE_LP: //FIXME not always! -#if 0 //FIXME enabling 5GHz causes a NULL pointer dereference -			have_5ghz_phy = 1; -#endif -		case B43_PHYTYPE_G: -		case B43_PHYTYPE_N: -		case B43_PHYTYPE_HT: -		case B43_PHYTYPE_LCN: -			have_2ghz_phy = true; -			break; -		default: -			B43_WARN_ON(1); -		}  	} -	if (dev->phy.type == B43_PHYTYPE_A) { -		/* FIXME */ -		b43err(wl, "IEEE 802.11a devices are unsupported\n"); + +	if (!have_2ghz_phy && !have_5ghz_phy) { +		b43err(wl, "b43 can't support any band on this device\n");  		err = -EOPNOTSUPP;  		goto err_powerdown;  	} -	if (1 /* disable A-PHY */) { -		/* FIXME: For now we disable the A-PHY on multi-PHY devices. */ -		if (dev->phy.type != B43_PHYTYPE_N && -		    dev->phy.type != B43_PHYTYPE_LP) { -			have_2ghz_phy = true; -			have_5ghz_phy = false; -		} -	}  	err = b43_phy_allocate(dev);  	if (err) @@ -5271,7 +5281,6 @@ static void b43_one_core_detach(struct b43_bus_dev *dev)  	b43_debugfs_remove_device(wldev);  	b43_wireless_core_detach(wldev);  	list_del(&wldev->list); -	wl->nr_devs--;  	b43_bus_set_wldev(dev, NULL);  	kfree(wldev);  } @@ -5296,8 +5305,6 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)  	if (err)  		goto err_kfree_wldev; -	list_add(&wldev->list, &wl->devlist); -	wl->nr_devs++;  	b43_bus_set_wldev(dev, wldev);  	b43_debugfs_add_device(wldev); @@ -5315,6 +5322,7 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)  	(pdev->subsystem_vendor == PCI_VENDOR_ID_##_subvendor) &&	\  	(pdev->subsystem_device == _subdevice)				) +#ifdef CONFIG_B43_SSB  static void b43_sprom_fixup(struct ssb_bus *bus)  {  	struct pci_dev *pdev; @@ -5346,6 +5354,7 @@ static void b43_wireless_exit(struct b43_bus_dev *dev, struct b43_wl *wl)  	ssb_set_devtypedata(dev->sdev, NULL);  	ieee80211_free_hw(hw);  } +#endif  static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)  { @@ -5387,7 +5396,6 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)  	wl->hw = hw;  	mutex_init(&wl->mutex);  	spin_lock_init(&wl->hardirq_lock); -	INIT_LIST_HEAD(&wl->devlist);  	INIT_WORK(&wl->beacon_update_trigger, b43_beacon_update_trigger_work);  	INIT_WORK(&wl->txpower_adjust_work, b43_phy_txpower_adjust_work);  	INIT_WORK(&wl->tx_work, b43_tx_work); @@ -5464,6 +5472,9 @@ static void b43_bcma_remove(struct bcma_device *core)  	b43_one_core_detach(wldev->dev); +	/* Unregister HW RNG driver */ +	b43_rng_exit(wl); +  	b43_leds_unregister(wl);  	ieee80211_free_hw(wl->hw); @@ -5484,39 +5495,42 @@ int b43_ssb_probe(struct ssb_device *sdev, const struct ssb_device_id *id)  	struct b43_bus_dev *dev;  	struct b43_wl *wl;  	int err; -	int first = 0;  	dev = b43_bus_dev_ssb_init(sdev);  	if (!dev)  		return -ENOMEM;  	wl = ssb_get_devtypedata(sdev); -	if (!wl) { -		/* Probing the first core. Must setup common struct b43_wl */ -		first = 1; -		b43_sprom_fixup(sdev->bus); -		wl = b43_wireless_init(dev); -		if (IS_ERR(wl)) { -			err = PTR_ERR(wl); -			goto out; -		} -		ssb_set_devtypedata(sdev, wl); -		B43_WARN_ON(ssb_get_devtypedata(sdev) != wl); +	if (wl) { +		b43err(NULL, "Dual-core devices are not supported\n"); +		err = -ENOTSUPP; +		goto err_ssb_kfree_dev;  	} + +	b43_sprom_fixup(sdev->bus); + +	wl = b43_wireless_init(dev); +	if (IS_ERR(wl)) { +		err = PTR_ERR(wl); +		goto err_ssb_kfree_dev; +	} +	ssb_set_devtypedata(sdev, wl); +	B43_WARN_ON(ssb_get_devtypedata(sdev) != wl); +  	err = b43_one_core_attach(dev, wl);  	if (err) -		goto err_wireless_exit; +		goto err_ssb_wireless_exit;  	/* setup and start work to load firmware */  	INIT_WORK(&wl->firmware_load, b43_request_firmware);  	schedule_work(&wl->firmware_load); -      out:  	return err; -      err_wireless_exit: -	if (first) -		b43_wireless_exit(dev, wl); +err_ssb_wireless_exit: +	b43_wireless_exit(dev, wl); +err_ssb_kfree_dev: +	kfree(dev);  	return err;  } @@ -5541,13 +5555,11 @@ static void b43_ssb_remove(struct ssb_device *sdev)  	b43_one_core_detach(dev); -	if (list_empty(&wl->devlist)) { -		b43_leds_unregister(wl); -		/* Last core on the chip unregistered. -		 * We can destroy common struct b43_wl. -		 */ -		b43_wireless_exit(dev, wl); -	} +	/* Unregister HW RNG driver */ +	b43_rng_exit(wl); + +	b43_leds_unregister(wl); +	b43_wireless_exit(dev, wl);  }  static struct ssb_driver b43_ssb_driver = { diff --git a/drivers/net/wireless/b43/main.h b/drivers/net/wireless/b43/main.h index abac25ee958..f476fc337d6 100644 --- a/drivers/net/wireless/b43/main.h +++ b/drivers/net/wireless/b43/main.h @@ -58,41 +58,6 @@ enum b43_verbosity {  #endif  }; - -/* Lightweight function to convert a frequency (in Mhz) to a channel number. */ -static inline u8 b43_freq_to_channel_5ghz(int freq) -{ -	return ((freq - 5000) / 5); -} -static inline u8 b43_freq_to_channel_2ghz(int freq) -{ -	u8 channel; - -	if (freq == 2484) -		channel = 14; -	else -		channel = (freq - 2407) / 5; - -	return channel; -} - -/* Lightweight function to convert a channel number to a frequency (in Mhz). */ -static inline int b43_channel_to_freq_5ghz(u8 channel) -{ -	return (5000 + (5 * channel)); -} -static inline int b43_channel_to_freq_2ghz(u8 channel) -{ -	int freq; - -	if (channel == 14) -		freq = 2484; -	else -		freq = 2407 + (5 * channel); - -	return freq; -} -  static inline int b43_is_cck_rate(int rate)  {  	return (rate == B43_CCK_RATE_1MB || diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index f01676ac481..08244b3b327 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c @@ -96,12 +96,16 @@ int b43_phy_init(struct b43_wldev *dev)  	phy->channel = ops->get_default_chan(dev); -	ops->software_rfkill(dev, false); +	phy->ops->switch_analog(dev, true); +	b43_software_rfkill(dev, false); +  	err = ops->init(dev);  	if (err) {  		b43err(dev->wl, "PHY init failed\n");  		goto err_block_rf;  	} +	phy->do_full_init = false; +  	/* Make sure to switch hardware and firmware (SHM) to  	 * the default channel. */  	err = b43_switch_channel(dev, ops->get_default_chan(dev)); @@ -113,10 +117,11 @@ int b43_phy_init(struct b43_wldev *dev)  	return 0;  err_phy_exit: +	phy->do_full_init = true;  	if (ops->exit)  		ops->exit(dev);  err_block_rf: -	ops->software_rfkill(dev, true); +	b43_software_rfkill(dev, true);  	return err;  } @@ -125,7 +130,8 @@ void b43_phy_exit(struct b43_wldev *dev)  {  	const struct b43_phy_operations *ops = dev->phy.ops; -	ops->software_rfkill(dev, true); +	b43_software_rfkill(dev, true); +	dev->phy.do_full_init = true;  	if (ops->exit)  		ops->exit(dev);  } @@ -133,9 +139,9 @@ void b43_phy_exit(struct b43_wldev *dev)  bool b43_has_hardware_pctl(struct b43_wldev *dev)  {  	if (!dev->phy.hardware_power_control) -		return 0; +		return false;  	if (!dev->phy.ops->supports_hwpctl) -		return 0; +		return false;  	return dev->phy.ops->supports_hwpctl(dev);  } @@ -312,6 +318,90 @@ void b43_phy_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set)  	}  } +void b43_phy_put_into_reset(struct b43_wldev *dev) +{ +	u32 tmp; + +	switch (dev->dev->bus_type) { +#ifdef CONFIG_B43_BCMA +	case B43_BUS_BCMA: +		tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL); +		tmp &= ~B43_BCMA_IOCTL_GMODE; +		tmp |= B43_BCMA_IOCTL_PHY_RESET; +		tmp |= BCMA_IOCTL_FGC; +		bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp); +		udelay(1); + +		tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL); +		tmp &= ~BCMA_IOCTL_FGC; +		bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp); +		udelay(1); +		break; +#endif +#ifdef CONFIG_B43_SSB +	case B43_BUS_SSB: +		tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW); +		tmp &= ~B43_TMSLOW_GMODE; +		tmp |= B43_TMSLOW_PHYRESET; +		tmp |= SSB_TMSLOW_FGC; +		ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp); +		usleep_range(1000, 2000); + +		tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW); +		tmp &= ~SSB_TMSLOW_FGC; +		ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp); +		usleep_range(1000, 2000); + +		break; +#endif +	} +} + +void b43_phy_take_out_of_reset(struct b43_wldev *dev) +{ +	u32 tmp; + +	switch (dev->dev->bus_type) { +#ifdef CONFIG_B43_BCMA +	case B43_BUS_BCMA: +		/* Unset reset bit (with forcing clock) */ +		tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL); +		tmp &= ~B43_BCMA_IOCTL_PHY_RESET; +		tmp &= ~B43_BCMA_IOCTL_PHY_CLKEN; +		tmp |= BCMA_IOCTL_FGC; +		bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp); +		udelay(1); + +		/* Do not force clock anymore */ +		tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL); +		tmp &= ~BCMA_IOCTL_FGC; +		tmp |= B43_BCMA_IOCTL_PHY_CLKEN; +		bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp); +		udelay(1); +		break; +#endif +#ifdef CONFIG_B43_SSB +	case B43_BUS_SSB: +		/* Unset reset bit (with forcing clock) */ +		tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW); +		tmp &= ~B43_TMSLOW_PHYRESET; +		tmp &= ~B43_TMSLOW_PHYCLKEN; +		tmp |= SSB_TMSLOW_FGC; +		ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp); +		ssb_read32(dev->dev->sdev, SSB_TMSLOW); /* flush */ +		usleep_range(1000, 2000); + +		tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW); +		tmp &= ~SSB_TMSLOW_FGC; +		tmp |= B43_TMSLOW_PHYCLKEN; +		ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp); +		ssb_read32(dev->dev->sdev, SSB_TMSLOW); /* flush */ +		usleep_range(1000, 2000); +		break; +#endif +	} +} +  int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel)  {  	struct b43_phy *phy = &(dev->phy); diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h index f1b99934987..4ad6240d9ff 100644 --- a/drivers/net/wireless/b43/phy_common.h +++ b/drivers/net/wireless/b43/phy_common.h @@ -231,9 +231,12 @@ struct b43_phy {  	/* HT info */  	bool is_40mhz; -	/* GMODE bit enabled? */ +	/* Is GMODE (2 GHz mode) bit enabled? */  	bool gmode; +	/* After power reset full init has to be performed */ +	bool do_full_init; +  	/* Analog Type */  	u8 analog;  	/* B43_PHYTYPE_ */ @@ -390,6 +393,9 @@ void b43_phy_lock(struct b43_wldev *dev);   */  void b43_phy_unlock(struct b43_wldev *dev); +void b43_phy_put_into_reset(struct b43_wldev *dev); +void b43_phy_take_out_of_reset(struct b43_wldev *dev); +  /**   * b43_switch_channel - Switch to another channel   */ diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c index 12f467b8d56..8f5c14bc10e 100644 --- a/drivers/net/wireless/b43/phy_g.c +++ b/drivers/net/wireless/b43/phy_g.c @@ -1587,6 +1587,7 @@ static void b43_phy_initb5(struct b43_wldev *dev)  	b43_write16(dev, 0x03E4, (b43_read16(dev, 0x03E4) & 0xFFC0) | 0x0004);  } +/* http://bcm-v4.sipsolutions.net/802.11/PHY/Init/B6 */  static void b43_phy_initb6(struct b43_wldev *dev)  {  	struct b43_phy *phy = &dev->phy; @@ -1670,7 +1671,7 @@ static void b43_phy_initb6(struct b43_wldev *dev)  		b43_radio_write16(dev, 0x50, 0x20);  	}  	if (phy->radio_rev <= 2) { -		b43_radio_write16(dev, 0x7C, 0x20); +		b43_radio_write16(dev, 0x50, 0x20);  		b43_radio_write16(dev, 0x5A, 0x70);  		b43_radio_write16(dev, 0x5B, 0x7B);  		b43_radio_write16(dev, 0x5C, 0xB0); @@ -1686,9 +1687,8 @@ static void b43_phy_initb6(struct b43_wldev *dev)  		b43_phy_write(dev, 0x2A, 0x8AC0);  	b43_phy_write(dev, 0x0038, 0x0668);  	b43_set_txpower_g(dev, &gphy->bbatt, &gphy->rfatt, gphy->tx_control); -	if (phy->radio_rev <= 5) { +	if (phy->radio_rev == 4 || phy->radio_rev == 5)  		b43_phy_maskset(dev, 0x5D, 0xFF80, 0x0003); -	}  	if (phy->radio_rev <= 2)  		b43_radio_write16(dev, 0x005D, 0x000D); diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 7c970d3ae35..86569f6a870 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c @@ -164,7 +164,8 @@ static void b43_nphy_rf_ctl_override_rev7(struct b43_wldev *dev, u16 field,  		}  		en_addr = en_addrs[override][i]; -		val_addr = (i == 0) ? e->val_addr_core0 : e->val_addr_core1; +		if (e) +			val_addr = (i == 0) ? e->val_addr_core0 : e->val_addr_core1;  		if (off) {  			b43_phy_mask(dev, en_addr, ~en_mask); @@ -256,6 +257,72 @@ static void b43_nphy_rf_ctl_override(struct b43_wldev *dev, u16 field,  	}  } +static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, +					       enum n_intc_override intc_override, +					       u16 value, u8 core_sel) +{ +	u16 reg, tmp, tmp2, val; +	int core; + +	for (core = 0; core < 2; core++) { +		if ((core_sel == 1 && core != 0) || +		    (core_sel == 2 && core != 1)) +			continue; + +		reg = (core == 0) ? B43_NPHY_RFCTL_INTC1 : B43_NPHY_RFCTL_INTC2; + +		switch (intc_override) { +		case N_INTC_OVERRIDE_OFF: +			b43_phy_write(dev, reg, 0); +			b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RESET2RX); +			break; +		case N_INTC_OVERRIDE_TRSW: +			b43_phy_maskset(dev, reg, ~0xC0, value << 6); +			b43_phy_set(dev, reg, 0x400); + +			b43_phy_mask(dev, 0x2ff, ~0xC000 & 0xFFFF); +			b43_phy_set(dev, 0x2ff, 0x2000); +			b43_phy_set(dev, 0x2ff, 0x0001); +			break; +		case N_INTC_OVERRIDE_PA: +			tmp = 0x0030; +			if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) +				val = value << 5; +			else +				val = value << 4; +			b43_phy_maskset(dev, reg, ~tmp, val); +			b43_phy_set(dev, reg, 0x1000); +			break; +		case N_INTC_OVERRIDE_EXT_LNA_PU: +			if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { +				tmp = 0x0001; +				tmp2 = 0x0004; +				val = value; +			} else { +				tmp = 0x0004; +				tmp2 = 0x0001; +				val = value << 2; +			} +			b43_phy_maskset(dev, reg, ~tmp, val); +			b43_phy_mask(dev, reg, ~tmp2); +			break; +		case N_INTC_OVERRIDE_EXT_LNA_GAIN: +			if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { +				tmp = 0x0002; +				tmp2 = 0x0008; +				val = value << 1; +			} else { +				tmp = 0x0008; +				tmp2 = 0x0002; +				val = value << 3; +			} +			b43_phy_maskset(dev, reg, ~tmp, val); +			b43_phy_mask(dev, reg, ~tmp2); +			break; +		} +	} +} +  /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlIntcOverride */  static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev,  					  enum n_intc_override intc_override, @@ -264,6 +331,12 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev,  	u8 i, j;  	u16 reg, tmp, val; +	if (dev->phy.rev >= 7) { +		b43_nphy_rf_ctl_intc_override_rev7(dev, intc_override, value, +						   core); +		return; +	} +  	B43_WARN_ON(dev->phy.rev < 3);  	for (i = 0; i < 2; i++) { @@ -418,7 +491,8 @@ static void b43_nphy_stay_in_carrier_search(struct b43_wldev *dev, bool enable)  		static const u16 clip[] = { 0xFFFF, 0xFFFF };  		if (nphy->deaf_count++ == 0) {  			nphy->classifier_state = b43_nphy_classifier(dev, 0, 0); -			b43_nphy_classifier(dev, 0x7, 0); +			b43_nphy_classifier(dev, 0x7, +					    B43_NPHY_CLASSCTL_WAITEDEN);  			b43_nphy_read_clip_detection(dev, nphy->clip_state);  			b43_nphy_write_clip_detection(dev, clip);  		} @@ -626,13 +700,11 @@ static void b43_radio_2057_init_post(struct b43_wldev *dev)  	b43_radio_mask(dev, R2057_RFPLL_MISC_CAL_RESETN, ~0x78);  	b43_radio_mask(dev, R2057_XTAL_CONFIG2, ~0x80); -	if (dev->phy.n->init_por) { +	if (dev->phy.do_full_init) {  		b43_radio_2057_rcal(dev);  		b43_radio_2057_rccal(dev);  	}  	b43_radio_mask(dev, R2057_RFPLL_MASTER, ~0x8); - -	dev->phy.n->init_por = false;  }  /* http://bcm-v4.sipsolutions.net/802.11/Radio/2057/Init */ @@ -733,9 +805,16 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,  	u16 bias, cbias;  	u16 pag_boost, padg_boost, pgag_boost, mixg_boost;  	u16 paa_boost, pada_boost, pgaa_boost, mixa_boost; +	bool is_pkg_fab_smic;  	B43_WARN_ON(dev->phy.rev < 3); +	is_pkg_fab_smic = +		((dev->dev->chip_id == BCMA_CHIP_ID_BCM43224 || +		  dev->dev->chip_id == BCMA_CHIP_ID_BCM43225 || +		  dev->dev->chip_id == BCMA_CHIP_ID_BCM43421) && +		 dev->dev->chip_pkg == BCMA_PKG_ID_BCM43224_FAB_SMIC); +  	b43_chantab_radio_2056_upload(dev, e);  	b2056_upload_syn_pll_cp2(dev, band == IEEE80211_BAND_5GHZ); @@ -743,7 +822,8 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,  	    b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {  		b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F);  		b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F); -		if (dev->dev->chip_id == 0x4716) { +		if (dev->dev->chip_id == BCMA_CHIP_ID_BCM4716 || +		    dev->dev->chip_id == BCMA_CHIP_ID_BCM47162) {  			b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x14);  			b43_radio_write(dev, B2056_SYN_PLL_CP2, 0);  		} else { @@ -751,6 +831,13 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,  			b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x14);  		}  	} +	if (sprom->boardflags2_hi & B43_BFH2_GPLL_WAR2 && +	    b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { +		b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1f); +		b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1f); +		b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x0b); +		b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x20); +	}  	if (sprom->boardflags2_lo & B43_BFL2_APLL_WAR &&  	    b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {  		b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F); @@ -766,7 +853,8 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,  				b43_radio_write(dev,  					offset | B2056_TX_PADG_IDAC, 0xcc); -				if (dev->dev->chip_id == 0x4716) { +				if (dev->dev->chip_id == BCMA_CHIP_ID_BCM4716 || +				    dev->dev->chip_id == BCMA_CHIP_ID_BCM47162) {  					bias = 0x40;  					cbias = 0x45;  					pag_boost = 0x5; @@ -775,6 +863,10 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,  				} else {  					bias = 0x25;  					cbias = 0x20; +					if (is_pkg_fab_smic) { +						bias = 0x2a; +						cbias = 0x38; +					}  					pag_boost = 0x4;  					pgag_boost = 0x03;  					mixg_boost = 0x65; @@ -843,6 +935,8 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,  			mixa_boost = 0xF;  		} +		cbias = is_pkg_fab_smic ? 0x35 : 0x30; +  		for (i = 0; i < 2; i++) {  			offset = i ? B2056_TX1 : B2056_TX0; @@ -861,11 +955,11 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,  			b43_radio_write(dev,  				offset | B2056_TX_PADA_CASCBIAS, 0x03);  			b43_radio_write(dev, -				offset | B2056_TX_INTPAA_IAUX_STAT, 0x50); +				offset | B2056_TX_INTPAA_IAUX_STAT, 0x30);  			b43_radio_write(dev, -				offset | B2056_TX_INTPAA_IMAIN_STAT, 0x50); +				offset | B2056_TX_INTPAA_IMAIN_STAT, 0x30);  			b43_radio_write(dev, -				offset | B2056_TX_INTPAA_CASCBIAS, 0x30); +				offset | B2056_TX_INTPAA_CASCBIAS, cbias);  		}  	} @@ -932,7 +1026,7 @@ static void b43_radio_init2056_post(struct b43_wldev *dev)  	b43_radio_mask(dev, B2056_SYN_COM_RESET, ~0x2);  	b43_radio_mask(dev, B2056_SYN_PLL_MAST2, ~0xFC);  	b43_radio_mask(dev, B2056_SYN_RCCAL_CTRL0, ~0x1); -	if (dev->phy.n->init_por) +	if (dev->phy.do_full_init)  		b43_radio_2056_rcal(dev);  } @@ -945,8 +1039,6 @@ static void b43_radio_init2056(struct b43_wldev *dev)  	b43_radio_init2056_pre(dev);  	b2056_upload_inittabs(dev, 0, 0);  	b43_radio_init2056_post(dev); - -	dev->phy.n->init_por = false;  }  /************************************************** @@ -1163,23 +1255,20 @@ static void b43_nphy_run_samples(struct b43_wldev *dev, u16 samps, u16 loops,  	u16 seq_mode;  	u32 tmp; -	if (nphy->hang_avoid) -		b43_nphy_stay_in_carrier_search(dev, true); +	b43_nphy_stay_in_carrier_search(dev, true);  	if ((nphy->bb_mult_save & 0x80000000) == 0) {  		tmp = b43_ntab_read(dev, B43_NTAB16(15, 87));  		nphy->bb_mult_save = (tmp & 0xFFFF) | 0x80000000;  	} +	/* TODO: add modify_bbmult argument */  	if (!dev->phy.is_40mhz)  		tmp = 0x6464;  	else  		tmp = 0x4747;  	b43_ntab_write(dev, B43_NTAB16(15, 87), tmp); -	if (nphy->hang_avoid) -		b43_nphy_stay_in_carrier_search(dev, false); -  	b43_phy_write(dev, B43_NPHY_SAMP_DEPCNT, (samps - 1));  	if (loops != 0xFFFF) @@ -1212,6 +1301,8 @@ static void b43_nphy_run_samples(struct b43_wldev *dev, u16 samps, u16 loops,  		b43err(dev->wl, "run samples timeout\n");  	b43_phy_write(dev, B43_NPHY_RFSEQMODE, seq_mode); + +	b43_nphy_stay_in_carrier_search(dev, false);  }  /************************************************** @@ -1587,8 +1678,8 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)  	struct b43_phy_n *nphy = dev->phy.n;  	u16 saved_regs_phy_rfctl[2]; -	u16 saved_regs_phy[13]; -	u16 regs_to_store[] = { +	u16 saved_regs_phy[22]; +	u16 regs_to_store_rev3[] = {  		B43_NPHY_AFECTL_OVER1, B43_NPHY_AFECTL_OVER,  		B43_NPHY_AFECTL_C1, B43_NPHY_AFECTL_C2,  		B43_NPHY_TXF_40CO_B1S1, B43_NPHY_RFCTL_OVER, @@ -1597,6 +1688,20 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)  		B43_NPHY_RFCTL_LUT_TRSW_UP1, B43_NPHY_RFCTL_LUT_TRSW_UP2,  		B43_NPHY_RFCTL_RSSIO1, B43_NPHY_RFCTL_RSSIO2  	}; +	u16 regs_to_store_rev7[] = { +		B43_NPHY_AFECTL_OVER1, B43_NPHY_AFECTL_OVER, +		B43_NPHY_AFECTL_C1, B43_NPHY_AFECTL_C2, +		B43_NPHY_TXF_40CO_B1S1, B43_NPHY_RFCTL_OVER, +		0x342, 0x343, 0x346, 0x347, +		0x2ff, +		B43_NPHY_TXF_40CO_B1S0, B43_NPHY_TXF_40CO_B32S1, +		B43_NPHY_RFCTL_CMD, +		B43_NPHY_RFCTL_LUT_TRSW_UP1, B43_NPHY_RFCTL_LUT_TRSW_UP2, +		0x340, 0x341, 0x344, 0x345, +		B43_NPHY_RFCTL_RSSIO1, B43_NPHY_RFCTL_RSSIO2 +	}; +	u16 *regs_to_store; +	int regs_amount;  	u16 class; @@ -1616,6 +1721,15 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)  	u8 rx_core_state;  	int core, i, j, vcm; +	if (dev->phy.rev >= 7) { +		regs_to_store = regs_to_store_rev7; +		regs_amount = ARRAY_SIZE(regs_to_store_rev7); +	} else { +		regs_to_store = regs_to_store_rev3; +		regs_amount = ARRAY_SIZE(regs_to_store_rev3); +	} +	BUG_ON(regs_amount > ARRAY_SIZE(saved_regs_phy)); +  	class = b43_nphy_classifier(dev, 0, 0);  	b43_nphy_classifier(dev, 7, 4);  	b43_nphy_read_clip_detection(dev, clip_state); @@ -1623,22 +1737,29 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)  	saved_regs_phy_rfctl[0] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC1);  	saved_regs_phy_rfctl[1] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC2); -	for (i = 0; i < ARRAY_SIZE(regs_to_store); i++) +	for (i = 0; i < regs_amount; i++)  		saved_regs_phy[i] = b43_phy_read(dev, regs_to_store[i]);  	b43_nphy_rf_ctl_intc_override(dev, N_INTC_OVERRIDE_OFF, 0, 7);  	b43_nphy_rf_ctl_intc_override(dev, N_INTC_OVERRIDE_TRSW, 1, 7); -	b43_nphy_rf_ctl_override(dev, 0x1, 0, 0, false); -	b43_nphy_rf_ctl_override(dev, 0x2, 1, 0, false); -	b43_nphy_rf_ctl_override(dev, 0x80, 1, 0, false); -	b43_nphy_rf_ctl_override(dev, 0x40, 1, 0, false); - -	if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { -		b43_nphy_rf_ctl_override(dev, 0x20, 0, 0, false); -		b43_nphy_rf_ctl_override(dev, 0x10, 1, 0, false); + +	if (dev->phy.rev >= 7) { +		/* TODO */ +		if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { +		} else { +		}  	} else { -		b43_nphy_rf_ctl_override(dev, 0x10, 0, 0, false); -		b43_nphy_rf_ctl_override(dev, 0x20, 1, 0, false); +		b43_nphy_rf_ctl_override(dev, 0x1, 0, 0, false); +		b43_nphy_rf_ctl_override(dev, 0x2, 1, 0, false); +		b43_nphy_rf_ctl_override(dev, 0x80, 1, 0, false); +		b43_nphy_rf_ctl_override(dev, 0x40, 1, 0, false); +		if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { +			b43_nphy_rf_ctl_override(dev, 0x20, 0, 0, false); +			b43_nphy_rf_ctl_override(dev, 0x10, 1, 0, false); +		} else { +			b43_nphy_rf_ctl_override(dev, 0x10, 0, 0, false); +			b43_nphy_rf_ctl_override(dev, 0x20, 1, 0, false); +		}  	}  	rx_core_state = b43_nphy_get_rx_core_state(dev); @@ -1653,8 +1774,11 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)  		/* Grab RSSI results for every possible VCM */  		for (vcm = 0; vcm < 8; vcm++) { -			b43_radio_maskset(dev, r | B2056_RX_RSSI_MISC, 0xE3, -					vcm << 2); +			if (dev->phy.rev >= 7) +				; +			else +				b43_radio_maskset(dev, r | B2056_RX_RSSI_MISC, +						  0xE3, vcm << 2);  			b43_nphy_poll_rssi(dev, N_RSSI_NB, results[vcm], 8);  		} @@ -1681,8 +1805,11 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)  		}  		/* Select the best VCM */ -		b43_radio_maskset(dev, r | B2056_RX_RSSI_MISC, 0xE3, -				  vcm_final << 2); +		if (dev->phy.rev >= 7) +			; +		else +			b43_radio_maskset(dev, r | B2056_RX_RSSI_MISC, +					  0xE3, vcm_final << 2);  		for (i = 0; i < 4; i++) {  			if (core != i / 2) @@ -1735,9 +1862,9 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)  	b43_phy_set(dev, B43_NPHY_RFCTL_OVER, 0x1);  	b43_phy_set(dev, B43_NPHY_RFCTL_CMD, B43_NPHY_RFCTL_CMD_RXTX); -	b43_phy_mask(dev, B43_NPHY_TXF_40CO_B1S1, ~0x1); +	b43_phy_mask(dev, B43_NPHY_RFCTL_OVER, ~0x1); -	for (i = 0; i < ARRAY_SIZE(regs_to_store); i++) +	for (i = 0; i < regs_amount; i++)  		b43_phy_write(dev, regs_to_store[i], saved_regs_phy[i]);  	/* Store for future configuration */ @@ -2493,8 +2620,8 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)  	struct ssb_sprom *sprom = dev->dev->bus_sprom;  	/* TX to RX */ -	u8 tx2rx_events[8] = { 0x4, 0x3, 0x6, 0x5, 0x2, 0x1, 0x8, 0x1F }; -	u8 tx2rx_delays[8] = { 8, 4, 2, 2, 4, 4, 6, 1 }; +	u8 tx2rx_events[7] = { 0x4, 0x3, 0x5, 0x2, 0x1, 0x8, 0x1F }; +	u8 tx2rx_delays[7] = { 8, 4, 4, 4, 4, 6, 1 };  	/* RX to TX */  	u8 rx2tx_events_ipa[9] = { 0x0, 0x1, 0x2, 0x8, 0x5, 0x6, 0xF, 0x3,  					0x1F }; @@ -2502,6 +2629,23 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)  	u8 rx2tx_events[9] = { 0x0, 0x1, 0x2, 0x8, 0x5, 0x6, 0x3, 0x4, 0x1F };  	u8 rx2tx_delays[9] = { 8, 6, 6, 4, 4, 18, 42, 1, 1 }; +	u16 vmids[5][4] = { +		{ 0xa2, 0xb4, 0xb4, 0x89, }, /* 0 */ +		{ 0xb4, 0xb4, 0xb4, 0x24, }, /* 1 */ +		{ 0xa2, 0xb4, 0xb4, 0x74, }, /* 2 */ +		{ 0xa2, 0xb4, 0xb4, 0x270, }, /* 3 */ +		{ 0xa2, 0xb4, 0xb4, 0x00, }, /* 4 and 5 */ +	}; +	u16 gains[5][4] = { +		{ 0x02, 0x02, 0x02, 0x00, }, /* 0 */ +		{ 0x02, 0x02, 0x02, 0x02, }, /* 1 */ +		{ 0x02, 0x02, 0x02, 0x04, }, /* 2 */ +		{ 0x02, 0x02, 0x02, 0x00, }, /* 3 */ +		{ 0x02, 0x02, 0x02, 0x00, }, /* 4 and 5 */ +	}; +	u16 *vmid, *gain; + +	u8 pdet_range;  	u16 tmp16;  	u32 tmp32; @@ -2560,7 +2704,71 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)  	b43_ntab_write(dev, B43_NTAB16(8, 0), 2);  	b43_ntab_write(dev, B43_NTAB16(8, 16), 2); -	/* TODO */ +	if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) +		pdet_range = sprom->fem.ghz2.pdet_range; +	else +		pdet_range = sprom->fem.ghz5.pdet_range; +	vmid = vmids[min_t(u16, pdet_range, 4)]; +	gain = gains[min_t(u16, pdet_range, 4)]; +	switch (pdet_range) { +	case 3: +		if (!(dev->phy.rev >= 4 && +		      b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)) +			break; +		/* FALL THROUGH */ +	case 0: +	case 1: +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x08), 4, vmid); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x18), 4, vmid); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x0c), 4, gain); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x1c), 4, gain); +		break; +	case 2: +		if (dev->phy.rev >= 6) { +			if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) +				vmid[3] = 0x94; +			else +				vmid[3] = 0x8e; +			gain[3] = 3; +		} else if (dev->phy.rev == 5) { +			vmid[3] = 0x84; +			gain[3] = 2; +		} +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x08), 4, vmid); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x18), 4, vmid); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x0c), 4, gain); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x1c), 4, gain); +		break; +	case 4: +	case 5: +		if (b43_current_band(dev->wl) != IEEE80211_BAND_2GHZ) { +			if (pdet_range == 4) { +				vmid[3] = 0x8e; +				tmp16 = 0x96; +				gain[3] = 0x2; +			} else { +				vmid[3] = 0x89; +				tmp16 = 0x89; +				gain[3] = 0; +			} +		} else { +			if (pdet_range == 4) { +				vmid[3] = 0x89; +				tmp16 = 0x8b; +				gain[3] = 0x2; +			} else { +				vmid[3] = 0x74; +				tmp16 = 0x70; +				gain[3] = 0; +			} +		} +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x08), 4, vmid); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x0c), 4, gain); +		vmid[3] = tmp16; +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x18), 4, vmid); +		b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x1c), 4, gain); +		break; +	}  	b43_radio_write(dev, B2056_RX0 | B2056_RX_MIXA_MAST_BIAS, 0x00);  	b43_radio_write(dev, B2056_RX1 | B2056_RX_MIXA_MAST_BIAS, 0x00); @@ -2599,7 +2807,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)  	/* Dropped probably-always-true condition */  	b43_phy_write(dev, B43_NPHY_ED_CRS40ASSERTTHRESH0, 0x03eb);  	b43_phy_write(dev, B43_NPHY_ED_CRS40ASSERTTHRESH1, 0x03eb); -	b43_phy_write(dev, B43_NPHY_ED_CRS40DEASSERTTHRESH1, 0x0341); +	b43_phy_write(dev, B43_NPHY_ED_CRS40DEASSERTTHRESH0, 0x0341);  	b43_phy_write(dev, B43_NPHY_ED_CRS40DEASSERTTHRESH1, 0x0341);  	b43_phy_write(dev, B43_NPHY_ED_CRS20LASSERTTHRESH0, 0x042b);  	b43_phy_write(dev, B43_NPHY_ED_CRS20LASSERTTHRESH1, 0x042b); @@ -3210,6 +3418,20 @@ static void b43_nphy_tx_prepare_adjusted_power_table(struct b43_wldev *dev)  	u8 idx, delta;  	u8 i, stf_mode; +	/* Array adj_pwr_tbl corresponds to the hardware table. It consists of +	 * 21 groups, each containing 4 entries. +	 * +	 * First group has entries for CCK modulation. +	 * The rest of groups has 1 entry per modulation (SISO, CDD, STBC, SDM). +	 * +	 * Group 0 is for CCK +	 * Groups 1..4 use BPSK (group per coding rate) +	 * Groups 5..8 use QPSK (group per coding rate) +	 * Groups 9..12 use 16-QAM (group per coding rate) +	 * Groups 13..16 use 64-QAM (group per coding rate) +	 * Groups 17..20 are unknown +	 */ +  	for (i = 0; i < 4; i++)  		nphy->adj_pwr_tbl[i] = nphy->tx_power_offset[i]; @@ -3408,10 +3630,8 @@ static void b43_nphy_tx_power_ctl_setup(struct b43_wldev *dev)  	}  	b43_nphy_tx_prepare_adjusted_power_table(dev); -	/*  	b43_ntab_write_bulk(dev, B43_NTAB16(26, 64), 84, nphy->adj_pwr_tbl);  	b43_ntab_write_bulk(dev, B43_NTAB16(27, 64), 84, nphy->adj_pwr_tbl); -	*/  	if (nphy->hang_avoid)  		b43_nphy_stay_in_carrier_search(dev, false); @@ -5123,7 +5343,7 @@ static int b43_phy_initn(struct b43_wldev *dev)  	b43_phy_write(dev, B43_NPHY_TXMACIF_HOLDOFF, 0x0015);  	b43_phy_write(dev, B43_NPHY_TXMACDELAY, 0x0320);  	if (phy->rev >= 3 && phy->rev <= 6) -		b43_phy_write(dev, B43_NPHY_PLOAD_CSENSE_EXTLEN, 0x0014); +		b43_phy_write(dev, B43_NPHY_PLOAD_CSENSE_EXTLEN, 0x0032);  	b43_nphy_tx_lp_fbw(dev);  	if (phy->rev >= 3)  		b43_nphy_spur_workaround(dev); @@ -5175,22 +5395,22 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev,  	int ch = new_channel->hw_value;  	u16 old_band_5ghz; -	u32 tmp32; +	u16 tmp16;  	old_band_5ghz =  		b43_phy_read(dev, B43_NPHY_BANDCTL) & B43_NPHY_BANDCTL_5GHZ;  	if (new_channel->band == IEEE80211_BAND_5GHZ && !old_band_5ghz) { -		tmp32 = b43_read32(dev, B43_MMIO_PSM_PHY_HDR); -		b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32 | 4); +		tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); +		b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4);  		b43_phy_set(dev, B43_PHY_B_BBCFG, 0xC000); -		b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32); +		b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16);  		b43_phy_set(dev, B43_NPHY_BANDCTL, B43_NPHY_BANDCTL_5GHZ);  	} else if (new_channel->band == IEEE80211_BAND_2GHZ && old_band_5ghz) {  		b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); -		tmp32 = b43_read32(dev, B43_MMIO_PSM_PHY_HDR); -		b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32 | 4); +		tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); +		b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4);  		b43_phy_mask(dev, B43_PHY_B_BBCFG, 0x3FFF); -		b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32); +		b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16);  	}  	b43_chantab_phy_upload(dev, e); @@ -5337,7 +5557,6 @@ static void b43_nphy_op_prepare_structs(struct b43_wldev *dev)  	nphy->hang_avoid = (phy->rev == 3 || phy->rev == 4);  	nphy->spur_avoid = (phy->rev >= 3) ?  				B43_SPUR_AVOID_AUTO : B43_SPUR_AVOID_DISABLE; -	nphy->init_por = true;  	nphy->gain_boost = true; /* this way we follow wl, assume it is true */  	nphy->txrx_chain = 2; /* sth different than 0 and 1 for now */  	nphy->phyrxchain = 3; /* to avoid b43_nphy_set_rx_core_state like wl */ @@ -5378,8 +5597,6 @@ static void b43_nphy_op_prepare_structs(struct b43_wldev *dev)  		nphy->ipa2g_on = sprom->fem.ghz2.extpa_gain == 2;  		nphy->ipa5g_on = sprom->fem.ghz5.extpa_gain == 2;  	} - -	nphy->init_por = true;  }  static void b43_nphy_op_free(struct b43_wldev *dev) @@ -5440,8 +5657,11 @@ static u16 b43_nphy_op_radio_read(struct b43_wldev *dev, u16 reg)  {  	/* Register 1 is a 32-bit register. */  	B43_WARN_ON(reg == 1); -	/* N-PHY needs 0x100 for read access */ -	reg |= 0x100; + +	if (dev->phy.rev >= 7) +		reg |= 0x200; /* Radio 0x2057 */ +	else +		reg |= 0x100;  	b43_write16(dev, B43_MMIO_RADIO_CONTROL, reg);  	return b43_read16(dev, B43_MMIO_RADIO_DATA_LOW); @@ -5487,10 +5707,12 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,  		}  	} else {  		if (dev->phy.rev >= 7) { -			b43_radio_2057_init(dev); +			if (!dev->phy.radio_on) +				b43_radio_2057_init(dev);  			b43_switch_channel(dev, dev->phy.channel);  		} else if (dev->phy.rev >= 3) { -			b43_radio_init2056(dev); +			if (!dev->phy.radio_on) +				b43_radio_init2056(dev);  			b43_switch_channel(dev, dev->phy.channel);  		} else {  			b43_radio_init2055(dev); diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h index 9a5b6bc27d2..ecfbf66dbc3 100644 --- a/drivers/net/wireless/b43/phy_n.h +++ b/drivers/net/wireless/b43/phy_n.h @@ -931,7 +931,6 @@ struct b43_phy_n {  	u16 papd_epsilon_offset[2];  	s32 preamble_override;  	u32 bb_mult_save; -	bool init_por;  	bool gain_boost;  	bool elna_gain_config; diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c index a73ff8c9deb..a4ff5e2a42b 100644 --- a/drivers/net/wireless/b43/pio.c +++ b/drivers/net/wireless/b43/pio.c @@ -637,7 +637,7 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)  		ctl = b43_piorx_read32(q, B43_PIO8_RXCTL);  		if (!(ctl & B43_PIO8_RXCTL_FRAMERDY)) -			return 0; +			return false;  		b43_piorx_write32(q, B43_PIO8_RXCTL,  				  B43_PIO8_RXCTL_FRAMERDY);  		for (i = 0; i < 10; i++) { @@ -651,7 +651,7 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)  		ctl = b43_piorx_read16(q, B43_PIO_RXCTL);  		if (!(ctl & B43_PIO_RXCTL_FRAMERDY)) -			return 0; +			return false;  		b43_piorx_write16(q, B43_PIO_RXCTL,  				  B43_PIO_RXCTL_FRAMERDY);  		for (i = 0; i < 10; i++) { @@ -662,7 +662,7 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)  		}  	}  	b43dbg(q->dev->wl, "PIO RX timed out\n"); -	return 1; +	return true;  data_ready:  	/* Get the preamble (RX header) */ @@ -759,7 +759,7 @@ data_ready:  	b43_rx(q->dev, skb, rxhdr); -	return 1; +	return true;  rx_error:  	if (err_msg) @@ -769,7 +769,7 @@ rx_error:  	else  		b43_piorx_write16(q, B43_PIO_RXCTL, B43_PIO_RXCTL_DATARDY); -	return 1; +	return true;  }  void b43_pio_rx(struct b43_pio_rxqueue *q) diff --git a/drivers/net/wireless/b43/radio_2056.c b/drivers/net/wireless/b43/radio_2056.c index b4fd9345d67..2ce25607c60 100644 --- a/drivers/net/wireless/b43/radio_2056.c +++ b/drivers/net/wireless/b43/radio_2056.c @@ -48,7 +48,7 @@ struct b2056_inittabs_pts {  	unsigned int rx_length;  }; -static const struct b2056_inittab_entry b2056_inittab_rev3_syn[] = { +static const struct b2056_inittab_entry b2056_inittab_phy_rev3_syn[] = {  	[B2056_SYN_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -232,7 +232,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev3_syn[] = {  	[B2056_SYN_LOGEN_TX_CMOS_VALID]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev3_tx[] = { +static const struct b2056_inittab_entry b2056_inittab_phy_rev3_tx[] = {  	[B2056_TX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -380,7 +380,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev3_tx[] = {  	[B2056_TX_STATUS_TXLPF_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev3_rx[] = { +static const struct b2056_inittab_entry b2056_inittab_phy_rev3_rx[] = {  	[B2056_RX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -530,7 +530,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev3_rx[] = {  	[B2056_RX_STATUS_HPC_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev4_syn[] = { +static const struct b2056_inittab_entry b2056_inittab_phy_rev4_syn[] = {  	[B2056_SYN_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -714,7 +714,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev4_syn[] = {  	[B2056_SYN_LOGEN_TX_CMOS_VALID]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev4_tx[] = { +static const struct b2056_inittab_entry b2056_inittab_phy_rev4_tx[] = {  	[B2056_TX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -862,7 +862,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev4_tx[] = {  	[B2056_TX_STATUS_TXLPF_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev4_rx[] = { +static const struct b2056_inittab_entry b2056_inittab_phy_rev4_rx[] = {  	[B2056_RX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -1012,7 +1012,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev4_rx[] = {  	[B2056_RX_STATUS_HPC_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev5_syn[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev5_syn[] = {  	[B2056_SYN_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -1196,7 +1196,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev5_syn[] = {  	[B2056_SYN_LOGEN_TX_CMOS_VALID]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev5_tx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev5_tx[] = {  	[B2056_TX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -1352,7 +1352,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev5_tx[] = {  	[B2056_TX_GMBB_IDAC7]		= { .ghz5 = 0x0075, .ghz2 = 0x0075, UPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev5_rx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev5_rx[] = {  	[B2056_RX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -1502,7 +1502,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev5_rx[] = {  	[B2056_RX_STATUS_HPC_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev6_syn[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev6_syn[] = {  	[B2056_SYN_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -1686,7 +1686,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev6_syn[] = {  	[B2056_SYN_LOGEN_TX_CMOS_VALID]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev6_tx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev6_tx[] = {  	[B2056_TX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -1842,7 +1842,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev6_tx[] = {  	[B2056_TX_GMBB_IDAC7]		= { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev6_rx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev6_rx[] = {  	[B2056_RX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -1992,7 +1992,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev6_rx[] = {  	[B2056_RX_STATUS_HPC_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev7_syn[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev7_9_syn[] = {  	[B2056_SYN_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -2176,7 +2176,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev7_syn[] = {  	[B2056_SYN_LOGEN_TX_CMOS_VALID]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev7_tx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev7_9_tx[] = {  	[B2056_TX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -2332,7 +2332,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev7_tx[] = {  	[B2056_TX_GMBB_IDAC7]		= { .ghz5 = 0x0075, .ghz2 = 0x0075, UPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev7_rx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev7_9_rx[] = {  	[B2056_RX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -2482,7 +2482,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev7_rx[] = {  	[B2056_RX_STATUS_HPC_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev8_syn[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev8_syn[] = {  	[B2056_SYN_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_SYN_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -2666,7 +2666,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev8_syn[] = {  	[B2056_SYN_LOGEN_TX_CMOS_VALID]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev8_tx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev8_tx[] = {  	[B2056_TX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_TX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -2822,7 +2822,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev8_tx[] = {  	[B2056_TX_GMBB_IDAC7]		= { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, },  }; -static const struct b2056_inittab_entry b2056_inittab_rev8_rx[] = { +static const struct b2056_inittab_entry b2056_inittab_radio_rev8_rx[] = {  	[B2056_RX_RESERVED_ADDR2]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR3]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  	[B2056_RX_RESERVED_ADDR4]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, @@ -2972,24 +2972,69 @@ static const struct b2056_inittab_entry b2056_inittab_rev8_rx[] = {  	[B2056_RX_STATUS_HPC_RC]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },  }; -#define INITTABSPTS(prefix) \ -	.syn		= prefix##_syn,			\ -	.syn_length	= ARRAY_SIZE(prefix##_syn),	\ -	.tx		= prefix##_tx,			\ -	.tx_length	= ARRAY_SIZE(prefix##_tx),	\ -	.rx		= prefix##_rx,			\ -	.rx_length	= ARRAY_SIZE(prefix##_rx) +static const struct b2056_inittab_entry b2056_inittab_radio_rev11_syn[] = { +	[B2056_SYN_PLL_PFD]		= { .ghz5 = 0x0006, .ghz2 = 0x0006, UPLOAD, }, +	[B2056_SYN_PLL_CP2]		= { .ghz5 = 0x003f, .ghz2 = 0x003f, UPLOAD, }, +	[B2056_SYN_PLL_LOOPFILTER1]	= { .ghz5 = 0x0006, .ghz2 = 0x0006, UPLOAD, }, +	[B2056_SYN_PLL_LOOPFILTER2]	= { .ghz5 = 0x0006, .ghz2 = 0x0006, UPLOAD, }, +	[B2056_SYN_PLL_LOOPFILTER4]	= { .ghz5 = 0x002b, .ghz2 = 0x002b, UPLOAD, }, +	[B2056_SYN_PLL_VCO2]		= { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, }, +	[B2056_SYN_PLL_VCOCAL12]	= { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, +	[B2056_SYN_LOGENBUF2]		= { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, }, +}; -static const struct b2056_inittabs_pts b2056_inittabs[] = { -	[3] = { INITTABSPTS(b2056_inittab_rev3) }, -	[4] = { INITTABSPTS(b2056_inittab_rev4) }, -	[5] = { INITTABSPTS(b2056_inittab_rev5) }, -	[6] = { INITTABSPTS(b2056_inittab_rev6) }, -	[7] = { INITTABSPTS(b2056_inittab_rev7) }, -	[8] = { INITTABSPTS(b2056_inittab_rev8) }, -	[9] = { INITTABSPTS(b2056_inittab_rev7) }, +static const struct b2056_inittab_entry b2056_inittab_radio_rev11_tx[] = { +	[B2056_TX_PA_SPARE2]		= { .ghz5 = 0x00ee, .ghz2 = 0x00ee, UPLOAD, }, +	[B2056_TX_INTPAA_IAUX_STAT]	= { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, +	[B2056_TX_INTPAA_IMAIN_STAT]	= { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, +	[B2056_TX_INTPAA_PASLOPE]	= { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, +	[B2056_TX_INTPAG_PASLOPE]	= { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, +	[B2056_TX_PADA_IDAC]		= { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, +	[B2056_TX_PADA_SLOPE]		= { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, +	[B2056_TX_PADG_SLOPE]		= { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, +	[B2056_TX_PGAA_IDAC]		= { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, +	[B2056_TX_PGAA_SLOPE]		= { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, +	[B2056_TX_PGAG_SLOPE]		= { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, +	[B2056_TX_GMBB_IDAC]		= { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, +	[B2056_TX_TXSPARE1]		= { .ghz5 = 0x0030, .ghz2 = 0x0030, UPLOAD, }, +}; + +static const struct b2056_inittab_entry b2056_inittab_radio_rev11_rx[] = { +	[B2056_RX_BIASPOLE_LNAA1_IDAC]	= { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, +	[B2056_RX_LNAA2_IDAC]		= { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, +	[B2056_RX_BIASPOLE_LNAG1_IDAC]	= { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, +	[B2056_RX_LNAG2_IDAC]		= { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, +	[B2056_RX_MIXA_VCM]		= { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, +	[B2056_RX_MIXA_LOB_BIAS]	= { .ghz5 = 0x0088, .ghz2 = 0x0088, UPLOAD, }, +	[B2056_RX_MIXA_BIAS_AUX]	= { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, +	[B2056_RX_MIXG_VCM]		= { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, +	[B2056_RX_TIA_IOPAMP]		= { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, +	[B2056_RX_TIA_QOPAMP]		= { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, +	[B2056_RX_TIA_IMISC]		= { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, +	[B2056_RX_TIA_QMISC]		= { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, +	[B2056_RX_RXLPF_OUTVCM]		= { .ghz5 = 0x0004, .ghz2 = 0x0004, UPLOAD, }, +	[B2056_RX_VGA_BIAS_DCCANCEL]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, +	[B2056_RX_RXSPARE3]		= { .ghz5 = 0x0005, .ghz2 = 0x0005, UPLOAD, },  }; +#define INITTABSPTS(prefix) \ +	static const struct b2056_inittabs_pts prefix = {	\ +		.syn		= prefix##_syn,			\ +		.syn_length	= ARRAY_SIZE(prefix##_syn),	\ +		.tx		= prefix##_tx,			\ +		.tx_length	= ARRAY_SIZE(prefix##_tx),	\ +		.rx		= prefix##_rx,			\ +		.rx_length	= ARRAY_SIZE(prefix##_rx),	\ +	} + +INITTABSPTS(b2056_inittab_phy_rev3); +INITTABSPTS(b2056_inittab_phy_rev4); +INITTABSPTS(b2056_inittab_radio_rev5); +INITTABSPTS(b2056_inittab_radio_rev6); +INITTABSPTS(b2056_inittab_radio_rev7_9); +INITTABSPTS(b2056_inittab_radio_rev8); +INITTABSPTS(b2056_inittab_radio_rev11); +  #define RADIOREGS3(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \  		   r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \  		   r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, \ @@ -3041,7 +3086,7 @@ static const struct b2056_inittabs_pts b2056_inittabs[] = {  	.phy_regs.phy_bw6	= r5  /* http://bcm-v4.sipsolutions.net/802.11/Radio/2056/ChannelTable */ -static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = { +static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_phy_rev3[] = {    {	.freq			= 4920,  	RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04,  		   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, @@ -4036,7 +4081,7 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] =    },  }; -static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev4[] = { +static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_phy_rev4[] = {    {	.freq			= 4920,  	RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04,  		   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, @@ -5031,7 +5076,7 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev4[] =    },  }; -static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev5[] = { +static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_radio_rev5[] = {    {	.freq			= 4920,  	RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04,  		   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, @@ -6026,7 +6071,7 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev5[] =    },  }; -static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev6[] = { +static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_radio_rev6[] = {    {	.freq			= 4920,  	RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04,  		   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, @@ -7021,7 +7066,7 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev6[] =    },  }; -static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev7_9[] = { +static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_radio_rev7_9[] = {    {	.freq			= 4920,  	RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04,  		   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, @@ -8016,7 +8061,7 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev7_9[]    },  }; -static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev8[] = { +static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_radio_rev8[] = {    {	.freq			= 4920,  	RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04,  		   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, @@ -9011,6 +9056,1154 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev8[] =    },  }; +static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_radio_rev11[] = { +	{ +		.freq			= 4920, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07b4, 0x07b0, 0x07ac, 0x0214, 0x0215, 0x0216), +	}, +	{ +		.freq			= 4930, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xed, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07b8, 0x07b4, 0x07b0, 0x0213, 0x0214, 0x0215), +	}, +	{ +		.freq			= 4940, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xee, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07bc, 0x07b8, 0x07b4, 0x0212, 0x0213, 0x0214), +	}, +	{ +		.freq			= 4950, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xef, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07c0, 0x07bc, 0x07b8, 0x0211, 0x0212, 0x0213), +	}, +	{ +		.freq			= 4960, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xf0, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07c4, 0x07c0, 0x07bc, 0x020f, 0x0211, 0x0212), +	}, +	{ +		.freq			= 4970, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xf1, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07c8, 0x07c4, 0x07c0, 0x020e, 0x020f, 0x0211), +	}, +	{ +		.freq			= 4980, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xf2, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07cc, 0x07c8, 0x07c4, 0x020d, 0x020e, 0x020f), +	}, +	{ +		.freq			= 4990, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xf3, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07d0, 0x07cc, 0x07c8, 0x020c, 0x020d, 0x020e), +	}, +	{ +		.freq			= 5000, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xf4, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07d4, 0x07d0, 0x07cc, 0x020b, 0x020c, 0x020d), +	}, +	{ +		.freq			= 5010, +		RADIOREGS3(0xff, 0x01, 0x01, 0x01, 0xf5, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07d8, 0x07d4, 0x07d0, 0x020a, 0x020b, 0x020c), +	}, +	{ +		.freq			= 5020, +		RADIOREGS3(0xf7, 0x01, 0x01, 0x01, 0xf6, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07dc, 0x07d8, 0x07d4, 0x0209, 0x020a, 0x020b), +	}, +	{ +		.freq			= 5030, +		RADIOREGS3(0xf7, 0x01, 0x01, 0x01, 0xf7, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07e0, 0x07dc, 0x07d8, 0x0208, 0x0209, 0x020a), +	}, +	{ +		.freq			= 5040, +		RADIOREGS3(0xef, 0x01, 0x01, 0x01, 0xf8, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07e4, 0x07e0, 0x07dc, 0x0207, 0x0208, 0x0209), +	}, +	{ +		.freq			= 5050, +		RADIOREGS3(0xef, 0x01, 0x01, 0x01, 0xf9, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07e8, 0x07e4, 0x07e0, 0x0206, 0x0207, 0x0208), +	}, +	{ +		.freq			= 5060, +		RADIOREGS3(0xe6, 0x01, 0x01, 0x01, 0xfa, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfe, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfe, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07ec, 0x07e8, 0x07e4, 0x0205, 0x0206, 0x0207), +	}, +	{ +		.freq			= 5070, +		RADIOREGS3(0xe6, 0x01, 0x01, 0x01, 0xfb, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfd, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfd, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07f0, 0x07ec, 0x07e8, 0x0204, 0x0205, 0x0206), +	}, +	{ +		.freq			= 5080, +		RADIOREGS3(0xde, 0x01, 0x01, 0x01, 0xfc, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfd, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfd, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07f4, 0x07f0, 0x07ec, 0x0203, 0x0204, 0x0205), +	}, +	{ +		.freq			= 5090, +		RADIOREGS3(0xde, 0x01, 0x01, 0x01, 0xfd, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x01, 0x01, 0x01, 0x8f, 0x0f, 0x00, +			   0xff, 0xfd, 0x00, 0x09, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfd, 0x00, 0x09, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07f8, 0x07f4, 0x07f0, 0x0202, 0x0203, 0x0204), +	}, +	{ +		.freq			= 5100, +		RADIOREGS3(0xd6, 0x01, 0x01, 0x01, 0xfe, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xfd, 0x00, 0x08, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfd, 0x00, 0x08, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x07fc, 0x07f8, 0x07f4, 0x0201, 0x0202, 0x0203), +	}, +	{ +		.freq			= 5110, +		RADIOREGS3(0xd6, 0x01, 0x01, 0x01, 0xff, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xfc, 0x00, 0x08, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfc, 0x00, 0x08, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x0800, 0x07fc, 0x07f8, 0x0200, 0x0201, 0x0202), +	}, +	{ +		.freq			= 5120, +		RADIOREGS3(0xce, 0x01, 0x01, 0x02, 0x00, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xfc, 0x00, 0x08, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfc, 0x00, 0x08, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x0804, 0x0800, 0x07fc, 0x01ff, 0x0200, 0x0201), +	}, +	{ +		.freq			= 5130, +		RADIOREGS3(0xce, 0x01, 0x01, 0x02, 0x01, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xfc, 0x00, 0x08, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfc, 0x00, 0x08, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x0808, 0x0804, 0x0800, 0x01fe, 0x01ff, 0x0200), +	}, +	{ +		.freq			= 5140, +		RADIOREGS3(0xc6, 0x01, 0x01, 0x02, 0x02, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xfb, 0x00, 0x08, 0x00, 0x77, 0x00, 0x0f, +			   0x00, 0x6f, 0x00, 0xfb, 0x00, 0x08, 0x00, 0x77, +			   0x00, 0x0f, 0x00, 0x6f, 0x00), +		PHYREGS(0x080c, 0x0808, 0x0804, 0x01fd, 0x01fe, 0x01ff), +	}, +	{ +		.freq			= 5160, +		RADIOREGS3(0xbe, 0x01, 0x01, 0x02, 0x04, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xfa, 0x00, 0x07, 0x00, 0x77, 0x00, 0x0e, +			   0x00, 0x6f, 0x00, 0xfa, 0x00, 0x07, 0x00, 0x77, +			   0x00, 0x0e, 0x00, 0x6f, 0x00), +		PHYREGS(0x0814, 0x0810, 0x080c, 0x01fb, 0x01fc, 0x01fd), +	}, +	{ +		.freq			= 5170, +		RADIOREGS3(0xbe, 0x01, 0x01, 0x02, 0x05, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xfa, 0x00, 0x07, 0x00, 0x77, 0x00, 0x0e, +			   0x00, 0x6f, 0x00, 0xfa, 0x00, 0x07, 0x00, 0x77, +			   0x00, 0x0e, 0x00, 0x6f, 0x00), +		PHYREGS(0x0818, 0x0814, 0x0810, 0x01fa, 0x01fb, 0x01fc), +	}, +	{ +		.freq			= 5180, +		RADIOREGS3(0xb6, 0x01, 0x01, 0x02, 0x06, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xf9, 0x00, 0x06, 0x00, 0x77, 0x00, 0x0e, +			   0x00, 0x6f, 0x00, 0xf9, 0x00, 0x06, 0x00, 0x77, +			   0x00, 0x0e, 0x00, 0x6f, 0x00), +		PHYREGS(0x081c, 0x0818, 0x0814, 0x01f9, 0x01fa, 0x01fb), +	}, +	{ +		.freq			= 5190, +		RADIOREGS3(0xb6, 0x01, 0x01, 0x02, 0x07, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xf9, 0x00, 0x06, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xf9, 0x00, 0x06, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x0820, 0x081c, 0x0818, 0x01f8, 0x01f9, 0x01fa), +	}, +	{ +		.freq			= 5200, +		RADIOREGS3(0xaf, 0x01, 0x01, 0x02, 0x08, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xf9, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xf9, 0x00, 0x05, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x0824, 0x0820, 0x081c, 0x01f7, 0x01f8, 0x01f9), +	}, +	{ +		.freq			= 5210, +		RADIOREGS3(0xaf, 0x01, 0x01, 0x02, 0x09, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00, +			   0xff, 0xf9, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xf9, 0x00, 0x05, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x0828, 0x0824, 0x0820, 0x01f6, 0x01f7, 0x01f8), +	}, +	{ +		.freq			= 5220, +		RADIOREGS3(0xa7, 0x01, 0x01, 0x02, 0x0a, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8e, 0x0f, 0x00, +			   0xfe, 0xd8, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xd8, 0x00, 0x05, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x082c, 0x0828, 0x0824, 0x01f5, 0x01f6, 0x01f7), +	}, +	{ +		.freq			= 5230, +		RADIOREGS3(0xa7, 0x01, 0x01, 0x02, 0x0b, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8e, 0x0f, 0x00, +			   0xee, 0xd8, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xd8, 0x00, 0x05, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x0830, 0x082c, 0x0828, 0x01f4, 0x01f5, 0x01f6), +	}, +	{ +		.freq			= 5240, +		RADIOREGS3(0xa0, 0x01, 0x01, 0x02, 0x0c, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8e, 0x0f, 0x00, +			   0xee, 0xc8, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xc8, 0x00, 0x05, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x0834, 0x0830, 0x082c, 0x01f3, 0x01f4, 0x01f5), +	}, +	{ +		.freq			= 5250, +		RADIOREGS3(0xa0, 0x01, 0x01, 0x02, 0x0d, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8e, 0x0f, 0x00, +			   0xed, 0xc7, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xc7, 0x00, 0x05, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x0838, 0x0834, 0x0830, 0x01f2, 0x01f3, 0x01f4), +	}, +	{ +		.freq			= 5260, +		RADIOREGS3(0x98, 0x01, 0x01, 0x02, 0x0e, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x02, 0x02, 0x02, 0x8e, 0x0e, 0x00, +			   0xed, 0xc7, 0x00, 0x04, 0x00, 0x77, 0x00, 0x0d, +			   0x00, 0x6f, 0x00, 0xc7, 0x00, 0x04, 0x00, 0x77, +			   0x00, 0x0d, 0x00, 0x6f, 0x00), +		PHYREGS(0x083c, 0x0838, 0x0834, 0x01f1, 0x01f2, 0x01f3), +	}, +	{ +		.freq			= 5270, +		RADIOREGS3(0x98, 0x01, 0x01, 0x02, 0x0f, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8e, 0x0e, 0x00, +			   0xed, 0xc7, 0x00, 0x04, 0x00, 0x77, 0x00, 0x0c, +			   0x00, 0x6f, 0x00, 0xc7, 0x00, 0x04, 0x00, 0x77, +			   0x00, 0x0c, 0x00, 0x6f, 0x00), +		PHYREGS(0x0840, 0x083c, 0x0838, 0x01f0, 0x01f1, 0x01f2), +	}, +	{ +		.freq			= 5280, +		RADIOREGS3(0x91, 0x01, 0x01, 0x02, 0x10, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8d, 0x0e, 0x00, +			   0xdc, 0xb7, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0c, +			   0x00, 0x6f, 0x00, 0xb7, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0c, 0x00, 0x6f, 0x00), +		PHYREGS(0x0844, 0x0840, 0x083c, 0x01f0, 0x01f0, 0x01f1), +	}, +	{ +		.freq			= 5290, +		RADIOREGS3(0x91, 0x01, 0x01, 0x02, 0x11, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8d, 0x0e, 0x00, +			   0xdc, 0xb7, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0c, +			   0x00, 0x6f, 0x00, 0xb7, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0c, 0x00, 0x6f, 0x00), +		PHYREGS(0x0848, 0x0844, 0x0840, 0x01ef, 0x01f0, 0x01f0), +	}, +	{ +		.freq			= 5300, +		RADIOREGS3(0x8a, 0x01, 0x01, 0x02, 0x12, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8d, 0x0e, 0x00, +			   0xdc, 0xb7, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0c, +			   0x00, 0x6f, 0x00, 0xb7, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0c, 0x00, 0x6f, 0x00), +		PHYREGS(0x084c, 0x0848, 0x0844, 0x01ee, 0x01ef, 0x01f0), +	}, +	{ +		.freq			= 5310, +		RADIOREGS3(0x8a, 0x01, 0x01, 0x02, 0x13, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8d, 0x0e, 0x00, +			   0xdc, 0xb7, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0c, +			   0x00, 0x6f, 0x00, 0xb7, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0c, 0x00, 0x6f, 0x00), +		PHYREGS(0x0850, 0x084c, 0x0848, 0x01ed, 0x01ee, 0x01ef), +	}, +	{ +		.freq			= 5320, +		RADIOREGS3(0x83, 0x01, 0x01, 0x02, 0x14, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8d, 0x0e, 0x00, +			   0xdb, 0xb7, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0c, +			   0x00, 0x6f, 0x00, 0xb7, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0c, 0x00, 0x6f, 0x00), +		PHYREGS(0x0854, 0x0850, 0x084c, 0x01ec, 0x01ed, 0x01ee), +	}, +	{ +		.freq			= 5330, +		RADIOREGS3(0x83, 0x01, 0x01, 0x02, 0x15, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8d, 0x0d, 0x00, +			   0xcb, 0xa6, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0b, +			   0x00, 0x6f, 0x00, 0xa6, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0b, 0x00, 0x6f, 0x00), +		PHYREGS(0x0858, 0x0854, 0x0850, 0x01eb, 0x01ec, 0x01ed), +	}, +	{ +		.freq			= 5340, +		RADIOREGS3(0x7c, 0x01, 0x01, 0x02, 0x16, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8d, 0x0d, 0x00, +			   0xca, 0xa6, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0b, +			   0x00, 0x6f, 0x00, 0xa6, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0b, 0x00, 0x6f, 0x00), +		PHYREGS(0x085c, 0x0858, 0x0854, 0x01ea, 0x01eb, 0x01ec), +	}, +	{ +		.freq			= 5350, +		RADIOREGS3(0x7c, 0x01, 0x01, 0x02, 0x17, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0d, 0x00, +			   0xca, 0xa6, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0b, +			   0x00, 0x6f, 0x00, 0xa6, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0b, 0x00, 0x6f, 0x00), +		PHYREGS(0x0860, 0x085c, 0x0858, 0x01e9, 0x01ea, 0x01eb), +	}, +	{ +		.freq			= 5360, +		RADIOREGS3(0x75, 0x01, 0x01, 0x02, 0x18, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0d, 0x00, +			   0xc9, 0x95, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x95, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x0864, 0x0860, 0x085c, 0x01e8, 0x01e9, 0x01ea), +	}, +	{ +		.freq			= 5370, +		RADIOREGS3(0x75, 0x01, 0x01, 0x02, 0x19, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0d, 0x00, +			   0xc9, 0x95, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x95, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x0868, 0x0864, 0x0860, 0x01e7, 0x01e8, 0x01e9), +	}, +	{ +		.freq			= 5380, +		RADIOREGS3(0x6e, 0x01, 0x01, 0x02, 0x1a, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0c, 0x00, +			   0xb8, 0x95, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x95, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x086c, 0x0868, 0x0864, 0x01e6, 0x01e7, 0x01e8), +	}, +	{ +		.freq			= 5390, +		RADIOREGS3(0x6e, 0x01, 0x01, 0x02, 0x1b, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0c, 0x00, +			   0xb8, 0x84, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x0870, 0x086c, 0x0868, 0x01e5, 0x01e6, 0x01e7), +	}, +	{ +		.freq			= 5400, +		RADIOREGS3(0x67, 0x01, 0x01, 0x02, 0x1c, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0c, 0x00, +			   0xb8, 0x84, 0x00, 0x03, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x03, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x0874, 0x0870, 0x086c, 0x01e5, 0x01e5, 0x01e6), +	}, +	{ +		.freq			= 5410, +		RADIOREGS3(0x67, 0x01, 0x01, 0x02, 0x1d, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0c, 0x00, +			   0xb7, 0x84, 0x00, 0x02, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x02, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x0878, 0x0874, 0x0870, 0x01e4, 0x01e5, 0x01e5), +	}, +	{ +		.freq			= 5420, +		RADIOREGS3(0x61, 0x01, 0x01, 0x02, 0x1e, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0c, 0x00, +			   0xa7, 0x84, 0x00, 0x02, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x02, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x087c, 0x0878, 0x0874, 0x01e3, 0x01e4, 0x01e5), +	}, +	{ +		.freq			= 5430, +		RADIOREGS3(0x61, 0x01, 0x01, 0x02, 0x1f, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x03, 0x03, 0x03, 0x8c, 0x0b, 0x00, +			   0xa6, 0x84, 0x00, 0x02, 0x00, 0x77, 0x00, 0x0a, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x02, 0x00, 0x77, +			   0x00, 0x0a, 0x00, 0x6f, 0x00), +		PHYREGS(0x0880, 0x087c, 0x0878, 0x01e2, 0x01e3, 0x01e4), +	}, +	{ +		.freq			= 5440, +		RADIOREGS3(0x5a, 0x01, 0x01, 0x02, 0x20, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8b, 0x0b, 0x00, +			   0xa6, 0x84, 0x00, 0x02, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x02, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x0884, 0x0880, 0x087c, 0x01e1, 0x01e2, 0x01e3), +	}, +	{ +		.freq			= 5450, +		RADIOREGS3(0x5a, 0x01, 0x01, 0x02, 0x21, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8b, 0x0b, 0x00, +			   0x95, 0x84, 0x00, 0x01, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x01, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x0888, 0x0884, 0x0880, 0x01e0, 0x01e1, 0x01e2), +	}, +	{ +		.freq			= 5460, +		RADIOREGS3(0x53, 0x01, 0x01, 0x02, 0x22, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8b, 0x0b, 0x00, +			   0x95, 0x84, 0x00, 0x01, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x84, 0x00, 0x01, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x088c, 0x0888, 0x0884, 0x01df, 0x01e0, 0x01e1), +	}, +	{ +		.freq			= 5470, +		RADIOREGS3(0x53, 0x01, 0x01, 0x02, 0x23, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8b, 0x0b, 0x00, +			   0x94, 0x73, 0x00, 0x01, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x01, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x0890, 0x088c, 0x0888, 0x01de, 0x01df, 0x01e0), +	}, +	{ +		.freq			= 5480, +		RADIOREGS3(0x4d, 0x01, 0x01, 0x02, 0x24, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8a, 0x0a, 0x00, +			   0x84, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x0894, 0x0890, 0x088c, 0x01dd, 0x01de, 0x01df), +	}, +	{ +		.freq			= 5490, +		RADIOREGS3(0x4d, 0x01, 0x01, 0x02, 0x25, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8a, 0x0a, 0x00, +			   0x83, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x0898, 0x0894, 0x0890, 0x01dd, 0x01dd, 0x01de), +	}, +	{ +		.freq			= 5500, +		RADIOREGS3(0x47, 0x01, 0x01, 0x02, 0x26, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8a, 0x0a, 0x00, +			   0x82, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x089c, 0x0898, 0x0894, 0x01dc, 0x01dd, 0x01dd), +	}, +	{ +		.freq			= 5510, +		RADIOREGS3(0x47, 0x01, 0x01, 0x02, 0x27, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8a, 0x0a, 0x00, +			   0x82, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x08a0, 0x089c, 0x0898, 0x01db, 0x01dc, 0x01dd), +	}, +	{ +		.freq			= 5520, +		RADIOREGS3(0x40, 0x01, 0x01, 0x02, 0x28, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8a, 0x0a, 0x00, +			   0x72, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x08a4, 0x08a0, 0x089c, 0x01da, 0x01db, 0x01dc), +	}, +	{ +		.freq			= 5530, +		RADIOREGS3(0x40, 0x01, 0x01, 0x02, 0x29, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8a, 0x09, 0x00, +			   0x72, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x08a8, 0x08a4, 0x08a0, 0x01d9, 0x01da, 0x01db), +	}, +	{ +		.freq			= 5540, +		RADIOREGS3(0x3a, 0x01, 0x01, 0x02, 0x2a, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x8a, 0x09, 0x00, +			   0x71, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x08ac, 0x08a8, 0x08a4, 0x01d8, 0x01d9, 0x01da), +	}, +	{ +		.freq			= 5550, +		RADIOREGS3(0x3a, 0x01, 0x01, 0x02, 0x2b, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x89, 0x09, 0x00, +			   0x61, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x08b0, 0x08ac, 0x08a8, 0x01d7, 0x01d8, 0x01d9), +	}, +	{ +		.freq			= 5560, +		RADIOREGS3(0x34, 0x01, 0x01, 0x02, 0x2c, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x89, 0x09, 0x00, +			   0x61, 0x73, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x73, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x08b4, 0x08b0, 0x08ac, 0x01d7, 0x01d7, 0x01d8), +	}, +	{ +		.freq			= 5570, +		RADIOREGS3(0x34, 0x01, 0x01, 0x02, 0x2d, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x89, 0x09, 0x00, +			   0x61, 0x62, 0x00, 0x00, 0x00, 0x77, 0x00, 0x09, +			   0x00, 0x6f, 0x00, 0x62, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x09, 0x00, 0x6f, 0x00), +		PHYREGS(0x08b8, 0x08b4, 0x08b0, 0x01d6, 0x01d7, 0x01d7), +	}, +	{ +		.freq			= 5580, +		RADIOREGS3(0x2e, 0x01, 0x01, 0x02, 0x2e, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x89, 0x08, 0x00, +			   0x60, 0x62, 0x00, 0x00, 0x00, 0x77, 0x00, 0x08, +			   0x00, 0x6f, 0x00, 0x62, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x08, 0x00, 0x6f, 0x00), +		PHYREGS(0x08bc, 0x08b8, 0x08b4, 0x01d5, 0x01d6, 0x01d7), +	}, +	{ +		.freq			= 5590, +		RADIOREGS3(0x2e, 0x01, 0x01, 0x02, 0x2f, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x04, 0x04, 0x04, 0x89, 0x08, 0x00, +			   0x50, 0x61, 0x00, 0x00, 0x00, 0x77, 0x00, 0x08, +			   0x00, 0x6f, 0x00, 0x61, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x08, 0x00, 0x6f, 0x00), +		PHYREGS(0x08c0, 0x08bc, 0x08b8, 0x01d4, 0x01d5, 0x01d6), +	}, +	{ +		.freq			= 5600, +		RADIOREGS3(0x28, 0x01, 0x01, 0x02, 0x30, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x89, 0x08, 0x00, +			   0x50, 0x51, 0x00, 0x00, 0x00, 0x77, 0x00, 0x08, +			   0x00, 0x6f, 0x00, 0x51, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x08, 0x00, 0x6f, 0x00), +		PHYREGS(0x08c4, 0x08c0, 0x08bc, 0x01d3, 0x01d4, 0x01d5), +	}, +	{ +		.freq			= 5610, +		RADIOREGS3(0x28, 0x01, 0x01, 0x02, 0x31, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x89, 0x08, 0x00, +			   0x50, 0x51, 0x00, 0x00, 0x00, 0x77, 0x00, 0x08, +			   0x00, 0x6f, 0x00, 0x51, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x08, 0x00, 0x6f, 0x00), +		PHYREGS(0x08c8, 0x08c4, 0x08c0, 0x01d2, 0x01d3, 0x01d4), +	}, +	{ +		.freq			= 5620, +		RADIOREGS3(0x21, 0x01, 0x01, 0x02, 0x32, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x89, 0x08, 0x00, +			   0x50, 0x50, 0x00, 0x00, 0x00, 0x77, 0x00, 0x07, +			   0x00, 0x6f, 0x00, 0x50, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x07, 0x00, 0x6f, 0x00), +		PHYREGS(0x08cc, 0x08c8, 0x08c4, 0x01d2, 0x01d2, 0x01d3), +	}, +	{ +		.freq			= 5630, +		RADIOREGS3(0x21, 0x01, 0x01, 0x02, 0x33, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x88, 0x07, 0x00, +			   0x50, 0x50, 0x00, 0x00, 0x00, 0x77, 0x00, 0x07, +			   0x00, 0x6f, 0x00, 0x50, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x07, 0x00, 0x6f, 0x00), +		PHYREGS(0x08d0, 0x08cc, 0x08c8, 0x01d1, 0x01d2, 0x01d2), +	}, +	{ +		.freq			= 5640, +		RADIOREGS3(0x1c, 0x01, 0x01, 0x02, 0x34, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x88, 0x07, 0x00, +			   0x40, 0x50, 0x00, 0x00, 0x00, 0x77, 0x00, 0x07, +			   0x00, 0x6f, 0x00, 0x50, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x07, 0x00, 0x6f, 0x00), +		PHYREGS(0x08d4, 0x08d0, 0x08cc, 0x01d0, 0x01d1, 0x01d2), +	}, +	{ +		.freq			= 5650, +		RADIOREGS3(0x1c, 0x01, 0x01, 0x02, 0x35, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x88, 0x07, 0x00, +			   0x40, 0x40, 0x00, 0x00, 0x00, 0x77, 0x00, 0x07, +			   0x00, 0x6f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x07, 0x00, 0x6f, 0x00), +		PHYREGS(0x08d8, 0x08d4, 0x08d0, 0x01cf, 0x01d0, 0x01d1), +	}, +	{ +		.freq			= 5660, +		RADIOREGS3(0x16, 0x01, 0x01, 0x02, 0x36, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x88, 0x07, 0x00, +			   0x40, 0x40, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6f, 0x00), +		PHYREGS(0x08dc, 0x08d8, 0x08d4, 0x01ce, 0x01cf, 0x01d0), +	}, +	{ +		.freq			= 5670, +		RADIOREGS3(0x16, 0x01, 0x01, 0x02, 0x37, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x88, 0x07, 0x00, +			   0x40, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6f, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6f, 0x00), +		PHYREGS(0x08e0, 0x08dc, 0x08d8, 0x01ce, 0x01ce, 0x01cf), +	}, +	{ +		.freq			= 5680, +		RADIOREGS3(0x10, 0x01, 0x01, 0x02, 0x38, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x06, 0x00, +			   0x30, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6f, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6f, 0x00), +		PHYREGS(0x08e4, 0x08e0, 0x08dc, 0x01cd, 0x01ce, 0x01ce), +	}, +	{ +		.freq			= 5690, +		RADIOREGS3(0x10, 0x01, 0x01, 0x02, 0x39, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x06, 0x00, +			   0x30, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6f, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6f, 0x00), +		PHYREGS(0x08e8, 0x08e4, 0x08e0, 0x01cc, 0x01cd, 0x01ce), +	}, +	{ +		.freq			= 5700, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x3a, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x06, 0x00, +			   0x30, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6e, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6e, 0x00), +		PHYREGS(0x08ec, 0x08e8, 0x08e4, 0x01cb, 0x01cc, 0x01cd), +	}, +	{ +		.freq			= 5710, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x3b, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x06, 0x00, +			   0x30, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6e, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6e, 0x00), +		PHYREGS(0x08f0, 0x08ec, 0x08e8, 0x01ca, 0x01cb, 0x01cc), +	}, +	{ +		.freq			= 5720, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x3c, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x06, 0x00, +			   0x30, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6e, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6e, 0x00), +		PHYREGS(0x08f4, 0x08f0, 0x08ec, 0x01c9, 0x01ca, 0x01cb), +	}, +	{ +		.freq			= 5725, +		RADIOREGS3(0x03, 0x01, 0x02, 0x04, 0x79, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x05, 0x05, 0x05, 0x87, 0x06, 0x00, +			   0x30, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6e, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6e, 0x00), +		PHYREGS(0x08f6, 0x08f2, 0x08ee, 0x01c9, 0x01ca, 0x01cb), +	}, +	{ +		.freq			= 5730, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x3d, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x05, 0x00, +			   0x20, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6e, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6e, 0x00), +		PHYREGS(0x08f8, 0x08f4, 0x08f0, 0x01c9, 0x01c9, 0x01ca), +	}, +	{ +		.freq			= 5735, +		RADIOREGS3(0x03, 0x01, 0x02, 0x04, 0x7b, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x05, 0x05, 0x05, 0x87, 0x05, 0x00, +			   0x20, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6d, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6d, 0x00), +		PHYREGS(0x08fa, 0x08f6, 0x08f2, 0x01c8, 0x01c9, 0x01ca), +	}, +	{ +		.freq			= 5740, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x3e, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x05, 0x00, +			   0x20, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6d, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6d, 0x00), +		PHYREGS(0x08fc, 0x08f8, 0x08f4, 0x01c8, 0x01c9, 0x01c9), +	}, +	{ +		.freq			= 5745, +		RADIOREGS3(0xfe, 0x00, 0x02, 0x04, 0x7d, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x05, 0x05, 0x05, 0x87, 0x05, 0x00, +			   0x20, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06, +			   0x00, 0x6d, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x06, 0x00, 0x6d, 0x00), +		PHYREGS(0x08fe, 0x08fa, 0x08f6, 0x01c8, 0x01c8, 0x01c9), +	}, +	{ +		.freq			= 5750, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x3f, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x87, 0x05, 0x00, +			   0x20, 0x20, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6d, 0x00, 0x20, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6d, 0x00), +		PHYREGS(0x0900, 0x08fc, 0x08f8, 0x01c7, 0x01c8, 0x01c9), +	}, +	{ +		.freq			= 5755, +		RADIOREGS3(0xfe, 0x00, 0x02, 0x04, 0x7f, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x05, 0x05, 0x05, 0x87, 0x05, 0x00, +			   0x10, 0x20, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6c, 0x00), +		PHYREGS(0x0902, 0x08fe, 0x08fa, 0x01c7, 0x01c8, 0x01c8), +	}, +	{ +		.freq			= 5760, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x40, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x86, 0x05, 0x00, +			   0x10, 0x20, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6c, 0x00), +		PHYREGS(0x0904, 0x0900, 0x08fc, 0x01c6, 0x01c7, 0x01c8), +	}, +	{ +		.freq			= 5765, +		RADIOREGS3(0xf8, 0x00, 0x02, 0x04, 0x81, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x05, 0x05, 0x05, 0x86, 0x05, 0x00, +			   0x10, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6c, 0x00), +		PHYREGS(0x0906, 0x0902, 0x08fe, 0x01c6, 0x01c7, 0x01c8), +	}, +	{ +		.freq			= 5770, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x41, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x86, 0x04, 0x00, +			   0x10, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6b, 0x00), +		PHYREGS(0x0908, 0x0904, 0x0900, 0x01c6, 0x01c6, 0x01c7), +	}, +	{ +		.freq			= 5775, +		RADIOREGS3(0xf8, 0x00, 0x02, 0x04, 0x83, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x05, 0x05, 0x05, 0x86, 0x04, 0x00, +			   0x10, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6b, 0x00), +		PHYREGS(0x090a, 0x0906, 0x0902, 0x01c5, 0x01c6, 0x01c7), +	}, +	{ +		.freq			= 5780, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x42, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x05, 0x05, 0x05, 0x86, 0x04, 0x00, +			   0x10, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6b, 0x00), +		PHYREGS(0x090c, 0x0908, 0x0904, 0x01c5, 0x01c6, 0x01c6), +	}, +	{ +		.freq			= 5785, +		RADIOREGS3(0xf2, 0x00, 0x02, 0x04, 0x85, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6b, 0x00), +		PHYREGS(0x090e, 0x090a, 0x0906, 0x01c4, 0x01c5, 0x01c6), +	}, +	{ +		.freq			= 5790, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x43, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6b, 0x00), +		PHYREGS(0x0910, 0x090c, 0x0908, 0x01c4, 0x01c5, 0x01c6), +	}, +	{ +		.freq			= 5795, +		RADIOREGS3(0xf2, 0x00, 0x02, 0x04, 0x87, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6b, 0x00), +		PHYREGS(0x0912, 0x090e, 0x090a, 0x01c4, 0x01c4, 0x01c5), +	}, +	{ +		.freq			= 5800, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x44, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6b, 0x00), +		PHYREGS(0x0914, 0x0910, 0x090c, 0x01c3, 0x01c4, 0x01c5), +	}, +	{ +		.freq			= 5805, +		RADIOREGS3(0xed, 0x00, 0x02, 0x04, 0x89, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6a, 0x00), +		PHYREGS(0x0916, 0x0912, 0x090e, 0x01c3, 0x01c4, 0x01c4), +	}, +	{ +		.freq			= 5810, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x45, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6a, 0x00), +		PHYREGS(0x0918, 0x0914, 0x0910, 0x01c2, 0x01c3, 0x01c4), +	}, +	{ +		.freq			= 5815, +		RADIOREGS3(0xed, 0x00, 0x02, 0x04, 0x8b, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6a, 0x00), +		PHYREGS(0x091a, 0x0916, 0x0912, 0x01c2, 0x01c3, 0x01c4), +	}, +	{ +		.freq			= 5820, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x46, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x6a, 0x00), +		PHYREGS(0x091c, 0x0918, 0x0914, 0x01c2, 0x01c2, 0x01c3), +	}, +	{ +		.freq			= 5825, +		RADIOREGS3(0xed, 0x00, 0x02, 0x04, 0x8d, 0x05, 0x05, 0x02, +			   0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x69, 0x00), +		PHYREGS(0x091e, 0x091a, 0x0916, 0x01c1, 0x01c2, 0x01c3), +	}, +	{ +		.freq			= 5830, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x47, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05, +			   0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x05, 0x00, 0x69, 0x00), +		PHYREGS(0x0920, 0x091c, 0x0918, 0x01c1, 0x01c2, 0x01c2), +	}, +	{ +		.freq			= 5840, +		RADIOREGS3(0x0a, 0x01, 0x01, 0x02, 0x48, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x69, 0x00), +		PHYREGS(0x0924, 0x0920, 0x091c, 0x01c0, 0x01c1, 0x01c2), +	}, +	{ +		.freq			= 5850, +		RADIOREGS3(0xe0, 0x00, 0x01, 0x02, 0x49, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x85, 0x03, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x69, 0x00), +		PHYREGS(0x0928, 0x0924, 0x0920, 0x01bf, 0x01c0, 0x01c1), +	}, +	{ +		.freq			= 5860, +		RADIOREGS3(0xde, 0x00, 0x01, 0x02, 0x4a, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x85, 0x03, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x69, 0x00), +		PHYREGS(0x092c, 0x0928, 0x0924, 0x01bf, 0x01bf, 0x01c0), +	}, +	{ +		.freq			= 5870, +		RADIOREGS3(0xdb, 0x00, 0x01, 0x02, 0x4b, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x85, 0x03, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x68, 0x00), +		PHYREGS(0x0930, 0x092c, 0x0928, 0x01be, 0x01bf, 0x01bf), +	}, +	{ +		.freq			= 5880, +		RADIOREGS3(0xd8, 0x00, 0x01, 0x02, 0x4c, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x85, 0x03, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x68, 0x00), +		PHYREGS(0x0934, 0x0930, 0x092c, 0x01bd, 0x01be, 0x01bf), +	}, +	{ +		.freq			= 5890, +		RADIOREGS3(0xd6, 0x00, 0x01, 0x02, 0x4d, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x85, 0x03, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x68, 0x00), +		PHYREGS(0x0938, 0x0934, 0x0930, 0x01bc, 0x01bd, 0x01be), +	}, +	{ +		.freq			= 5900, +		RADIOREGS3(0xd3, 0x00, 0x01, 0x02, 0x4e, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x85, 0x03, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x68, 0x00), +		PHYREGS(0x093c, 0x0938, 0x0934, 0x01bc, 0x01bc, 0x01bd), +	}, +	{ +		.freq			= 5910, +		RADIOREGS3(0xd6, 0x00, 0x01, 0x02, 0x4f, 0x05, 0x05, 0x02, +			   0x0c, 0x01, 0x06, 0x06, 0x06, 0x85, 0x03, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, +			   0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +			   0x00, 0x04, 0x00, 0x68, 0x00), +		PHYREGS(0x0940, 0x093c, 0x0938, 0x01bb, 0x01bc, 0x01bc), +	}, +	{ +		.freq			= 2412, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x6c, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x04, 0x04, 0x04, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x78, 0x00, 0x03, 0x00, 0x70, 0x00, +			   0x0b, 0x00, 0x0a, 0x00, 0x89, 0x00, 0x03, 0x00, +			   0x70, 0x00, 0x0b, 0x00, 0x0a), +		PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443), +	}, +	{ +		.freq			= 2417, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x71, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x78, 0x00, 0x03, 0x00, 0x70, 0x00, +			   0x0b, 0x00, 0x0a, 0x00, 0x89, 0x00, 0x03, 0x00, +			   0x70, 0x00, 0x0b, 0x00, 0x0a), +		PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441), +	}, +	{ +		.freq			= 2422, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x76, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x67, 0x00, 0x03, 0x00, 0x70, 0x00, +			   0x0b, 0x00, 0x0a, 0x00, 0x89, 0x00, 0x03, 0x00, +			   0x70, 0x00, 0x0b, 0x00, 0x0a), +		PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f), +	}, +	{ +		.freq			= 2427, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x7b, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x57, 0x00, 0x03, 0x00, 0x70, 0x00, +			   0x0a, 0x00, 0x0a, 0x00, 0x78, 0x00, 0x03, 0x00, +			   0x70, 0x00, 0x0a, 0x00, 0x0a), +		PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d), +	}, +	{ +		.freq			= 2432, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x80, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x56, 0x00, 0x03, 0x00, 0x70, 0x00, +			   0x0a, 0x00, 0x0a, 0x00, 0x77, 0x00, 0x03, 0x00, +			   0x70, 0x00, 0x0a, 0x00, 0x0a), +		PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a), +	}, +	{ +		.freq			= 2437, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x85, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x46, 0x00, 0x03, 0x00, 0x70, 0x00, +			   0x0a, 0x00, 0x0a, 0x00, 0x76, 0x00, 0x03, 0x00, +			   0x70, 0x00, 0x0a, 0x00, 0x0a), +		PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438), +	}, +	{ +		.freq			= 2442, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x8a, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x45, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x0a, 0x00, 0x0a, 0x00, 0x66, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x0a, 0x00, 0x0a), +		PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436), +	}, +	{ +		.freq			= 2447, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x8f, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x34, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x0a, 0x00, 0x09, 0x00, 0x55, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x0a, 0x00, 0x09), +		PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434), +	}, +	{ +		.freq			= 2452, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x94, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x23, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x0a, 0x00, 0x09, 0x00, 0x45, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x0a, 0x00, 0x09), +		PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431), +	}, +	{ +		.freq			= 2457, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x99, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x12, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x0a, 0x00, 0x09, 0x00, 0x34, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x0a, 0x00, 0x09), +		PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f), +	}, +	{ +		.freq			= 2462, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x9e, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x09, 0x00, 0x09, 0x00, 0x33, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x09, 0x00, 0x09), +		PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d), +	}, +	{ +		.freq			= 2467, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0xa3, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x09, 0x00, 0x09, 0x00, 0x22, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x09, 0x00, 0x09), +		PHYREGS(0x03df, 0x03db, 0x03d7, 0x0422, 0x0427, 0x042b), +	}, +	{ +		.freq			= 2472, +		RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0xa8, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x07, 0x07, 0x07, 0x8f, 0x30, 0x00, +			   0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x09, 0x00, 0x09, 0x00, 0x11, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x09, 0x00, 0x09), +		PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429), +	}, +	{ +		.freq			= 2484, +		RADIOREGS3(0xff, 0x01, 0x03, 0x09, 0xb4, 0x06, 0x06, 0x04, +			   0x2b, 0x01, 0x07, 0x07, 0x07, 0x8f, 0x20, 0x00, +			   0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x70, 0x00, +			   0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02, 0x00, +			   0x70, 0x00, 0x09, 0x00, 0x09), +		PHYREGS(0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424), +	}, +}; + +static const struct b2056_inittabs_pts +*b43_nphy_get_inittabs_rev3(struct b43_wldev *dev) +{ +	struct b43_phy *phy = &dev->phy; + +	switch (dev->phy.rev) { +	case 3: +		return &b2056_inittab_phy_rev3; +	case 4: +		return &b2056_inittab_phy_rev4; +	default: +		switch (phy->radio_rev) { +		case 5: +			return &b2056_inittab_radio_rev5; +		case 6: +			return &b2056_inittab_radio_rev6; +		case 7: +		case 9: +			return &b2056_inittab_radio_rev7_9; +		case 8: +			return &b2056_inittab_radio_rev8; +		case 11: +			return &b2056_inittab_radio_rev11; +		} +	} + +	return NULL; +} +  static void b2056_upload_inittab(struct b43_wldev *dev, bool ghz5,  				 bool ignore_uploadflag, u16 routing,  				 const struct b2056_inittab_entry *e, @@ -9037,11 +10230,11 @@ void b2056_upload_inittabs(struct b43_wldev *dev,  {  	const struct b2056_inittabs_pts *pts; -	if (dev->phy.rev >= ARRAY_SIZE(b2056_inittabs)) { +	pts = b43_nphy_get_inittabs_rev3(dev); +	if (!pts) {  		B43_WARN_ON(1);  		return;  	} -	pts = &b2056_inittabs[dev->phy.rev];  	b2056_upload_inittab(dev, ghz5, ignore_uploadflag,  				B2056_SYN, pts->syn, pts->syn_length); @@ -9060,11 +10253,12 @@ void b2056_upload_syn_pll_cp2(struct b43_wldev *dev, bool ghz5)  	const struct b2056_inittabs_pts *pts;  	const struct b2056_inittab_entry *e; -	if (dev->phy.rev >= ARRAY_SIZE(b2056_inittabs)) { +	pts = b43_nphy_get_inittabs_rev3(dev); +	if (!pts) {  		B43_WARN_ON(1);  		return;  	} -	pts = &b2056_inittabs[dev->phy.rev]; +  	e = &pts->syn[B2056_SYN_PLL_CP2];  	b43_radio_write(dev, B2056_SYN_PLL_CP2, ghz5 ? e->ghz5 : e->ghz2); @@ -9073,38 +10267,46 @@ void b2056_upload_syn_pll_cp2(struct b43_wldev *dev, bool ghz5)  const struct b43_nphy_channeltab_entry_rev3 *  b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq)  { +	struct b43_phy *phy = &dev->phy;  	const struct b43_nphy_channeltab_entry_rev3 *e;  	unsigned int length, i; -	switch (dev->phy.rev) { +	switch (phy->rev) {  	case 3: -		e = b43_nphy_channeltab_rev3; -		length = ARRAY_SIZE(b43_nphy_channeltab_rev3); +		e = b43_nphy_channeltab_phy_rev3; +		length = ARRAY_SIZE(b43_nphy_channeltab_phy_rev3);  		break;  	case 4: -		e = b43_nphy_channeltab_rev4; -		length = ARRAY_SIZE(b43_nphy_channeltab_rev4); -		break; -	case 5: -		e = b43_nphy_channeltab_rev5; -		length = ARRAY_SIZE(b43_nphy_channeltab_rev5); -		break; -	case 6: -		e = b43_nphy_channeltab_rev6; -		length = ARRAY_SIZE(b43_nphy_channeltab_rev6); -		break; -	case 7: -	case 9: -		e = b43_nphy_channeltab_rev7_9; -		length = ARRAY_SIZE(b43_nphy_channeltab_rev7_9); -		break; -	case 8: -		e = b43_nphy_channeltab_rev8; -		length = ARRAY_SIZE(b43_nphy_channeltab_rev8); +		e = b43_nphy_channeltab_phy_rev4; +		length = ARRAY_SIZE(b43_nphy_channeltab_phy_rev4);  		break;  	default: -		B43_WARN_ON(1); -		return NULL; +		switch (phy->radio_rev) { +		case 5: +			e = b43_nphy_channeltab_radio_rev5; +			length = ARRAY_SIZE(b43_nphy_channeltab_radio_rev5); +			break; +		case 6: +			e = b43_nphy_channeltab_radio_rev6; +			length = ARRAY_SIZE(b43_nphy_channeltab_radio_rev6); +			break; +		case 7: +		case 9: +			e = b43_nphy_channeltab_radio_rev7_9; +			length = ARRAY_SIZE(b43_nphy_channeltab_radio_rev7_9); +			break; +		case 8: +			e = b43_nphy_channeltab_radio_rev8; +			length = ARRAY_SIZE(b43_nphy_channeltab_radio_rev8); +			break; +		case 11: +			e = b43_nphy_channeltab_radio_rev11; +			length = ARRAY_SIZE(b43_nphy_channeltab_radio_rev11); +			break; +		default: +			B43_WARN_ON(1); +			return NULL; +		}  	}  	for (i = 0; i < length; i++, e++) { diff --git a/drivers/net/wireless/b43/sysfs.c b/drivers/net/wireless/b43/sysfs.c index 8e8431d4eb0..3190493bd07 100644 --- a/drivers/net/wireless/b43/sysfs.c +++ b/drivers/net/wireless/b43/sysfs.c @@ -40,7 +40,7 @@ static int get_integer(const char *buf, size_t count)  	if (count == 0)  		goto out; -	count = min(count, (size_t) 10); +	count = min_t(size_t, count, 10);  	memcpy(tmp, buf, count);  	ret = simple_strtol(tmp, NULL, 10);        out: diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c index 94c755fdda1..4047c05e380 100644 --- a/drivers/net/wireless/b43/tables_nphy.c +++ b/drivers/net/wireless/b43/tables_nphy.c @@ -1627,74 +1627,7 @@ static const u32 b43_ntab_tdtrn_r3[] = {  	0xfa58fc00, 0x0b64fc7e, 0x0800f7b6, 0x00f006be,  }; -static const u32 b43_ntab_noisevar0_r3[] = { -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, -}; - -static const u32 b43_ntab_noisevar1_r3[] = { +static const u32 b43_ntab_noisevar_r3[] = {  	0x02110211, 0x0000014d, 0x02110211, 0x0000014d,  	0x02110211, 0x0000014d, 0x02110211, 0x0000014d,  	0x02110211, 0x0000014d, 0x02110211, 0x0000014d, @@ -3109,31 +3042,32 @@ static void b43_nphy_tables_init_rev3(struct b43_wldev *dev)  		antswlut = sprom->fem.ghz2.antswlut;  	/* Static tables */ -	ntab_upload(dev, B43_NTAB_FRAMESTRUCT_R3, b43_ntab_framestruct_r3); -	ntab_upload(dev, B43_NTAB_PILOT_R3, b43_ntab_pilot_r3); -	ntab_upload(dev, B43_NTAB_TMAP_R3, b43_ntab_tmap_r3); -	ntab_upload(dev, B43_NTAB_INTLEVEL_R3, b43_ntab_intlevel_r3); -	ntab_upload(dev, B43_NTAB_TDTRN_R3, b43_ntab_tdtrn_r3); -	ntab_upload(dev, B43_NTAB_NOISEVAR0_R3, b43_ntab_noisevar0_r3); -	ntab_upload(dev, B43_NTAB_NOISEVAR1_R3, b43_ntab_noisevar1_r3); -	ntab_upload(dev, B43_NTAB_MCS_R3, b43_ntab_mcs_r3); -	ntab_upload(dev, B43_NTAB_TDI20A0_R3, b43_ntab_tdi20a0_r3); -	ntab_upload(dev, B43_NTAB_TDI20A1_R3, b43_ntab_tdi20a1_r3); -	ntab_upload(dev, B43_NTAB_TDI40A0_R3, b43_ntab_tdi40a0_r3); -	ntab_upload(dev, B43_NTAB_TDI40A1_R3, b43_ntab_tdi40a1_r3); -	ntab_upload(dev, B43_NTAB_PILOTLT_R3, b43_ntab_pilotlt_r3); -	ntab_upload(dev, B43_NTAB_CHANEST_R3, b43_ntab_channelest_r3); -	ntab_upload(dev, B43_NTAB_FRAMELT_R3, b43_ntab_framelookup_r3); -	ntab_upload(dev, B43_NTAB_C0_ESTPLT_R3, b43_ntab_estimatepowerlt0_r3); -	ntab_upload(dev, B43_NTAB_C1_ESTPLT_R3, b43_ntab_estimatepowerlt1_r3); -	ntab_upload(dev, B43_NTAB_C0_ADJPLT_R3, b43_ntab_adjustpower0_r3); -	ntab_upload(dev, B43_NTAB_C1_ADJPLT_R3, b43_ntab_adjustpower1_r3); -	ntab_upload(dev, B43_NTAB_C0_GAINCTL_R3, b43_ntab_gainctl0_r3); -	ntab_upload(dev, B43_NTAB_C1_GAINCTL_R3, b43_ntab_gainctl1_r3); -	ntab_upload(dev, B43_NTAB_C0_IQLT_R3, b43_ntab_iqlt0_r3); -	ntab_upload(dev, B43_NTAB_C1_IQLT_R3, b43_ntab_iqlt1_r3); -	ntab_upload(dev, B43_NTAB_C0_LOFEEDTH_R3, b43_ntab_loftlt0_r3); -	ntab_upload(dev, B43_NTAB_C1_LOFEEDTH_R3, b43_ntab_loftlt1_r3); +	if (dev->phy.do_full_init) { +		ntab_upload(dev, B43_NTAB_FRAMESTRUCT_R3, b43_ntab_framestruct_r3); +		ntab_upload(dev, B43_NTAB_PILOT_R3, b43_ntab_pilot_r3); +		ntab_upload(dev, B43_NTAB_TMAP_R3, b43_ntab_tmap_r3); +		ntab_upload(dev, B43_NTAB_INTLEVEL_R3, b43_ntab_intlevel_r3); +		ntab_upload(dev, B43_NTAB_TDTRN_R3, b43_ntab_tdtrn_r3); +		ntab_upload(dev, B43_NTAB_NOISEVAR_R3, b43_ntab_noisevar_r3); +		ntab_upload(dev, B43_NTAB_MCS_R3, b43_ntab_mcs_r3); +		ntab_upload(dev, B43_NTAB_TDI20A0_R3, b43_ntab_tdi20a0_r3); +		ntab_upload(dev, B43_NTAB_TDI20A1_R3, b43_ntab_tdi20a1_r3); +		ntab_upload(dev, B43_NTAB_TDI40A0_R3, b43_ntab_tdi40a0_r3); +		ntab_upload(dev, B43_NTAB_TDI40A1_R3, b43_ntab_tdi40a1_r3); +		ntab_upload(dev, B43_NTAB_PILOTLT_R3, b43_ntab_pilotlt_r3); +		ntab_upload(dev, B43_NTAB_CHANEST_R3, b43_ntab_channelest_r3); +		ntab_upload(dev, B43_NTAB_FRAMELT_R3, b43_ntab_framelookup_r3); +		ntab_upload(dev, B43_NTAB_C0_ESTPLT_R3, b43_ntab_estimatepowerlt0_r3); +		ntab_upload(dev, B43_NTAB_C1_ESTPLT_R3, b43_ntab_estimatepowerlt1_r3); +		ntab_upload(dev, B43_NTAB_C0_ADJPLT_R3, b43_ntab_adjustpower0_r3); +		ntab_upload(dev, B43_NTAB_C1_ADJPLT_R3, b43_ntab_adjustpower1_r3); +		ntab_upload(dev, B43_NTAB_C0_GAINCTL_R3, b43_ntab_gainctl0_r3); +		ntab_upload(dev, B43_NTAB_C1_GAINCTL_R3, b43_ntab_gainctl1_r3); +		ntab_upload(dev, B43_NTAB_C0_IQLT_R3, b43_ntab_iqlt0_r3); +		ntab_upload(dev, B43_NTAB_C1_IQLT_R3, b43_ntab_iqlt1_r3); +		ntab_upload(dev, B43_NTAB_C0_LOFEEDTH_R3, b43_ntab_loftlt0_r3); +		ntab_upload(dev, B43_NTAB_C1_LOFEEDTH_R3, b43_ntab_loftlt1_r3); +	}  	/* Volatile tables */  	if (antswlut < ARRAY_SIZE(b43_ntab_antswctl_r3)) @@ -3146,20 +3080,22 @@ static void b43_nphy_tables_init_rev3(struct b43_wldev *dev)  static void b43_nphy_tables_init_rev0(struct b43_wldev *dev)  {  	/* Static tables */ -	ntab_upload(dev, B43_NTAB_FRAMESTRUCT, b43_ntab_framestruct); -	ntab_upload(dev, B43_NTAB_FRAMELT, b43_ntab_framelookup); -	ntab_upload(dev, B43_NTAB_TMAP, b43_ntab_tmap); -	ntab_upload(dev, B43_NTAB_TDTRN, b43_ntab_tdtrn); -	ntab_upload(dev, B43_NTAB_INTLEVEL, b43_ntab_intlevel); -	ntab_upload(dev, B43_NTAB_PILOT, b43_ntab_pilot); -	ntab_upload(dev, B43_NTAB_TDI20A0, b43_ntab_tdi20a0); -	ntab_upload(dev, B43_NTAB_TDI20A1, b43_ntab_tdi20a1); -	ntab_upload(dev, B43_NTAB_TDI40A0, b43_ntab_tdi40a0); -	ntab_upload(dev, B43_NTAB_TDI40A1, b43_ntab_tdi40a1); -	ntab_upload(dev, B43_NTAB_CHANEST, b43_ntab_channelest); -	ntab_upload(dev, B43_NTAB_MCS, b43_ntab_mcs); -	ntab_upload(dev, B43_NTAB_NOISEVAR10, b43_ntab_noisevar10); -	ntab_upload(dev, B43_NTAB_NOISEVAR11, b43_ntab_noisevar11); +	if (dev->phy.do_full_init) { +		ntab_upload(dev, B43_NTAB_FRAMESTRUCT, b43_ntab_framestruct); +		ntab_upload(dev, B43_NTAB_FRAMELT, b43_ntab_framelookup); +		ntab_upload(dev, B43_NTAB_TMAP, b43_ntab_tmap); +		ntab_upload(dev, B43_NTAB_TDTRN, b43_ntab_tdtrn); +		ntab_upload(dev, B43_NTAB_INTLEVEL, b43_ntab_intlevel); +		ntab_upload(dev, B43_NTAB_PILOT, b43_ntab_pilot); +		ntab_upload(dev, B43_NTAB_TDI20A0, b43_ntab_tdi20a0); +		ntab_upload(dev, B43_NTAB_TDI20A1, b43_ntab_tdi20a1); +		ntab_upload(dev, B43_NTAB_TDI40A0, b43_ntab_tdi40a0); +		ntab_upload(dev, B43_NTAB_TDI40A1, b43_ntab_tdi40a1); +		ntab_upload(dev, B43_NTAB_CHANEST, b43_ntab_channelest); +		ntab_upload(dev, B43_NTAB_MCS, b43_ntab_mcs); +		ntab_upload(dev, B43_NTAB_NOISEVAR10, b43_ntab_noisevar10); +		ntab_upload(dev, B43_NTAB_NOISEVAR11, b43_ntab_noisevar11); +	}  	/* Volatile tables */  	ntab_upload(dev, B43_NTAB_BDI, b43_ntab_bdi); diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h index 9ff33adcff8..3a58aee4c4c 100644 --- a/drivers/net/wireless/b43/tables_nphy.h +++ b/drivers/net/wireless/b43/tables_nphy.h @@ -143,8 +143,7 @@ struct nphy_gain_ctl_workaround_entry *b43_nphy_get_gain_ctl_workaround_ent(  #define B43_NTAB_TMAP_R3		B43_NTAB32(12,   0) /* TM AP  */  #define B43_NTAB_INTLEVEL_R3		B43_NTAB32(13,   0) /* INT LV  */  #define B43_NTAB_TDTRN_R3		B43_NTAB32(14,   0) /* TD TRN  */ -#define B43_NTAB_NOISEVAR0_R3		B43_NTAB32(16,   0) /* noise variance 0  */ -#define B43_NTAB_NOISEVAR1_R3		B43_NTAB32(16, 128) /* noise variance 1  */ +#define B43_NTAB_NOISEVAR_R3		B43_NTAB32(16,   0) /* noise variance */  #define B43_NTAB_MCS_R3			B43_NTAB16(18,   0) /* MCS  */  #define B43_NTAB_TDI20A0_R3		B43_NTAB32(19, 128) /* TDI 20/0  */  #define B43_NTAB_TDI20A1_R3		B43_NTAB32(19, 256) /* TDI 20/1  */ diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c index 9b1a038be08..c218c08fb2f 100644 --- a/drivers/net/wireless/b43/wa.c +++ b/drivers/net/wireless/b43/wa.c @@ -441,7 +441,7 @@ static void b43_wa_altagc(struct b43_wldev *dev)  static void b43_wa_tr_ltov(struct b43_wldev *dev) /* TR Lookup Table Original Values */  { -	b43_gtab_write(dev, B43_GTAB_ORIGTR, 0, 0xC480); +	b43_gtab_write(dev, B43_GTAB_ORIGTR, 0, 0x7654);  }  static void b43_wa_cpll_nonpilot(struct b43_wldev *dev) diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index 8cb206a8908..6e6ef3fc224 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c @@ -278,7 +278,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,  	else  		txhdr->phy_rate = b43_plcp_get_ratecode_cck(rate);  	txhdr->mac_frame_ctl = wlhdr->frame_control; -	memcpy(txhdr->tx_receiver, wlhdr->addr1, 6); +	memcpy(txhdr->tx_receiver, wlhdr->addr1, ETH_ALEN);  	/* Calculate duration for fallback rate */  	if ((rate_fb == rate) || @@ -337,7 +337,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,  			/* iv16 */  			memcpy(txhdr->iv + 10, ((u8 *) wlhdr) + wlhdr_len, 3);  		} else { -			iv_len = min((size_t) info->control.hw_key->iv_len, +			iv_len = min_t(size_t, info->control.hw_key->iv_len,  				     ARRAY_SIZE(txhdr->iv));  			memcpy(txhdr->iv, ((u8 *) wlhdr) + wlhdr_len, iv_len);  		} @@ -408,7 +408,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,  		mac_ctl |= B43_TXH_MAC_HWSEQ;  	if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)  		mac_ctl |= B43_TXH_MAC_STMSDU; -	if (phy->type == B43_PHYTYPE_A) +	if (!phy->gmode)  		mac_ctl |= B43_TXH_MAC_5GHZ;  	/* Overwrite rates[0].count to make the retry calculation @@ -806,26 +806,30 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)  		B43_WARN_ON(1);  		/* FIXME: We don't really know which value the "chanid" contains.  		 *        So the following assignment might be wrong. */ -		status.freq = b43_channel_to_freq_5ghz(chanid); +		status.freq = +			ieee80211_channel_to_frequency(chanid, status.band);  		break;  	case B43_PHYTYPE_G:  		status.band = IEEE80211_BAND_2GHZ; -		/* chanid is the radio channel cookie value as used -		 * to tune the radio. */ -		status.freq = chanid + 2400; +		/* Somewhere between 478.104 and 508.1084 firmware for G-PHY +		 * has been modified to be compatible with N-PHY and others. +		 */ +		if (dev->fw.rev >= 508) +			status.freq = ieee80211_channel_to_frequency(chanid, status.band); +		else +			status.freq = chanid + 2400;  		break;  	case B43_PHYTYPE_N:  	case B43_PHYTYPE_LP:  	case B43_PHYTYPE_HT:  		/* chanid is the SHM channel cookie. Which is the plain  		 * channel number in b43. */ -		if (chanstat & B43_RX_CHAN_5GHZ) { +		if (chanstat & B43_RX_CHAN_5GHZ)  			status.band = IEEE80211_BAND_5GHZ; -			status.freq = b43_freq_to_channel_5ghz(chanid); -		} else { +		else  			status.band = IEEE80211_BAND_2GHZ; -			status.freq = b43_freq_to_channel_2ghz(chanid); -		} +		status.freq = +			ieee80211_channel_to_frequency(chanid, status.band);  		break;  	default:  		B43_WARN_ON(1);  | 
