1. 31 8月, 2018 1 次提交
  2. 02 8月, 2018 1 次提交
  3. 26 7月, 2018 3 次提交
  4. 28 6月, 2018 1 次提交
    • O
      wireless-drivers: use BIT_ULL for NL80211_STA_INFO_ attribute types · 22d0d2fa
      Omer Efrat 提交于
      The BIT macro uses unsigned long which some architectures handle as 32 bit
      and therefore might cause macro's shift to overflow when used on a value
      equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and afterwards).
      
      Since 'filled' member in station_info changed to u64, BIT_ULL macro
      should be used with all NL80211_STA_INFO_* attribute types instead of BIT
      to prevent future possible bugs when one will use BIT macro for higher
      attributes by mistake.
      
      This commit cleans up all usages of BIT macro with the above field
      in wireless-drivers by changing it to BIT_ULL instead. In addition, there are
      some places which don't use BIT nor BIT_ULL macros so align those as well.
      Signed-off-by: NOmer Efrat <omer.efrat@tandemg.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      22d0d2fa
  5. 07 6月, 2018 1 次提交
    • K
      treewide: Use struct_size() for kmalloc()-family · acafe7e3
      Kees Cook 提交于
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = kmalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can
      now use the new struct_size() helper:
      
      instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This patch makes the changes for kmalloc()-family (and kvmalloc()-family)
      uses. It was done via automatic conversion with manual review for the
      "CHECKME" non-standard cases noted below, using the following Coccinelle
      script:
      
      // pkey_cache = kmalloc(sizeof *pkey_cache + tprops->pkey_tbl_len *
      //                      sizeof *pkey_cache->table, GFP_KERNEL);
      @@
      identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
      expression GFP;
      identifier VAR, ELEMENT;
      expression COUNT;
      @@
      
      - alloc(sizeof(*VAR) + COUNT * sizeof(*VAR->ELEMENT), GFP)
      + alloc(struct_size(VAR, ELEMENT, COUNT), GFP)
      
      // mr = kzalloc(sizeof(*mr) + m * sizeof(mr->map[0]), GFP_KERNEL);
      @@
      identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
      expression GFP;
      identifier VAR, ELEMENT;
      expression COUNT;
      @@
      
      - alloc(sizeof(*VAR) + COUNT * sizeof(VAR->ELEMENT[0]), GFP)
      + alloc(struct_size(VAR, ELEMENT, COUNT), GFP)
      
      // Same pattern, but can't trivially locate the trailing element name,
      // or variable name.
      @@
      identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
      expression GFP;
      expression SOMETHING, COUNT, ELEMENT;
      @@
      
      - alloc(sizeof(SOMETHING) + COUNT * sizeof(ELEMENT), GFP)
      + alloc(CHECKME_struct_size(&SOMETHING, ELEMENT, COUNT), GFP)
      Signed-off-by: NKees Cook <keescook@chromium.org>
      acafe7e3
  6. 30 5月, 2018 1 次提交
  7. 23 5月, 2018 1 次提交
  8. 20 4月, 2018 1 次提交
  9. 09 4月, 2018 1 次提交
  10. 29 3月, 2018 2 次提交
    • I
      iwlwifi: mvm: Allow iwl_mvm_mac_mgd_prepare_tx() when associated · d270e7b8
      Ilan Peer 提交于
      The FW does not allocate quota air time for the binding of a station
      MAC before iwlmvm indicates that it is associated. Currently iwlmvm
      indicates that the MAC is associated only after hearing a beacon from
      the AP. In case a deauthentication frame is sent before the MAC is
      associated, the frame might not be sent as the corresponding binding
      is not scheduled.
      
      To handle such cases, set IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP in the
      HW flags, requesting mac80211 to call the mgd_prepare_tx() callback
      before transmitting a deauthentication frame if associated but no
      beacon was heard from the AP.
      
      In addition, do not warn in iwl_mvm_mac_mgd_prepare_tx() when already
      associated as now the callback can be called also when associated.
      Signed-off-by: NIlan Peer <ilan.peer@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      d270e7b8
    • Z
      iwlwifi: mvm: add support for oce · 8f691af9
      Zamir, Roee 提交于
      Add support for Optimized Connectivity Experience (OCE).  Get
      capabilities from the fw, expose them with nl80211, and enable them in
      UMAC scan if the relevant nl80211 flags are set by the userspace.
      Signed-off-by: NRoee Zamir <roee.zamir@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      8f691af9
  11. 19 3月, 2018 1 次提交
    • A
      iwlwifi: mvm: Increase session protection time after CS · 19125cb0
      Andrei Otcheretianski 提交于
      After switching to a new channel, driver schedules session protection
      time event in order to hear the beacon on the new channel.
      The duration of the protection is two beacon intervals.
      However, since we start to switch slightly before beacon with count 1, in
      case we don't hear (or AP doesn't transmit) the very first beacon on the
      new channel the protection ends without hearing any beacon at all.
      At this stage the switch is not complete, the queues are closed and the
      interface doesn't have quota yet or TBTT events. As the result, we are
      stuck forever waiting for iwl_mvm_post_channel_switch() to be called.
      
      Fix this by increasing the protection time to be 3 beacon intervals and
      in addition drop the connection if the time event ends before we got any
      beacon.
      Signed-off-by: NAndrei Otcheretianski <andrei.otcheretianski@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      19125cb0
  12. 16 3月, 2018 1 次提交
  13. 02 3月, 2018 1 次提交
  14. 16 2月, 2018 1 次提交
  15. 21 12月, 2017 2 次提交
  16. 06 12月, 2017 3 次提交
  17. 28 11月, 2017 2 次提交
  18. 25 11月, 2017 1 次提交
  19. 03 11月, 2017 4 次提交
  20. 06 10月, 2017 4 次提交
  21. 08 9月, 2017 4 次提交
  22. 30 8月, 2017 1 次提交
    • D
      iwlwifi: mvm: Avoid deferring non bufferable frames · eb045e6e
      David Spinadel 提交于
      Use bcast station for all non bufferable frames on AP and AD-HOC.
      
      The host is no longer aware of STAs PS status because of buffer
      station offload, so we can't rely on mac80211 to toggle on
      IEEE80211_TX_CTL_NO_PS_BUFFER bit.
      
      A possible issue with buffering such frames, beside the obvious spec
      violation, is when a station disconnects while in PS but the AP isn't
      aware of that. In such scenarios the AP won't be able to send probe
      responses or auth frames so the STA won't be able to reconnect and
      the AP will have a queue hang.
      
      Fixes: 3e56eadf ("iwlwifi: mvm: implement AP/GO uAPSD support")
      Signed-off-by: NDavid Spinadel <david.spinadel@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      eb045e6e
  23. 18 8月, 2017 2 次提交