1. 06 Oct, 2018 9 commits
    • Johannes Berg's avatar
      iwlwifi: mvm: remove unnecessary overload variable · 07f62bb9
      Johannes Berg authored
      This is equivalent to checking he_phy_data != HE_PHY_DATA_INVAL,
      which is already done in a number of places, so remove the extra
      'overload' variable entirely.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      07f62bb9
    • Emmanuel Grumbach's avatar
      iwlwifi: mvm: clear HW_RESTART_REQUESTED when stopping the interface · 155f7e04
      Emmanuel Grumbach authored
      Fix a bug that happens in the following scenario:
      1) suspend without WoWLAN
      2) mac80211 calls drv_stop because of the suspend
      3) __iwl_mvm_mac_stop deallocates the aux station
      4) during drv_stop the firmware crashes
      5) iwlmvm:
      	* sets IWL_MVM_STATUS_HW_RESTART_REQUESTED
      	* asks mac80211 to kick the restart flow
      6) mac80211 puts the restart worker into a freezable
         queue which means that the worker will not run for now
         since the workqueue is already frozen
      7) ...
      8) resume
      9) mac80211 runs ieee80211_reconfig as part of the resume
      10) mac80211 detects that a restart flow has been requested
          and that we are now resuming from suspend and cancels
          the restart worker
      11) mac80211 calls drv_start()
      12) __iwl_mvm_mac_start checks that IWL_MVM_STATUS_HW_RESTART_REQUESTED
          clears it, sets IWL_MVM_STATUS_IN_HW_RESTART and calls
          iwl_mvm_restart_cleanup()
      13) iwl_fw_error_dump gets called and accesses the device
          to get debug data
      14) iwl_mvm_up adds the aux station
      15) iwl_mvm_add_aux_sta() allocates an internal station for
          the aux station
      16) iwl_mvm_allocate_int_sta() tests IWL_MVM_STATUS_IN_HW_RESTART
          and doesn't really allocate a station ID for the aux
          station
      17) a new queue is added for the aux station
      
      Note that steps from 5 to 9 aren't really part of the
      problem but were described for the sake of completeness.
      
      Once the iwl_mvm_mac_stop() is called, the device is not
      accessible, meaning that step 12) can't succeed and we'll
      see the following:
      
      drivers/net/wireless/intel/iwlwifi/pcie/trans.c:2122 iwl_trans_pcie_grab_nic_access+0xc0/0x1d6 [iwlwifi]()
      Timeout waiting for hardware access (CSR_GP_CNTRL 0x080403d8)
      Call Trace:
      [<ffffffffc03e6ad3>] iwl_trans_pcie_grab_nic_access+0xc0/0x1d6 [iwlwifi]
      [<ffffffffc03e6a13>] iwl_trans_pcie_dump_regs+0x3fd/0x3fd [iwlwifi]
      [<ffffffffc03dad42>] iwl_fw_error_dump+0x4f5/0xe8b [iwlwifi]
      [<ffffffffc04bd43e>] __iwl_mvm_mac_start+0x5a/0x21a [iwlmvm]
      [<ffffffffc04bd6d2>] iwl_mvm_mac_start+0xd4/0x103 [iwlmvm]
      [<ffffffffc042d378>] drv_start+0xa1/0xc5 [iwl7000_mac80211]
      [<ffffffffc045a339>] ieee80211_reconfig+0x145/0xf50 [mac80211]
      [<ffffffffc044788b>] ieee80211_resume+0x62/0x66 [mac80211]
      [<ffffffffc0366c5b>] wiphy_resume+0xa9/0xc6 [cfg80211]
      
      The station id of the aux station is set to 0xff in step 3
      and because we don't really allocate a new station id for
      the auxliary station (as explained in 16), we end up sending
      a command to the firmware asking to connect the queue
      to station id 0xff. This makes the firmware crash with the
      following information:
      
      0x00002093 | ADVANCED_SYSASSERT
      0x000002F0 | trm_hw_status0
      0x00000000 | trm_hw_status1
      0x00000B38 | branchlink2
      0x0001978C | interruptlink1
      0x00000000 | interruptlink2
      0xFF080501 | data1
      0xDEADBEEF | data2
      0xDEADBEEF | data3
      Firmware error during reconfiguration - reprobe!
      FW error in SYNC CMD SCD_QUEUE_CFG
      
      Fix this by clearing IWL_MVM_STATUS_HW_RESTART_REQUESTED
      in iwl_mvm_mac_stop(). We won't be able to collect debug
      data anyway and when we will brought up again, we will
      have a clean state from the firmware perspective.
      Since we won't have IWL_MVM_STATUS_IN_HW_RESTART set in
      step 12) we won't get to the 2093 ASSERT either.
      
      Fixes: bf8b286f ("iwlwifi: mvm: defer setting IWL_MVM_STATUS_IN_HW_RESTART")
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      155f7e04
    • Sara Sharon's avatar
      iwlwifi: dbg: group trigger condition to helper function · 6c042d75
      Sara Sharon authored
      The triplet of get trigger, is trigger enabled and is trigger stopped
      repeats itself.  Group them in a function to avoid code duplication.
      Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      6c042d75
    • Sara Sharon's avatar
      iwlwifi: dbg: dump memory in a helper function · 7339cc29
      Sara Sharon authored
      The code that dumps various memory types repeats itself.  Move it to a
      function to avoid duplication.
      Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      7339cc29
    • Ayala Beker's avatar
      iwlwifi: mvm: allow channel reorder optimization during scan · 9c16e0bb
      Ayala Beker authored
      Allow the FW to reorder HB channels and first scan HB channels with
      assumed APs, in order to reduce the scan duration.
      
      Currently enable it for all scan requests types.
      Signed-off-by: default avatarAyala Beker <ayala.beker@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      9c16e0bb
    • Sara Sharon's avatar
      iwlwifi: dbg: split iwl_fw_error_dump to two functions · a6820511
      Sara Sharon authored
      Split iwl_fw_error_dump to two parts.  The first part will dump the
      actual data, and second will do the file allocations, trans calls and
      actual file operations.  This is done in order to enable reuse of the
      code for the new debug ini infrastructure.
      Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      a6820511
    • Sara Sharon's avatar
      iwlwifi: dbg: refactor dump code to improve readability · 68025d5f
      Sara Sharon authored
      Add a macro to replace all the conditions checking for valid dump
      length.  In addition, move the fifo len calculation to a helper
      function.
      Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      68025d5f
    • Sara Sharon's avatar
      iwlwifi: dbg: move debug data to a struct · 17b809c9
      Sara Sharon authored
      The debug variables are bloating the iwl_fw struct.  And the fields
      are out of order, missing docs and some are redundant.
      
      Clean this up.  This serves as preparation for unionizing it for the
      new ini infra.
      Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      17b809c9
    • Luca Coelho's avatar
      iwlwifi: mvm: check for n_profiles validity in EWRD ACPI · 2e1976bb
      Luca Coelho authored
      When reading the profiles from the EWRD table in ACPI, we loop over
      the data and set it into our internal table.  We use the number of
      profiles specified in ACPI without checking its validity, so if the
      ACPI table is corrupted and the number is larger than our array size,
      we will try to make an out-of-bounds access.
      
      Fix this by making sure the value specified in the ACPI table is
      valid.
      
      Fixes: 69964905 ("iwlwifi: mvm: add support for EWRD (Dynamic SAR) ACPI table")
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      2e1976bb
  2. 05 Oct, 2018 21 commits
  3. 04 Oct, 2018 2 commits
    • Kalle Valo's avatar
      Merge tag 'mt76-for-kvalo-2018-10-01' of https://github.com/nbd168/wireless · 9434dca9
      Kalle Valo authored
      mt76 patches for 4.20
      
      * unify code between mt76x0, mt76x2
      * mt76x0 fixes
      * tx power configuration fix for 76x2
      * more progress on mt76x0e support
      * support for getting firmware version via ethtool
      * fix for rx buffer allocation regression on usb
      * fix for handling powersave responses
      * fix for mt76x2 beacon transmission
      9434dca9
    • Kalle Valo's avatar
      Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git · 09afaba1
      Kalle Valo authored
      ath.git patches for 4.20. Major changes:
      
      ath10k
      
      * retrieve MAC address from system firmware if provided
      
      * support extended board data download for dual-band QCA9984
      
      * extended per sta tx statistics support via debugfs
      
      * average ack rssi support for data frames
      
      * speed up QCA6174 and QCA9377 firmware download using diag Copy Engine
      
      * HTT High Latency mode support needed by SDIO and USB support
      
      * get STA power save state via debugfs
      
      ath9k
      
      * add reset functionality for airtime station debugfs file
      09afaba1
  4. 03 Oct, 2018 8 commits
    • Vakul Garg's avatar
      tls: Add support for inplace records encryption · 4e6d4720
      Vakul Garg authored
      Presently, for non-zero copy case, separate pages are allocated for
      storing plaintext and encrypted text of records. These pages are stored
      in sg_plaintext_data and sg_encrypted_data scatterlists inside record
      structure. Further, sg_plaintext_data & sg_encrypted_data are passed
      to cryptoapis for record encryption. Allocating separate pages for
      plaintext and encrypted text is inefficient from both required memory
      and performance point of view.
      
      This patch adds support of inplace encryption of records. For non-zero
      copy case, we reuse the pages from sg_encrypted_data scatterlist to
      copy the application's plaintext data. For the movement of pages from
      sg_encrypted_data to sg_plaintext_data scatterlists, we introduce a new
      function move_to_plaintext_sg(). This function add pages into
      sg_plaintext_data from sg_encrypted_data scatterlists.
      
      tls_do_encryption() is modified to pass the same scatterlist as both
      source and destination into aead_request_set_crypt() if inplace crypto
      has been enabled. A new ariable 'inplace_crypto' has been introduced in
      record structure to signify whether the same scatterlist can be used.
      By default, the inplace_crypto is enabled in get_rec(). If zero-copy is
      used (i.e. plaintext data is not copied), inplace_crypto is set to '0'.
      Signed-off-by: default avatarVakul Garg <vakul.garg@nxp.com>
      Reviewed-by: default avatarDave Watson <davejwatson@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e6d4720
    • Hauke Mehrtens's avatar
      net: dsa: lantiq: Fix path in MAINTAINERS file · 6502f856
      Hauke Mehrtens authored
      The MAINTAINERS file contained the wrong file name of the driver.
      
      Fixes: 14fceff4 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6502f856
    • Stephen Hemminger's avatar
      hv_netvsc: remove ndo_poll_controller · 2a7f8c3b
      Stephen Hemminger authored
      Similar to other patches from ERic.
      
      As diagnosed by Song Liu, ndo_poll_controller() can
      be very dangerous on loaded hosts, since the cpu
      calling ndo_poll_controller() might steal all NAPI
      contexts (for all RX/TX queues of the NIC). This capture
      can last for unlimited amount of time, since one
      cpu is generally not able to drain all the queues under load.
      
      In netvsc driver it uses NAPI for TX completions. The default
      poll_napi will do this for us now and avoid the capture.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a7f8c3b
    • Andrew Lunn's avatar
      MAINTAINERS: Fix wrong include file path · d777f552
      Andrew Lunn authored
      Fix the patch for the mv88e6xxx.h header file in MAINTAINERS
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d777f552
    • David S. Miller's avatar
      Merge branch 'for-upstream' of... · 00538ba9
      David S. Miller authored
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
      
      Johan Hedberg says:
      
      ====================
      pull request: bluetooth-next 2018-09-30
      
      Here's the first bluetooth-next pull request for the 4.20 kernel.
      
       - Fixes & cleanups to hci_qca driver
       - NULL dereference fix to debugfs
       - Improved L2CAP Connection-oriented Channel MTU & MPS handling
       - Added support for USB-based RTL8822C controller
       - Added device ID for BCM4335C0 UART-based controller
       - Various other smaller cleanups & fixes
      
      Please let me know if there are any issues pulling. Thanks.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00538ba9
    • Nathan Chancellor's avatar
      cxgb4: Use proper enum in IEEE_FAUX_SYNC · 258b6d14
      Nathan Chancellor authored
      Clang warns when one enumerated type is implicitly converted to another.
      
      drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:390:4: warning: implicit
      conversion from enumeration type 'enum cxgb4_dcb_state' to different
      enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                              IEEE_FAUX_SYNC(dev, dcb);
                              ^~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h:70:10: note: expanded
      from macro 'IEEE_FAUX_SYNC'
                                                  CXGB4_DCB_STATE_FW_ALLSYNCED);
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Use the equivalent value of the expected type to silence Clang while
      resulting in no functional change.
      
      CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      258b6d14
    • Nathan Chancellor's avatar
      cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update · 3b0b8f0d
      Nathan Chancellor authored
      Clang warns when one enumerated type is implicitly converted to another.
      
      drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:303:7: warning: implicit
      conversion from enumeration type 'enum cxgb4_dcb_state' to different
      enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                               ? CXGB4_DCB_STATE_FW_ALLSYNCED
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:304:7: warning: implicit
      conversion from enumeration type 'enum cxgb4_dcb_state' to different
      enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                               : CXGB4_DCB_STATE_FW_INCOMPLETE);
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      2 warnings generated.
      
      Use the equivalent value of the expected type to silence Clang while
      resulting in no functional change.
      
      CXGB4_DCB_STATE_FW_INCOMPLETE = CXGB4_DCB_INPUT_FW_INCOMPLETE = 2
      CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b0b8f0d
    • Nathan Chancellor's avatar
      dpaa_eth: Remove useless declaration · 0fd54807
      Nathan Chancellor authored
      Clang warns:
      
      drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2734:34: warning:
      tentative array definition assumed to have one element
      static const struct of_device_id dpaa_match[];
                                       ^
      1 warning generated.
      
      Turns out that since this driver was introduced in commit 9ad1a374
      ("dpaa_eth: add support for DPAA Ethernet"), this declaration has been
      unused. Remove it to silence the warning.
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Acked-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fd54807