1. 14 2月, 2019 4 次提交
  2. 04 2月, 2019 4 次提交
    • L
      iwlwifi: mvm: config mac ctxt to HE before TLC · 9394662a
      Liad Kaufman 提交于
      If we have a station connecting HE, make sure that the
      MAC ctxt is updated with indication of this before
      setting the TLC rates via the TLC manager command.
      Signed-off-by: NLiad Kaufman <liad.kaufman@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      9394662a
    • E
      iwlwifi: mvm: fix AP mode in WEP · 28916a16
      Emmanuel Grumbach 提交于
      Recently we started to send the WEP keys to the firmware so
      that we could use hardware Tx encryption also on newer
      devices that require the keys to be installed in the firmware
      for encryption (as opposed to older devices that can get
      the key in the Tx command for each Tx).
      
      When we implemented that, we forgot to remove the key when
      we remove a station leading to a situation where a station
      that connects and disconnects a lot of times exhausts the
      key database inside the firmware.
      
      A fix was made for that, but we always removed the same
      key: mvmvif->ap_wep_key which means that we removed the
      same key entry in the firmware. This can make sense since
      in WEP, the key is the same for all the stations, but the
      internal implementation of iwl_mvm_set_sta_key and
      iwl_mvm_remove_sta_key assumes that each station uses a
      different key in the firmware's key database.
      
      So now we got to the situation where we have a single
      ieee80211_key_conf instance that means, a single
      ieee80211_key_conf.hw_key_idx index for several stations
      and hence for several keys.
      ieee80211_key_conf.hw_key_idx is set to 0 when the first
      station associates, and then it is overwritten to 1 when
      the second station associates which is a buggy of course.
      This led to the following message upon the removal of the
      second station:
      
      iwlwifi 0000:00:03.0: offset 1 not used in fw key table.
      WARNING: CPU: 2 PID: 27883 at net/mac80211/sta_info.c:1122 __sta_info_destroy_part2+0x16b/0x180 [mac80211]
      RIP: 0010:__sta_info_destroy_part2+0x16b/0x180 [mac80211]
       Call Trace:
        __sta_info_destroy+0x2a/0x40 [mac80211]
        sta_info_destroy_addr_bss+0x38/0x60 [mac80211]
        ieee80211_del_station+0x1d/0x30 [mac80211]
        nl80211_del_station+0xe0/0x1f0 [cfg80211]
      
      Fix this by copying the ieee80211_key_conf structure for
      each and every station. This is the easiest way to properly
      remove the keys with the right index. Another solution
      would have been to allow several stations to use the same
      key offset in the firmware. That would require to change
      the way we track keys in iwlmvm and not really worth it.
      
      Also, maintain correctly fw_key_table when we add a key
      for the multicast station.
      Remove the key when we remove the multicast station.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Fixes: 337bfc98 ("iwlwifi: mvm: set wep key for all stations in soft ap mode")
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      28916a16
    • L
      iwlwifi: mvm: add fall through comments where needed · 244726ec
      Luca Coelho 提交于
      Some switch-cases were missing a fall through comment, so the compiler
      may warn.  Fix that by adding the comments where needed.  In other
      cases there was more text in the comment, which the compiler doesn't
      recognize, so either remove the extra text or move it to a separate
      comment line as appropriate.
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      244726ec
    • S
      iwlwifi: mvm: support CHANNEL_SWITCH_TIME_EVENT_CMD command · 74a10252
      Sara Sharon 提交于
      When we do channel switch, we used to schedule time events
      ourselves. This was offloaded to FW. Support the new command
      and flow.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      74a10252
  3. 29 1月, 2019 8 次提交
  4. 26 1月, 2019 4 次提交
  5. 20 12月, 2018 2 次提交
  6. 14 12月, 2018 1 次提交
  7. 23 11月, 2018 2 次提交
  8. 16 11月, 2018 2 次提交
    • 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
  9. 11 11月, 2018 2 次提交
  10. 06 10月, 2018 2 次提交
    • E
      iwlwifi: mvm: clear HW_RESTART_REQUESTED when stopping the interface · 155f7e04
      Emmanuel Grumbach 提交于
      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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      155f7e04
    • S
      iwlwifi: dbg: group trigger condition to helper function · 6c042d75
      Sara Sharon 提交于
      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: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      6c042d75
  11. 28 9月, 2018 3 次提交
  12. 05 9月, 2018 1 次提交
  13. 31 8月, 2018 5 次提交