Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754193Ab2HCPAa (ORCPT ); Fri, 3 Aug 2012 11:00:30 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:37154 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754166Ab2HCPA0 (ORCPT ); Fri, 3 Aug 2012 11:00:26 -0400 Date: Fri, 3 Aug 2012 10:56:04 -0400 From: "John W. Linville" To: davem@davemloft.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: pull request: wireless 2012-08-03 Message-ID: <20120803145604.GA6372@tuxdriver.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 23422 Lines: 695 --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable commit d4e5979c0da95791aa717c18e162540c7a596360 Dave, This request covers a batch of fixes intended for the 3.6 stream. Daniel Drake provides a pair of libertas fixes: one to avoid unnecessary resets in order to keep the MMC layer happy; and another to correct a couple of memory leaks. Eliad Peller gives us a mac80211 fix for an issue that could fail to notify userland of a completed scan. Johannes Berg provides "a few fixes for various things [Johannes] found doing code inspection for [his] multi-channel work". Mohammed Shafi Shajakhan provides a simple hardware-enablement (i.e. device ID) patch for ath9k. Paul Stewart provides a cfg80211 fix to ensure that the presence of beacons on a channel is recorded correctly. Rafa=C5=82 Mi=C5=82ecki gives us a bcma device ID patch to support BCM43228 devices, and a b43 GPIO fix. Seth Forshee provide a pair of patches to properly expose some regulatory information needed by brcmsmac. This corrects a lockdep issue created by a patch that is already in the tree. Stanislaw Gruszka provides a regulatory code fix to correct an earlier regression with the rt2x00 drivers. Woody Hung offers an rt2x00 fix to correct a regression when resuming an rt3290 device from S3/S4. This one seems big, but most of its size comes from moving a function between two source files. Please let me know if there are problems! Thanks, John --- The following changes since commit e33cdac014d50dd9753e1399ae8b0b5cd98d7aa0: ipv4: route.c cleanup (2012-08-02 02:54:43 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git tags/= master-2012-08-03 for you to fetch changes up to d4e5979c0da95791aa717c18e162540c7a596360: ath9k: Add PID/VID support for AR1111 (2012-08-03 10:11:14 -0400) ---------------------------------------------------------------- Daniel Drake (2): libertas: don't reset card on error when it is being removed libertas: fix two memory leaks Eliad Peller (1): mac80211: don't clear sched_scan_sdata on sched scan stop request Johannes Berg (4): mac80211: fix scan_sdata assignment Merge remote-tracking branch 'wireless/master' into mac80211 mac80211: clear timer bits when disconnecting mac80211: cancel mesh path timer John W. Linville (1): Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211 Mohammed Shafi Shajakhan (1): ath9k: Add PID/VID support for AR1111 Paul Stewart (1): cfg80211: Clear "beacon_found" on regulatory restore Rafa=C5=82 Mi=C5=82ecki (2): bcma: BCM43228 support b43: fix logic in GPIO init Seth Forshee (2): cfg80211: add channel flag to prohibit OFDM operation brcmsmac: use channel flags to restrict OFDM Stanislaw Gruszka (1): wireless: reg: restore previous behaviour of chan->max_power calculat= ions Woody Hung (1): rt2x00 : fix rt3290 resuming failed. drivers/bcma/host_pci.c | 1 + drivers/bcma/sprom.c | 4 +- drivers/net/wireless/ath/ath9k/hw.c | 1 + drivers/net/wireless/ath/ath9k/hw.h | 1 + drivers/net/wireless/ath/ath9k/pci.c | 1 + drivers/net/wireless/b43/main.c | 21 +++--- drivers/net/wireless/brcm80211/brcmsmac/channel.c | 5 +- .../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 3 +- drivers/net/wireless/libertas/cfg.c | 1 + drivers/net/wireless/libertas/if_sdio.c | 1 + drivers/net/wireless/libertas/main.c | 5 +- drivers/net/wireless/rt2x00/rt2800lib.c | 68 ++++++++++++++++= +++ drivers/net/wireless/rt2x00/rt2800pci.c | 71 ----------------= ---- include/linux/bcma/bcma_driver_chipcommon.h | 6 ++ include/net/cfg80211.h | 2 + net/mac80211/mesh.c | 3 + net/mac80211/mlme.c | 2 + net/mac80211/scan.c | 3 +- net/wireless/reg.c | 19 +++++- 19 files changed, 129 insertions(+), 89 deletions(-) diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c index 11b32d2..a6e5672 100644 --- a/drivers/bcma/host_pci.c +++ b/drivers/bcma/host_pci.c @@ -272,6 +272,7 @@ static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) =3D= { { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4331) }, { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4353) }, { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4357) }, + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) }, { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) }, { 0, }, }; diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c index 26823d9..9ea4627 100644 --- a/drivers/bcma/sprom.c +++ b/drivers/bcma/sprom.c @@ -507,7 +507,9 @@ static bool bcma_sprom_onchip_available(struct bcma_bus= *bus) /* for these chips OTP is always available */ present =3D true; break; - + case BCMA_CHIP_ID_BCM43228: + present =3D chip_status & BCMA_CC_CHIPST_43228_OTP_PRESENT; + break; default: present =3D false; break; diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath= /ath9k/hw.c index cfa91ab..60b6a9d 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -730,6 +730,7 @@ int ath9k_hw_init(struct ath_hw *ah) case AR9300_DEVID_QCA955X: case AR9300_DEVID_AR9580: case AR9300_DEVID_AR9462: + case AR9485_DEVID_AR1111: break; default: if (common->bus_ops->ath_bus_type =3D=3D ATH_USB) diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath= /ath9k/hw.h index dd0c146..ce7332c 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h @@ -49,6 +49,7 @@ #define AR9300_DEVID_AR9462 0x0034 #define AR9300_DEVID_AR9330 0x0035 #define AR9300_DEVID_QCA955X 0x0038 +#define AR9485_DEVID_AR1111 0x0037 =20 #define AR5416_AR9100_DEVID 0x000b =20 diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/at= h/ath9k/pci.c index 87b89d5..d455de9 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -37,6 +37,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) =3D { { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */ { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */ { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9462 */ + { PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E AR1111/AR9485 */ { 0 } }; =20 diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/mai= n.c index b80352b..a140165 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -2719,32 +2719,37 @@ static int b43_gpio_init(struct b43_wldev *dev) if (dev->dev->chip_id =3D=3D 0x4301) { mask |=3D 0x0060; set |=3D 0x0060; + } else if (dev->dev->chip_id =3D=3D 0x5354) { + /* Don't allow overtaking buttons GPIOs */ + set &=3D 0x2; /* 0x2 is LED GPIO on BCM5354 */ } - if (dev->dev->chip_id =3D=3D 0x5354) - set &=3D 0xff02; + if (0 /* FIXME: conditional unknown */ ) { b43_write16(dev, B43_MMIO_GPIO_MASK, b43_read16(dev, B43_MMIO_GPIO_MASK) | 0x0100); - mask |=3D 0x0180; - set |=3D 0x0180; + /* BT Coexistance Input */ + mask |=3D 0x0080; + set |=3D 0x0080; + /* BT Coexistance Out */ + mask |=3D 0x0100; + set |=3D 0x0100; } if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_PACTRL) { + /* PA is controlled by gpio 9, let ucode handle it */ b43_write16(dev, B43_MMIO_GPIO_MASK, b43_read16(dev, B43_MMIO_GPIO_MASK) | 0x0200); mask |=3D 0x0200; set |=3D 0x0200; } - if (dev->dev->core_rev >=3D 2) - mask |=3D 0x0010; /* FIXME: This is redundant. */ =20 switch (dev->dev->bus_type) { #ifdef CONFIG_B43_BCMA case B43_BUS_BCMA: bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL, (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc, - BCMA_CC_GPIOCTL) & mask) | set); + BCMA_CC_GPIOCTL) & ~mask) | set); break; #endif #ifdef CONFIG_B43_SSB @@ -2753,7 +2758,7 @@ static int b43_gpio_init(struct b43_wldev *dev) if (gpiodev) ssb_write32(gpiodev, B43_GPIO_CONTROL, (ssb_read32(gpiodev, B43_GPIO_CONTROL) - & mask) | set); + & ~mask) | set); break; #endif } diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/ne= t/wireless/brcm80211/brcmsmac/channel.c index 9a4c63f..7ed7d75 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c @@ -382,9 +382,7 @@ brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_= cm, u16 chanspec, { struct brcms_c_info *wlc =3D wlc_cm->wlc; struct ieee80211_channel *ch =3D wlc->pub->ieee_hw->conf.channel; - const struct ieee80211_reg_rule *reg_rule; struct txpwr_limits txpwr; - int ret; =20 brcms_c_channel_reg_limits(wlc_cm, chanspec, &txpwr); =20 @@ -393,8 +391,7 @@ brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_= cm, u16 chanspec, ); =20 /* set or restore gmode as required by regulatory */ - ret =3D freq_reg_info(wlc->wiphy, ch->center_freq, 0, ®_rule); - if (!ret && (reg_rule->flags & NL80211_RRF_NO_OFDM)) + if (ch->flags & IEEE80211_CHAN_NO_OFDM) brcms_c_set_gmode(wlc, GMODE_LEGACY_B, false); else brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false); diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/driver= s/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 9e79d47..192ad5c 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c @@ -121,7 +121,8 @@ static struct ieee80211_channel brcms_2ghz_chantable[] = =3D { IEEE80211_CHAN_NO_HT40PLUS), CHAN2GHZ(14, 2484, IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_IBSS | - IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS) + IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS | + IEEE80211_CHAN_NO_OFDM) }; =20 static struct ieee80211_channel brcms_5ghz_nphy_chantable[] =3D { diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/lib= ertas/cfg.c index eb5de80..1c10b54 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c @@ -1254,6 +1254,7 @@ static int lbs_associate(struct lbs_private *priv, netif_tx_wake_all_queues(priv->dev); } =20 + kfree(cmd); done: lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); return ret; diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless= /libertas/if_sdio.c index 76caeba..e970897 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c @@ -1314,6 +1314,7 @@ static void if_sdio_remove(struct sdio_func *func) kfree(packet); } =20 + kfree(card); lbs_deb_leave(LBS_DEB_SDIO); } =20 diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/li= bertas/main.c index 5804818..fe1ea43 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -571,7 +571,10 @@ static int lbs_thread(void *data) netdev_info(dev, "Timeout submitting command 0x%04x\n", le16_to_cpu(cmdnode->cmdbuf->command)); lbs_complete_command(priv, cmdnode, -ETIMEDOUT); - if (priv->reset_card) + + /* Reset card, but only when it isn't in the process + * of being shutdown anyway. */ + if (!dev->dismantle && priv->reset_card) priv->reset_card(priv); } priv->cmd_timed_out =3D 0; diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless= /rt2x00/rt2800lib.c index 88455b1..cb8c2ac 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -221,6 +221,67 @@ static void rt2800_rf_write(struct rt2x00_dev *rt2x00d= ev, mutex_unlock(&rt2x00dev->csr_mutex); } =20 +static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev) +{ + u32 reg; + int i, count; + + rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); + if (rt2x00_get_field32(reg, WLAN_EN)) + return 0; + + rt2x00_set_field32(®, WLAN_GPIO_OUT_OE_BIT_ALL, 0xff); + rt2x00_set_field32(®, FRC_WL_ANT_SET, 1); + rt2x00_set_field32(®, WLAN_CLK_EN, 0); + rt2x00_set_field32(®, WLAN_EN, 1); + rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); + + udelay(REGISTER_BUSY_DELAY); + + count =3D 0; + do { + /* + * Check PLL_LD & XTAL_RDY. + */ + for (i =3D 0; i < REGISTER_BUSY_COUNT; i++) { + rt2800_register_read(rt2x00dev, CMB_CTRL, ®); + if (rt2x00_get_field32(reg, PLL_LD) && + rt2x00_get_field32(reg, XTAL_RDY)) + break; + udelay(REGISTER_BUSY_DELAY); + } + + if (i >=3D REGISTER_BUSY_COUNT) { + + if (count >=3D 10) + return -EIO; + + rt2800_register_write(rt2x00dev, 0x58, 0x018); + udelay(REGISTER_BUSY_DELAY); + rt2800_register_write(rt2x00dev, 0x58, 0x418); + udelay(REGISTER_BUSY_DELAY); + rt2800_register_write(rt2x00dev, 0x58, 0x618); + udelay(REGISTER_BUSY_DELAY); + count++; + } else { + count =3D 0; + } + + rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); + rt2x00_set_field32(®, PCIE_APP0_CLK_REQ, 0); + rt2x00_set_field32(®, WLAN_CLK_EN, 1); + rt2x00_set_field32(®, WLAN_RESET, 1); + rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); + udelay(10); + rt2x00_set_field32(®, WLAN_RESET, 0); + rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); + udelay(10); + rt2800_register_write(rt2x00dev, INT_SOURCE_CSR, 0x7fffffff); + } while (count !=3D 0); + + return 0; +} + void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, const u8 command, const u8 token, const u8 arg0, const u8 arg1) @@ -400,6 +461,13 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, { unsigned int i; u32 reg; + int retval; + + if (rt2x00_rt(rt2x00dev, RT3290)) { + retval =3D rt2800_enable_wlan_rt3290(rt2x00dev); + if (retval) + return -EBUSY; + } =20 /* * If driver doesn't wake up firmware here, diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless= /rt2x00/rt2800pci.c index 235376e..98aa426 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -980,66 +980,6 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev= *rt2x00dev) return rt2800_validate_eeprom(rt2x00dev); } =20 -static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev) -{ - u32 reg; - int i, count; - - rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); - if (rt2x00_get_field32(reg, WLAN_EN)) - return 0; - - rt2x00_set_field32(®, WLAN_GPIO_OUT_OE_BIT_ALL, 0xff); - rt2x00_set_field32(®, FRC_WL_ANT_SET, 1); - rt2x00_set_field32(®, WLAN_CLK_EN, 0); - rt2x00_set_field32(®, WLAN_EN, 1); - rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); - - udelay(REGISTER_BUSY_DELAY); - - count =3D 0; - do { - /* - * Check PLL_LD & XTAL_RDY. - */ - for (i =3D 0; i < REGISTER_BUSY_COUNT; i++) { - rt2800_register_read(rt2x00dev, CMB_CTRL, ®); - if (rt2x00_get_field32(reg, PLL_LD) && - rt2x00_get_field32(reg, XTAL_RDY)) - break; - udelay(REGISTER_BUSY_DELAY); - } - - if (i >=3D REGISTER_BUSY_COUNT) { - - if (count >=3D 10) - return -EIO; - - rt2800_register_write(rt2x00dev, 0x58, 0x018); - udelay(REGISTER_BUSY_DELAY); - rt2800_register_write(rt2x00dev, 0x58, 0x418); - udelay(REGISTER_BUSY_DELAY); - rt2800_register_write(rt2x00dev, 0x58, 0x618); - udelay(REGISTER_BUSY_DELAY); - count++; - } else { - count =3D 0; - } - - rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); - rt2x00_set_field32(®, PCIE_APP0_CLK_REQ, 0); - rt2x00_set_field32(®, WLAN_CLK_EN, 1); - rt2x00_set_field32(®, WLAN_RESET, 1); - rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); - udelay(10); - rt2x00_set_field32(®, WLAN_RESET, 0); - rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); - udelay(10); - rt2800_register_write(rt2x00dev, INT_SOURCE_CSR, 0x7fffffff); - } while (count !=3D 0); - - return 0; -} static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) { int retval; @@ -1063,17 +1003,6 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2= x00dev) return retval; =20 /* - * In probe phase call rt2800_enable_wlan_rt3290 to enable wlan - * clk for rt3290. That avoid the MCU fail in start phase. - */ - if (rt2x00_rt(rt2x00dev, RT3290)) { - retval =3D rt2800_enable_wlan_rt3290(rt2x00dev); - - if (retval) - return retval; - } - - /* * This device has multiple filters for control frames * and has a separate filter for PS Poll frames. */ diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bc= ma/bcma_driver_chipcommon.h index 3c80885..d323a4b 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h @@ -89,6 +89,12 @@ #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 +#define BCMA_CC_CHIPST_43228_ILP_DIV_EN 0x00000001 +#define BCMA_CC_CHIPST_43228_OTP_PRESENT 0x00000002 +#define BCMA_CC_CHIPST_43228_SERDES_REFCLK_PADSEL 0x00000004 +#define BCMA_CC_CHIPST_43228_SDIO_MODE 0x00000008 +#define BCMA_CC_CHIPST_43228_SDIO_OTP_PRESENT 0x00000010 +#define BCMA_CC_CHIPST_43228_SDIO_RESET 0x00000020 #define BCMA_CC_CHIPST_4706_PKG_OPTION BIT(0) /* 0: full-featured packag= e 1: low-cost package */ #define BCMA_CC_CHIPST_4706_SFLASH_PRESENT BIT(1) /* 0: parallel, 1: seri= al flash is present */ #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: = 16b-p/Atmal-s flash */ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 493fa0c..3d254e1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -96,6 +96,7 @@ enum ieee80211_band { * is not permitted. * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel * is not permitted. + * @IEEE80211_CHAN_NO_OFDM: OFDM is not allowed on this channel. */ enum ieee80211_channel_flags { IEEE80211_CHAN_DISABLED =3D 1<<0, @@ -104,6 +105,7 @@ enum ieee80211_channel_flags { IEEE80211_CHAN_RADAR =3D 1<<3, IEEE80211_CHAN_NO_HT40PLUS =3D 1<<4, IEEE80211_CHAN_NO_HT40MINUS =3D 1<<5, + IEEE80211_CHAN_NO_OFDM =3D 1<<6, }; =20 #define IEEE80211_CHAN_NO_HT40 \ diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 6fac18c..8557235 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -622,6 +622,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *= sdata) =20 del_timer_sync(&sdata->u.mesh.housekeeping_timer); del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); + del_timer_sync(&sdata->u.mesh.mesh_path_timer); /* * If the timer fired while we waited for it, it will have * requeued the work. Now the work will be running again @@ -634,6 +635,8 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *= sdata) local->fif_other_bss--; atomic_dec(&local->iff_allmultis); ieee80211_configure_filter(local); + + sdata->u.mesh.timers_running =3D 0; } =20 static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdat= a, diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index cef0c9e..a4a5acd 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1430,6 +1430,8 @@ static void ieee80211_set_disassoc(struct ieee80211_s= ub_if_data *sdata, del_timer_sync(&sdata->u.mgd.bcn_mon_timer); del_timer_sync(&sdata->u.mgd.timer); del_timer_sync(&sdata->u.mgd.chswitch_timer); + + sdata->u.mgd.timers_running =3D 0; } =20 void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index bcaee5d..839dd97 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -299,7 +299,7 @@ static void __ieee80211_scan_completed(struct ieee80211= _hw *hw, bool aborted, if (local->scan_req !=3D local->int_scan_req) cfg80211_scan_done(local->scan_req, aborted); local->scan_req =3D NULL; - local->scan_sdata =3D NULL; + rcu_assign_pointer(local->scan_sdata, NULL); =20 local->scanning =3D 0; local->scan_channel =3D NULL; @@ -984,7 +984,6 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_= sub_if_data *sdata) kfree(local->sched_scan_ies.ie[i]); =20 drv_sched_scan_stop(local, sdata); - rcu_assign_pointer(local->sched_scan_sdata, NULL); } out: mutex_unlock(&local->mtx); diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 2303ee7..2ded3c7 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -680,6 +680,8 @@ static u32 map_regdom_flags(u32 rd_flags) channel_flags |=3D IEEE80211_CHAN_NO_IBSS; if (rd_flags & NL80211_RRF_DFS) channel_flags |=3D IEEE80211_CHAN_RADAR; + if (rd_flags & NL80211_RRF_NO_OFDM) + channel_flags |=3D IEEE80211_CHAN_NO_OFDM; return channel_flags; } =20 @@ -901,7 +903,21 @@ static void handle_channel(struct wiphy *wiphy, chan->max_antenna_gain =3D min(chan->orig_mag, (int) MBI_TO_DBI(power_rule->max_antenna_gain)); chan->max_reg_power =3D (int) MBM_TO_DBM(power_rule->max_eirp); - chan->max_power =3D min(chan->max_power, chan->max_reg_power); + if (chan->orig_mpwr) { + /* + * Devices that have their own custom regulatory domain + * but also use WIPHY_FLAG_STRICT_REGULATORY will follow the + * passed country IE power settings. + */ + if (initiator =3D=3D NL80211_REGDOM_SET_BY_COUNTRY_IE && + wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY && + wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) + chan->max_power =3D chan->max_reg_power; + else + chan->max_power =3D min(chan->orig_mpwr, + chan->max_reg_power); + } else + chan->max_power =3D chan->max_reg_power; } =20 static void handle_band(struct wiphy *wiphy, @@ -1885,6 +1901,7 @@ static void restore_custom_reg_settings(struct wiphy = *wiphy) chan->flags =3D chan->orig_flags; chan->max_antenna_gain =3D chan->orig_mag; chan->max_power =3D chan->orig_mpwr; + chan->beacon_found =3D false; } } } --=20 John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready. --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJQG+aEAAoJEJctW/TcYTgGBawP/1qAnMy+AugV56zEelEW9mva McG+10rzqSeLvKjFrTEics4chUQKAhkfu2/F4TimUZxCk8Z+BTK8mSUEzRjxPaqY yzJTIbxd0Pc5CCSEYIz+VuA0lZdmqC5kQL8zkkkhavLOEChL/ZHmy8KuVpoFqsWM Nhgn2/ffXW89+DHEctGvNHW4ax+o5Tq5+HrXuQf5BoHPFtoufKBQ0V5HjCGwcR4z 763NTdLznf6qUJrTGXGlCCshIKC4mmP2/UF6rDbxELG+AOlFRFDnDPlMo6qJT5pJ rEshDClnjXEo3rC3LtI8l/D536yzgyt6WzSMw9YuO7IyW8Xnete3zRjeqRbyexDT Ga2Fbg8bcDA/ZyiQP18CkcLJ1JgS6OaXWEYjHkZHjeRTnOGWhBxs7CVRLqMBzCXn ZYcVCUw6luMqdtH3pPZwP81HObVhIIyTeeRjK/V/awhTzvOnZN6OmU6GVSHcKzJE skjw6Oo0wGxbZlDj2PrDaeLOQ3TI3ns3UwNmLYDKvFlPj0V4vs+Dkjv8zx0o26sL nUCaZJAI8H0n0cBT79ddT79YYzyzFG+AhKDi3o3V/mh6Pd6DDX92PU4auZxYQBYk RV2CLAmZ9/IGJMPlg2YU5jj6iLRgfx7MC1x68u+FZkKkcuZDG9U96jTYxmumIyOO 7UiIaXp2WRFyPqFJqnzm =aGsm -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/