1. 22 3月, 2023 1 次提交
  2. 14 2月, 2023 4 次提交
  3. 19 1月, 2023 1 次提交
  4. 21 10月, 2022 1 次提交
    • P
      wifi: cfg80211: Fix bitrates overflow issue · 18429c51
      Paul Zhang 提交于
      When invoking function cfg80211_calculate_bitrate_eht about
      (320 MHz, EHT-MCS 13, EHT-NSS 2, EHT-GI 0), which means the
      parameters as flags: 0x80, bw: 7, mcs: 13, eht_gi: 0, nss: 2,
      this formula (result * rate->nss) will overflow and causes
      the returned bitrate to be 3959 when it should be 57646.
      
      Here is the explanation:
       u64 tmp;
       u32 result;
       …
       /* tmp = result = 4 * rates_996[0]
        *     = 4 * 480388888 = 0x72889c60
        */
       tmp = result;
      
       /* tmp = 0x72889c60 * 6144 = 0xabccea90000 */
       tmp *= SCALE;
      
       /* tmp = 0xabccea90000 / mcs_divisors[13]
        *     = 0xabccea90000 / 5120 = 0x8970bba6
        */
       do_div(tmp, mcs_divisors[rate->mcs]);
      
       /* result = 0x8970bba6 */
       result = tmp;
      
       /* normally (result * rate->nss) = 0x8970bba6 * 2 = 0x112e1774c,
        * but since result is u32, (result * rate->nss) = 0x12e1774c,
        * overflow happens and it loses the highest bit.
        * Then result =  0x12e1774c / 8 = 39595753,
        */
       result = (result * rate->nss) / 8;
      Signed-off-by: NPaul Zhang <quic_paulz@quicinc.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      18429c51
  5. 07 10月, 2022 2 次提交
  6. 27 9月, 2022 1 次提交
  7. 25 8月, 2022 1 次提交
  8. 15 7月, 2022 2 次提交
  9. 20 6月, 2022 1 次提交
    • J
      wifi: cfg80211: do some rework towards MLO link APIs · 7b0a0e3c
      Johannes Berg 提交于
      In order to support multi-link operation with multiple links,
      start adding some APIs. The notable addition here is to have
      the link ID in a new nl80211 attribute, that will be used to
      differentiate the links in many nl80211 operations.
      
      So far, this patch adds the netlink NL80211_ATTR_MLO_LINK_ID
      attribute (as well as the NL80211_ATTR_MLO_LINKS attribute)
      and plugs it through the system in some places, checking the
      validity etc. along with other infrastructure needed for it.
      
      For now, I've decided to include only the over-the-air link
      ID in the API. I know we discussed that we eventually need to
      have to have other ways of identifying a link, but for local
      AP mode and auth/assoc commands as well as set_key etc. we'll
      use the OTA ID.
      
      Also included in this patch is some refactoring of the data
      structures in struct wireless_dev, splitting for the first
      time the data into type dependent pieces, to make reasoning
      about these things easier.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      7b0a0e3c
  10. 06 3月, 2022 1 次提交
  11. 16 2月, 2022 1 次提交
  12. 04 2月, 2022 1 次提交
  13. 15 11月, 2021 1 次提交
  14. 25 10月, 2021 1 次提交
  15. 21 10月, 2021 1 次提交
  16. 01 6月, 2021 1 次提交
  17. 12 5月, 2021 2 次提交
  18. 19 4月, 2021 1 次提交
  19. 26 1月, 2021 1 次提交
    • J
      cfg80211: avoid holding the RTNL when calling the driver · a05829a7
      Johannes Berg 提交于
      Currently, _everything_ in cfg80211 holds the RTNL, and if you
      have a slow USB device (or a few) you can get some bad lock
      contention on that.
      
      Fix that by re-adding a mutex to each wiphy/rdev as we had at
      some point, so we have locking for the wireless_dev lists and
      all the other things in there, and also so that drivers still
      don't have to worry too much about it (they still won't get
      parallel calls for a single device).
      
      Then, we can restrict the RTNL to a few cases where we add or
      remove interfaces and really need the added protection. Some
      of the global list management still also uses the RTNL, since
      we need to have it anyway for netdev management, but we only
      hold the RTNL for very short periods of time here.
      
      Link: https://lore.kernel.org/r/20210122161942.81df9f5e047a.I4a8e1a60b18863ea8c5e6d3a0faeafb2d45b2f40@changeid
      Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> [marvell driver issues]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a05829a7
  20. 22 1月, 2021 2 次提交
  21. 11 12月, 2020 2 次提交
  22. 11 11月, 2020 1 次提交
  23. 06 11月, 2020 1 次提交
  24. 18 9月, 2020 3 次提交
  25. 27 8月, 2020 2 次提交
  26. 24 8月, 2020 1 次提交
  27. 08 8月, 2020 1 次提交
    • W
      mm, treewide: rename kzfree() to kfree_sensitive() · 453431a5
      Waiman Long 提交于
      As said by Linus:
      
        A symmetric naming is only helpful if it implies symmetries in use.
        Otherwise it's actively misleading.
      
        In "kzalloc()", the z is meaningful and an important part of what the
        caller wants.
      
        In "kzfree()", the z is actively detrimental, because maybe in the
        future we really _might_ want to use that "memfill(0xdeadbeef)" or
        something. The "zero" part of the interface isn't even _relevant_.
      
      The main reason that kzfree() exists is to clear sensitive information
      that should not be leaked to other future users of the same memory
      objects.
      
      Rename kzfree() to kfree_sensitive() to follow the example of the recently
      added kvfree_sensitive() and make the intention of the API more explicit.
      In addition, memzero_explicit() is used to clear the memory to make sure
      that it won't get optimized away by the compiler.
      
      The renaming is done by using the command sequence:
      
        git grep -w --name-only kzfree |\
        xargs sed -i 's/kzfree/kfree_sensitive/'
      
      followed by some editing of the kfree_sensitive() kerneldoc and adding
      a kzfree backward compatibility macro in slab.h.
      
      [akpm@linux-foundation.org: fs/crypto/inline_crypt.c needs linux/slab.h]
      [akpm@linux-foundation.org: fix fs/crypto/inline_crypt.c some more]
      Suggested-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Acked-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: "Serge E. Hallyn" <serge@hallyn.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: "Jason A . Donenfeld" <Jason@zx2c4.com>
      Link: http://lkml.kernel.org/r/20200616154311.12314-3-longman@redhat.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      453431a5
  28. 31 7月, 2020 1 次提交
  29. 31 5月, 2020 1 次提交