1. 16 11月, 2018 5 次提交
    • L
      iwlwifi: mvm: don't use SAR Geo if basic SAR is not used · 5d041c46
      Luca Coelho 提交于
      We can't use SAR Geo if basic SAR is not enabled, since the SAR Geo
      tables define offsets in relation to the basic SAR table in use.
      
      To fix this, make iwl_mvm_sar_init() return one in case WRDS is not
      available, so we can skip reading WGDS entirely.
      
      Fixes: a6bff3cb ("iwlwifi: mvm: add GEO_TX_POWER_LIMIT cmd for geographic tx power table")
      Cc: stable@vger.kernel.org # 4.12+
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      5d041c46
    • S
      iwlwifi: fix D3 debug data buffer memory leak · 54f3f994
      Shahar S Matityahu 提交于
      If the driver is unloaded when D3 debug data pulling is enabled
      but not triggered, it doesn't release the data buffer.
      
      Fix this by adding iwl_fw_runtime_free and calling it from the
      relevant places.
      
      Fixes: 2d8c2615 ("iwlwifi: add d3 debug data support")
      Signed-off-by: NShahar S Matityahu <shahar.s.matityahu@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      54f3f994
    • E
      iwlwifi: mvm: fix regulatory domain update when the firmware starts · 82715ac7
      Emmanuel Grumbach 提交于
      When the firmware starts, it doesn't have any regulatory
      information, hence it uses the world wide limitations. The
      driver can feed the firmware with previous knowledge that
      was kept in the driver, but the firmware may still not
      update its internal tables.
      
      This happens when we start a BSS interface, and then the
      firmware can change the regulatory tables based on our
      location and it'll use more lenient, location specific
      rules. Then, if the firmware is shut down (when the
      interface is brought down), and then an AP interface is
      created, the firmware will forget the country specific
      rules.
      
      The host will think that we are in a certain country that
      may allow channels and will try to teach the firmware about
      our location, but the firmware may still not allow to drop
      the world wide limitations and apply country specific rules
      because it was just re-started.
      
      In this case, the firmware will reply with MCC_RESP_ILLEGAL
      to the MCC_UPDATE_CMD. In that case, iwlwifi needs to let
      the upper layers (cfg80211 / hostapd) know that the channel
      list they know about has been updated.
      
      This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201105
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      82715ac7
    • E
      iwlwifi: mvm: support sta_statistics() even on older firmware · ec484d03
      Emmanuel Grumbach 提交于
      The oldest firmware supported by iwlmvm do support getting
      the average beacon RSSI. Enable the sta_statistics() call
      from mac80211 even on older firmware versions.
      
      Fixes: 33cef925 ("iwlwifi: mvm: support beacon statistics for BSS client")
      Cc: stable@vger.kernel.org # 4.2+
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      ec484d03
    • M
      iwlwifi: fix wrong WGDS_WIFI_DATA_SIZE · 66e83903
      Matt Chen 提交于
      From coreboot/BIOS:
      Name ("WGDS", Package() {
       Revision,
       Package() {
           DomainType,                         // 0x7:WiFi ==> We miss this one.
           WgdsWiFiSarDeltaGroup1PowerMax1,    // Group 1 FCC 2400 Max
           WgdsWiFiSarDeltaGroup1PowerChainA1, // Group 1 FCC 2400 A Offset
           WgdsWiFiSarDeltaGroup1PowerChainB1, // Group 1 FCC 2400 B Offset
           WgdsWiFiSarDeltaGroup1PowerMax2,    // Group 1 FCC 5200 Max
           WgdsWiFiSarDeltaGroup1PowerChainA2, // Group 1 FCC 5200 A Offset
           WgdsWiFiSarDeltaGroup1PowerChainB2, // Group 1 FCC 5200 B Offset
           WgdsWiFiSarDeltaGroup2PowerMax1,    // Group 2 EC Jap 2400 Max
           WgdsWiFiSarDeltaGroup2PowerChainA1, // Group 2 EC Jap 2400 A Offset
           WgdsWiFiSarDeltaGroup2PowerChainB1, // Group 2 EC Jap 2400 B Offset
           WgdsWiFiSarDeltaGroup2PowerMax2,    // Group 2 EC Jap 5200 Max
           WgdsWiFiSarDeltaGroup2PowerChainA2, // Group 2 EC Jap 5200 A Offset
           WgdsWiFiSarDeltaGroup2PowerChainB2, // Group 2 EC Jap 5200 B Offset
           WgdsWiFiSarDeltaGroup3PowerMax1,    // Group 3 ROW 2400 Max
           WgdsWiFiSarDeltaGroup3PowerChainA1, // Group 3 ROW 2400 A Offset
           WgdsWiFiSarDeltaGroup3PowerChainB1, // Group 3 ROW 2400 B Offset
           WgdsWiFiSarDeltaGroup3PowerMax2,    // Group 3 ROW 5200 Max
           WgdsWiFiSarDeltaGroup3PowerChainA2, // Group 3 ROW 5200 A Offset
           WgdsWiFiSarDeltaGroup3PowerChainB2, // Group 3 ROW 5200 B Offset
       }
      })
      
      When read the ACPI data to find out the WGDS, the DATA_SIZE is never
      matched.
      From the above format, it gives 19 numbers, but our driver is hardcode
      as 18.
      Fix it to pass then can parse the data into our wgds table.
      Then we will see:
      iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init Sending GEO_TX_POWER_LIMIT
      iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[0]
      Band[0]: chain A = 68 chain B = 69 max_tx_power = 54
      iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[0]
      Band[1]: chain A = 48 chain B = 49 max_tx_power = 70
      iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[1]
      Band[0]: chain A = 51 chain B = 67 max_tx_power = 50
      iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[1]
      Band[1]: chain A = 69 chain B = 70 max_tx_power = 68
      iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[2]
      Band[0]: chain A = 49 chain B = 50 max_tx_power = 48
      iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[2]
      Band[1]: chain A = 52 chain B = 53 max_tx_power = 51
      
      Cc: stable@vger.kernel.org # 4.12+
      Fixes: a6bff3cb ("iwlwifi: mvm: add GEO_TX_POWER_LIMIT cmd for geographic tx power table")
      Signed-off-by: NMatt Chen <matt.chen@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      66e83903
  2. 07 11月, 2018 4 次提交
    • A
      mt76: fix building without CONFIG_LEDS_CLASS · b374e868
      Arnd Bergmann 提交于
      When CONFIG_LEDS_CLASS is disabled, or it is a loadable module while
      mt76 is built-in, we run into a link error:
      
      drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_register_device':
      mac80211.c:(.text+0xb78): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_of_led_classdev_register'
      
      We don't really need a hard dependency here as the driver can presumably
      work just fine without LEDs, so this follows the iwlwifi example and
      adds a separate Kconfig option for the LED support, this will be available
      whenever it will link, and otherwise the respective code gets left out from
      the driver object.
      
      Fixes: 17f1de56 ("mt76: add common code shared between multiple chipsets")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b374e868
    • R
      brcmutil: really fix decoding channel info for 160 MHz bandwidth · 3401d42c
      Rafał Miłecki 提交于
      Previous commit /adding/ support for 160 MHz chanspecs was incomplete.
      It didn't set bandwidth info and didn't extract control channel info. As
      the result it was also using uninitialized "sb" var.
      
      This change has been tested for two chanspecs found to be reported by
      some devices/firmwares:
      1) 60/160 (0xee32)
         Before: chnum:50 control_ch_num:36
          After: chnum:50 control_ch_num:60
      2) 120/160 (0xed72)
         Before: chnum:114 control_ch_num:100
          After: chnum:114 control_ch_num:120
      
      Fixes: 330994e8 ("brcmfmac: fix for proper support of 160MHz bandwidth")
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      3401d42c
    • J
      wlcore: Fixup "Add support for optional wakeirq" · b630806d
      John Stultz 提交于
      After commit 3c83dd57 ("wlcore: Add support for optional
      wakeirq") landed upstream, I started seeing the following oops
      on my HiKey board:
      
      [    1.870279] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010
      [    1.870283] Mem abort info:
      [    1.870287]   ESR = 0x96000005
      [    1.870292]   Exception class = DABT (current EL), IL = 32 bits
      [    1.870296]   SET = 0, FnV = 0
      [    1.870299]   EA = 0, S1PTW = 0
      [    1.870302] Data abort info:
      [    1.870306]   ISV = 0, ISS = 0x00000005
      [    1.870309]   CM = 0, WnR = 0
      [    1.870312] [0000000000000010] user address but active_mm is swapper
      [    1.870318] Internal error: Oops: 96000005 [#1] PREEMPT SMP
      [    1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.19.0-05129-gb3d1e8e #48
      [    1.870331] Hardware name: HiKey Development Board (DT)
      [    1.870350] Workqueue: events_freezable mmc_rescan
      [    1.870358] pstate: 60400005 (nZCv daif +PAN -UAO)
      [    1.870366] pc : wl1271_probe+0x210/0x350
      [    1.870371] lr : wl1271_probe+0x210/0x350
      [    1.870374] sp : ffffff80080739b0
      [    1.870377] x29: ffffff80080739b0 x28: 0000000000000000
      [    1.870384] x27: 0000000000000000 x26: 0000000000000000
      [    1.870391] x25: 0000000000000036 x24: ffffffc074ecb598
      [    1.870398] x23: ffffffc07ffdce78 x22: ffffffc0744ed808
      [    1.870404] x21: ffffffc074ecbb98 x20: ffffff8008ff9000
      [    1.870411] x19: ffffffc0744ed800 x18: ffffff8008ff9a48
      [    1.870418] x17: 0000000000000000 x16: 0000000000000000
      [    1.870425] x15: ffffffc074ecb503 x14: ffffffffffffffff
      [    1.870431] x13: ffffffc074ecb502 x12: 0000000000000030
      [    1.870438] x11: 0101010101010101 x10: 0000000000000040
      [    1.870444] x9 : ffffffc075400248 x8 : ffffffc075400270
      [    1.870451] x7 : 0000000000000000 x6 : 0000000000000000
      [    1.870457] x5 : 0000000000000000 x4 : 0000000000000000
      [    1.870463] x3 : 0000000000000000 x2 : 0000000000000000
      [    1.870469] x1 : 0000000000000028 x0 : 0000000000000000
      [    1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(____ptrval____))
      [    1.870480] Call trace:
      [    1.870485]  wl1271_probe+0x210/0x350
      [    1.870491]  sdio_bus_probe+0x100/0x128
      [    1.870500]  really_probe+0x1a8/0x2b8
      [    1.870506]  driver_probe_device+0x58/0x100
      [    1.870511]  __device_attach_driver+0x94/0xd8
      [    1.870517]  bus_for_each_drv+0x70/0xc8
      [    1.870522]  __device_attach+0xe0/0x140
      [    1.870527]  device_initial_probe+0x10/0x18
      [    1.870532]  bus_probe_device+0x94/0xa0
      [    1.870537]  device_add+0x374/0x5b8
      [    1.870542]  sdio_add_func+0x60/0x88
      [    1.870546]  mmc_attach_sdio+0x1b0/0x358
      [    1.870551]  mmc_rescan+0x2cc/0x390
      [    1.870558]  process_one_work+0x12c/0x320
      [    1.870563]  worker_thread+0x48/0x458
      [    1.870569]  kthread+0xf8/0x128
      [    1.870575]  ret_from_fork+0x10/0x18
      [    1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803)
      [    1.870587] ---[ end trace 1e15f81d3c139ca9 ]---
      
      It seems since we don't have a wakeirq value in the dts, the wakeirq
      value in wl1271_probe() is zero, which then causes trouble in
      irqd_get_trigger_type(irq_get_irq_data(wakeirq)).
      
      This patch tries to address this by checking if wakeirq is zero,
      and not trying to add it to the resources if that is the case.
      
      Fixes: 3c83dd57 ("wlcore: Add support for optional wakeirq")
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: Eyal Reizer <eyalr@ti.com>
      Cc: Anders Roxell <anders.roxell@linaro.org>
      Cc: linux-wireless@vger.kernel.org
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Tested-by: NAnders Roxell <anders.roxell@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b630806d
    • D
      ath9k: Fix a locking bug in ath9k_add_interface() · 461cf036
      Dan Carpenter 提交于
      We tried to revert commit d9c52fd1 ("ath9k: fix tx99 with monitor
      mode interface") but accidentally missed part of the locking change.
      
      The lock has to be held earlier so that we're holding it when we do
      "sc->tx99_vif = vif;" and also there in the current code there is a
      stray unlock before we have taken the lock.
      
      Fixes: 6df0580b ("ath9k: add back support for using active monitor interfaces for tx99")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      461cf036
  3. 05 11月, 2018 5 次提交
    • L
      Linux 4.20-rc1 · 65102238
      Linus Torvalds 提交于
      65102238
    • L
      Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs · 42bd06e9
      Linus Torvalds 提交于
      Pull UBIFS updates from Richard Weinberger:
      
       - Full filesystem authentication feature, UBIFS is now able to have the
         whole filesystem structure authenticated plus user data encrypted and
         authenticated.
      
       - Minor cleanups
      
      * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits)
        ubifs: Remove unneeded semicolon
        Documentation: ubifs: Add authentication whitepaper
        ubifs: Enable authentication support
        ubifs: Do not update inode size in-place in authenticated mode
        ubifs: Add hashes and HMACs to default filesystem
        ubifs: authentication: Authenticate super block node
        ubifs: Create hash for default LPT
        ubfis: authentication: Authenticate master node
        ubifs: authentication: Authenticate LPT
        ubifs: Authenticate replayed journal
        ubifs: Add auth nodes to garbage collector journal head
        ubifs: Add authentication nodes to journal
        ubifs: authentication: Add hashes to index nodes
        ubifs: Add hashes to the tree node cache
        ubifs: Create functions to embed a HMAC in a node
        ubifs: Add helper functions for authentication support
        ubifs: Add separate functions to init/crc a node
        ubifs: Format changes for authentication support
        ubifs: Store read superblock node
        ubifs: Drop write_node
        ...
      42bd06e9
    • L
      Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4710e789
      Linus Torvalds 提交于
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfix:
         - Fix build issues on architectures that don't provide 64-bit cmpxchg
      
        Cleanups:
         - Fix a spelling mistake"
      
      * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: fix spelling mistake, EACCESS -> EACCES
        SUNRPC: Use atomic(64)_t for seq_send(64)
      4710e789
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 35e74524
      Linus Torvalds 提交于
      Pull more timer updates from Thomas Gleixner:
       "A set of commits for the new C-SKY architecture timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: gx6605s SOC timer
        clocksource/drivers/c-sky: Add gx6605s SOC system timer
        dt-bindings: timer: C-SKY Multi-processor timer
        clocksource/drivers/c-sky: Add C-SKY SMP timer
      35e74524
    • L
      Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb · 04578e84
      Linus Torvalds 提交于
      Pull NTB updates from Jon Mason:
       "Fairly minor changes and bug fixes:
      
        NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of
        private struct, and a few bug fixes"
      
      * tag 'ntb-4.20' of git://github.com/jonmason/ntb:
        ntb: idt: Alter the driver info comments
        ntb: idt: Discard temperature sensor IRQ handler
        ntb: idt: Add basic hwmon sysfs interface
        ntb: idt: Alter temperature read method
        ntb_netdev: Simplify remove with client device drvdata
        NTB: transport: Try harder to alloc an aligned MW buffer
        ntb: ntb_transport: Mark expected switch fall-throughs
        ntb: idt: Set PCIe bus address to BARLIMITx
        NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
        ntb: intel: fix return value for ndev_vec_mask()
        ntb_netdev: fix sleep time mismatch
      04578e84
  4. 04 11月, 2018 26 次提交