1. 21 11月, 2018 1 次提交
  2. 20 11月, 2018 19 次提交
  3. 19 11月, 2018 1 次提交
    • M
      tuntap: fix multiqueue rx · 8ebebcba
      Matthew Cover 提交于
      When writing packets to a descriptor associated with a combined queue, the
      packets should end up on that queue.
      
      Before this change all packets written to any descriptor associated with a
      tap interface end up on rx-0, even when the descriptor is associated with a
      different queue.
      
      The rx traffic can be generated by either of the following.
        1. a simple tap program which spins up multiple queues and writes packets
           to each of the file descriptors
        2. tx from a qemu vm with a tap multiqueue netdev
      
      The queue for rx traffic can be observed by either of the following (done
      on the hypervisor in the qemu case).
        1. a simple netmap program which opens and reads from per-queue
           descriptors
        2. configuring RPS and doing per-cpu captures with rxtxcpu
      
      Alternatively, if you printk() the return value of skb_get_rx_queue() just
      before each instance of netif_receive_skb() in tun.c, you will get 65535
      for every skb.
      
      Calling skb_record_rx_queue() to set the rx queue to the queue_index fixes
      the association between descriptor and rx queue.
      Signed-off-by: NMatthew Cover <matthew.cover@stackpath.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ebebcba
  4. 18 11月, 2018 1 次提交
  5. 17 11月, 2018 4 次提交
  6. 16 11月, 2018 14 次提交
    • L
      mt76: fix uninitialized mutex access setting rts threshold · 1770f0fa
      Lorenzo Bianconi 提交于
      Fix following crash due to a leftover uninitialized mutex access
      in mt76x2_set_rts_threshold routine.
      
      [   31.018059] Call Trace:
      [   31.018341]  register_lock_class+0x51f/0x530
      [   31.018828]  __lock_acquire+0x6c/0x1580
      [   31.019247]  lock_acquire+0x88/0x120
      [   31.021089]  __mutex_lock+0x4a/0x4f0
      [   31.023343]  mt76x2_set_rts_threshold+0x28/0x50
      [   31.023831]  ieee80211_set_wiphy_params+0x16d/0x4e0
      [   31.024344]  nl80211_set_wiphy+0x72b/0xbc0
      [   31.024781]  genl_family_rcv_msg+0x192/0x3a0
      [   31.025233]  genl_rcv_msg+0x42/0x89
      [   31.026079]  netlink_rcv_skb+0x38/0x100
      [   31.026475]  genl_rcv+0x1f/0x30
      [   31.026804]  netlink_unicast+0x19c/0x250
      [   31.027212]  netlink_sendmsg+0x1ed/0x390
      [   31.027615]  sock_sendmsg+0x31/0x40
      [   31.027973]  ___sys_sendmsg+0x23c/0x280
      [   31.030414]  __sys_sendmsg+0x42/0x80
      [   31.030783]  do_syscall_64+0x4a/0x170
      [   31.031160]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      [   31.031677] RIP: 0033:0x7f3498b39ba7
      [   31.033953] RSP: 002b:00007fffe19675b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      [   31.034883] RAX: ffffffffffffffda RBX: 00000000012d5350 RCX: 00007f3498b39ba7
      [   31.035756] RDX: 0000000000000000 RSI: 00007fffe19675f0 RDI: 0000000000000003
      [   31.036587] RBP: 00000000012da740 R08: 0000000000000002 R09: 0000000000000000
      [   31.037422] R10: 0000000000000006 R11: 0000000000000246 R12: 00000000012da880
      [   31.038252] R13: 00007fffe19675f0 R14: 00007fffe19678c0 R15: 00000000012da880
      
      Fixes: 108a4861 ("mt76: create new mt76x02-lib module for common mt76x{0,2} code")
      Reported-by: lorenzo.trisolini@fluidmesh.com
      Reported-by: luca.bisti@fluidmesh.com
      Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      1770f0fa
    • R
      brcmfmac: fix reporting support for 160 MHz channels · d1fe6ad6
      Rafał Miłecki 提交于
      Driver can report IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ so it's
      important to provide valid & complete info about supported bands for
      each channel. By default no support for 160 MHz should be assumed unless
      firmware reports it for a given channel later.
      
      This fixes info passed to the userspace. Without that change userspace
      could try to use invalid channel and fail to start an interface.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Cc: stable@vger.kernel.org
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      d1fe6ad6
    • B
      ath10k: don't assume 'vif' is non-NULL in flush() · d987f783
      Brian Norris 提交于
      mac80211 may call us with vif == NULL, if the station is not currently
      active (e.g., not associated). It is trivially easy to reproduce a crash
      by suspending the system when not connected to an AP:
      
      [   65.533934] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      ...
      [   65.574521] pc : ath10k_flush+0x30/0xd0 [ath10k_core]
      [   65.574538] lr : __ieee80211_flush_queues+0x180/0x244 [mac80211]
      [   65.599680] Process kworker/u12:1 (pid: 57, stack limit = 0x(____ptrval____))
      [   65.599682] Call trace:
      [   65.599695]  ath10k_flush+0x30/0xd0 [ath10k_core]
      [   65.642064]  __ieee80211_flush_queues+0x180/0x244 [mac80211]
      [   65.642079]  ieee80211_flush_queues+0x34/0x40 [mac80211]
      [   65.642095]  __ieee80211_suspend+0xfc/0x47c [mac80211]
      [   65.658611]  ieee80211_suspend+0x30/0x3c [mac80211]
      [   65.658627]  wiphy_suspend+0x15c/0x3a8 [cfg80211]
      [   65.672810]  dpm_run_callback+0xf0/0x1f0
      [   65.672814]  __device_suspend+0x3ac/0x4f8
      [   65.672819]  async_suspend+0x34/0xbc
      [   65.684096]  async_run_entry_fn+0x54/0x104
      [   65.684099]  worker_thread+0x4cc/0x72c
      [   65.684102]  kthread+0x134/0x13c
      [   65.684105]  ret_from_fork+0x10/0x18
      
      Fixes: 9de4162f ("ath10k: add peer flush in ath10k_flush for STATION")
      Signed-off-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      d987f783
    • A
      drivers/net/ethernet/qlogic/qed/qed_rdma.h: fix typo · a97b9565
      Andrew Morton 提交于
      Add missing semicolon.
      
      Fixes: 291d57f6 ("qed: Fix rdma_info structure allocation")
      Cc: Michal Kalderon <michal.kalderon@cavium.com>
      Cc: Denis Bolotin <denis.bolotin@cavium.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a97b9565
    • A
      net/mlx4: Fix UBSAN warning of signed integer overflow · a463146e
      Aya Levin 提交于
      UBSAN: Undefined behavior in
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:626:29
      signed integer overflow: 1802201963 + 1802201963 cannot be represented
      in type 'int'
      
      The union of res_reserved and res_port_rsvd[MLX4_MAX_PORTS] monitors
      granting of reserved resources. The grant operation is calculated and
      protected, thus both members of the union cannot be negative.  Changed
      type of res_reserved and of res_port_rsvd[MLX4_MAX_PORTS] from signed
      int to unsigned int, allowing large value.
      
      Fixes: 5a0d0a61 ("mlx4: Structures and init/teardown for VF resource quotas")
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a463146e
    • T
      net/mlx4_core: Fix uninitialized variable compilation warning · 3ea7e7ea
      Tariq Toukan 提交于
      Initialize the uid variable to zero to avoid the compilation warning.
      
      Fixes: 7a89399f ("net/mlx4: Add mlx4_bitmap zone allocator")
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ea7e7ea
    • J
      net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command · bd85fbc2
      Jack Morgenstein 提交于
      When re-registering a user mr, the mpt information for the
      existing mr when running SRIOV is obtained via the QUERY_MPT
      fw command. The returned information includes the mpt's lkey.
      
      This retrieved mpt information is used to move the mpt back
      to hardware ownership in the rereg flow (via the SW2HW_MPT
      fw command when running SRIOV).
      
      The fw API spec states that for SW2HW_MPT, the lkey field
      must be zero. Any ConnectX-3 PF driver which checks for strict spec
      adherence will return failure for SW2HW_MPT if the lkey field is not
      zero (although the fw in practice ignores this field for SW2HW_MPT).
      
      Thus, in order to conform to the fw API spec, set the lkey field to zero
      before invoking SW2HW_MPT when running SRIOV.
      
      Fixes: e630664c ("mlx4_core: Add helper functions to support MR re-registration")
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd85fbc2
    • 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
    • G
      cxgb4: fix thermal zone build error · ebcd210e
      Ganesh Goudar 提交于
      with CONFIG_THERMAL=m and cxgb4 as built-in build fails, and
      'commit e70a57fa ("cxgb4: fix thermal configuration dependencies")'
      tries to fix it but when cxgb4i is made built-in build fails again,
      use IS_REACHABLE instead of IS_ENABLED to fix the issue.
      
      Fixes: e70a57fa (cxgb4: fix thermal configuration dependencies)
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebcd210e
    • V
      bnxt_en: Fix filling time in bnxt_fill_coredump_record() · 8dc5ae2d
      Vasundhara Volam 提交于
      Fix the year and month offset while storing it in
      bnxt_fill_coredump_record().
      
      Fixes: 6c5657d0 ("bnxt_en: Add support for ethtool get dump.")
      Signed-off-by: NVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8dc5ae2d