1. 22 3月, 2019 1 次提交
    • J
      iwlwifi: mvm: fix TX crypto on 22560+ devices · 475c6bde
      Johannes Berg 提交于
      In the old days, we could transmit with HW crypto with an arbitrary
      key by filling it into TX_CMD. This was broken first with the advent
      of CCMP/GCMP-256 keys which don't fit there.
      
      This was broken *again* with the newer TX_CMD format on 22560+,
      where we simply cannot pass key material anymore. However, we forgot
      to update all the cases when we get a key from mac80211 and don't
      program it into the hardware but still return 0 for HW crypto on TX.
      
      In AP mode with WEP, we tried to fix this by programming the keys
      separately for each station later, but this ultimately turns out to
      be buggy, for example now it leaks memory when we have more than one
      WEP key.
      
      Fix this by simply using only SW crypto for WEP in newer devices by
      returning -EOPNOTSUPP instead of trying to program WEP keys later.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      475c6bde
  2. 08 3月, 2019 1 次提交
    • A
      iwlwifi: fix 64-bit division · 688cd8bd
      Arnd Bergmann 提交于
      do_div() expects unsigned operands and otherwise triggers a warning like:
      
      drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: error: comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka 'long long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Werror,-Wcompare-distinct-pointer-types]
              do_div(rtt_avg, 6666);
              ^~~~~~~~~~~~~~~~~~~~~
      include/asm-generic/div64.h:222:28: note: expanded from macro 'do_div'
              (void)(((typeof((n)) *)0) == ((uint64_t *)0));  \
                     ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~
      1 error generated.
      
      Change the do_div() to the simpler div_s64() that can handle
      negative inputs correctly.
      
      Fixes: 937b10c0 ("iwlwifi: mvm: add debug prints for FTM")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      688cd8bd
  3. 22 2月, 2019 1 次提交
  4. 21 2月, 2019 28 次提交
  5. 14 2月, 2019 9 次提交