1. 25 8月, 2022 1 次提交
  2. 22 7月, 2022 6 次提交
  3. 15 7月, 2022 7 次提交
  4. 01 7月, 2022 5 次提交
  5. 29 6月, 2022 1 次提交
  6. 20 6月, 2022 8 次提交
    • S
      wifi: mac80211: return a beacon for a specific link · 6e8912a5
      Shaul Triebitz 提交于
      Pass the link id through to the get_beacon and return
      the beacon for a specific link id.
      Signed-off-by: NShaul Triebitz <shaul.triebitz@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6e8912a5
    • J
      wifi: mac80211: add MLO link ID to TX frame metadata · 69d41b5a
      Johannes Berg 提交于
      Take a few bits out of the control.flags to add the link ID
      to TX frame metadata, so drivers don't need to look it up
      by the address themselves. Implement that lookup where it's
      needed, for internal frame TX, and set it to "unspecified"
      for data transmissions.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      69d41b5a
    • J
      wifi: mac80211: remove band from TX info in MLO · eef25a66
      Johannes Berg 提交于
      If the interface is an MLD, then we don't know which band
      the frame will be transmitted on, and we don't know how to
      look up the band. Set the band information to zero in that
      case, the driver cannot rely on it anyway.
      
      No longer inline ieee80211_tx_skb_tid() since it's even
      bigger now.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      eef25a66
    • J
      wifi: mac80211: tx: simplify chanctx_conf handling · 27f852de
      Johannes Berg 提交于
      In ieee80211_build_hdr() we do the same thing for all
      interface types except for AP_VLAN, but we can simplify
      the code by pulling the common thing in front of the
      switch and overriding it for AP_VLAN. This will also
      simplify the code for MLD here later.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      27f852de
    • J
      wifi: mac80211: status: look up band only where needed · e5c0ee01
      Johannes Berg 提交于
      For MLD, we might eventually not really know the band on status,
      but some code assumes it's there. Move the sband lookup deep to
      the code that actually needs it, to make it clear where exactly
      it's needed and for what purposes.
      
      For rate control, at least initially we won't support it in MLO,
      so that won't be an issue.
      
      For TX monitoring, we may have to elide the rate and/or rely on
      ieee80211_tx_status_ext() for rate information.
      
      This also simplifies the function prototypes.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e5c0ee01
    • J
      wifi: mac80211: reorg some iface data structs for MLD · bfd8403a
      Johannes Berg 提交于
      Start reorganizing interface related data structures toward
      MLD. The most complex part here is for the keys, since we
      have to split the various kinds of GTKs off to the link but
      still need to use (for WEP) the other keys as a fallback
      even for multicast frames.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      bfd8403a
    • J
      wifi: mac80211: move interface config to new struct · f276e20b
      Johannes Berg 提交于
      We'll use bss_conf for per-link configuration later, so
      move out all the non-link-specific data out into a new
      struct ieee80211_vif_cfg used in the vif.
      
      Some adjustments were done with the following spatch:
      
          @@
          expression sdata;
          struct ieee80211_vif *vifp;
          identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator };
          @@
          (
          -sdata->vif.bss_conf.var
          +sdata->vif.cfg.var
          |
          -vifp->bss_conf.var
          +vifp->cfg.var
          )
      
          @bss_conf@
          struct ieee80211_bss_conf *bss_conf;
          identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator };
          @@
          -bss_conf->var
          +vif_cfg->var
      
      (though more manual fixups were needed, e.g. replacing
      "vif_cfg->" by "vif->cfg." in many files.)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f276e20b
    • J
      wifi: mac80211: move some future per-link data to bss_conf · d0a9123e
      Johannes Berg 提交于
      To add MLD, reuse the bss_conf structure later for per-link
      information, so move some things into it that are per link.
      
      Most transformations were done with the following spatch:
      
          @@
          expression sdata;
          identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color };
          @@
          -sdata->vif.var
          +sdata->vif.bss_conf.var
      
          @@
          struct ieee80211_vif *vif;
          identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color };
          @@
          -vif->var
          +vif->bss_conf.var
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d0a9123e
  7. 10 6月, 2022 1 次提交
  8. 05 5月, 2022 1 次提交
  9. 11 4月, 2022 1 次提交
    • S
      mac80211: prepare sta handling for MLO support · 046d2e7c
      Sriram R 提交于
      Currently in mac80211 each STA object is represented
      using sta_info datastructure with the associated
      STA specific information and drivers access ieee80211_sta
      part of it.
      
      With MLO (Multi Link Operation) support being added
      in 802.11be standard, though the association is logically
      with a single Multi Link capable STA, at the physical level
      communication can happen via different advertised
      links (uniquely identified by Channel, operating class,
      BSSID) and hence the need to handle multiple link
      STA parameters within a composite sta_info object
      called the MLD STA. The different link STA part of
      MLD STA are identified using the link address which can
      be same or different as the MLD STA address and unique
      link id based on the link vif.
      
      To support extension of such a model, the sta_info
      datastructure is modified to hold multiple link STA
      objects with link specific params currently within
      sta_info moved to this new structure. Similarly this is
      done for ieee80211_sta as well which will be accessed
      within mac80211 as well as by drivers, hence trivial
      driver changes are expected to support this.
      
      For current non MLO supported drivers, only one link STA
      is present and link information is accessed via 'deflink'
      member.
      
      For MLO drivers, we still need to define the APIs etc. to
      get the correct link ID and access the correct part of
      the station info.
      
      Currently in mac80211, all link STA info are accessed directly
      via deflink. These will be updated to access via link pointers
      indexed by link id with MLO support patches, with link id
      being 0 for non MLO supported cases.
      
      Except for couple of macro related changes, below spatch takes
      care of updating mac80211 and driver code to access to the
      link STA info via deflink.
      
        @ieee80211_sta@
        struct ieee80211_sta *s;
        struct sta_info *si;
        identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
        @@
      
        (
          s->
        -    var
        +    deflink.var
        |
         si->sta.
        -    var
        +    deflink.var
        )
      
        @sta_info@
        struct sta_info *si;
        identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
        @@
      
        (
          si->
        -    var
        +    deflink.var
        )
      Signed-off-by: NSriram R <quic_srirrama@quicinc.com>
      Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
      [remove MLO-drivers notes from commit message, not clear yet; run spatch]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      046d2e7c
  10. 15 3月, 2022 1 次提交
  11. 20 12月, 2021 1 次提交
  12. 26 11月, 2021 2 次提交
  13. 15 11月, 2021 1 次提交
  14. 21 10月, 2021 2 次提交
  15. 23 9月, 2021 2 次提交
    • L
      mac80211: limit injected vht mcs/nss in ieee80211_parse_tx_radiotap · 13cb6d82
      Lorenzo Bianconi 提交于
      Limit max values for vht mcs and nss in ieee80211_parse_tx_radiotap
      routine in order to fix the following warning reported by syzbot:
      
      WARNING: CPU: 0 PID: 10717 at include/net/mac80211.h:989 ieee80211_rate_set_vht include/net/mac80211.h:989 [inline]
      WARNING: CPU: 0 PID: 10717 at include/net/mac80211.h:989 ieee80211_parse_tx_radiotap+0x101e/0x12d0 net/mac80211/tx.c:2244
      Modules linked in:
      CPU: 0 PID: 10717 Comm: syz-executor.5 Not tainted 5.14.0-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:ieee80211_rate_set_vht include/net/mac80211.h:989 [inline]
      RIP: 0010:ieee80211_parse_tx_radiotap+0x101e/0x12d0 net/mac80211/tx.c:2244
      RSP: 0018:ffffc9000186f3e8 EFLAGS: 00010216
      RAX: 0000000000000618 RBX: ffff88804ef76500 RCX: ffffc900143a5000
      RDX: 0000000000040000 RSI: ffffffff888f478e RDI: 0000000000000003
      RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000100
      R10: ffffffff888f46f9 R11: 0000000000000000 R12: 00000000fffffff8
      R13: ffff88804ef7653c R14: 0000000000000001 R15: 0000000000000004
      FS:  00007fbf5718f700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000001b2de23000 CR3: 000000006a671000 CR4: 00000000001506f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
      Call Trace:
       ieee80211_monitor_select_queue+0xa6/0x250 net/mac80211/iface.c:740
       netdev_core_pick_tx+0x169/0x2e0 net/core/dev.c:4089
       __dev_queue_xmit+0x6f9/0x3710 net/core/dev.c:4165
       __bpf_tx_skb net/core/filter.c:2114 [inline]
       __bpf_redirect_no_mac net/core/filter.c:2139 [inline]
       __bpf_redirect+0x5ba/0xd20 net/core/filter.c:2162
       ____bpf_clone_redirect net/core/filter.c:2429 [inline]
       bpf_clone_redirect+0x2ae/0x420 net/core/filter.c:2401
       bpf_prog_eeb6f53a69e5c6a2+0x59/0x234
       bpf_dispatcher_nop_func include/linux/bpf.h:717 [inline]
       __bpf_prog_run include/linux/filter.h:624 [inline]
       bpf_prog_run include/linux/filter.h:631 [inline]
       bpf_test_run+0x381/0xa30 net/bpf/test_run.c:119
       bpf_prog_test_run_skb+0xb84/0x1ee0 net/bpf/test_run.c:663
       bpf_prog_test_run kernel/bpf/syscall.c:3307 [inline]
       __sys_bpf+0x2137/0x5df0 kernel/bpf/syscall.c:4605
       __do_sys_bpf kernel/bpf/syscall.c:4691 [inline]
       __se_sys_bpf kernel/bpf/syscall.c:4689 [inline]
       __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4689
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      RIP: 0033:0x4665f9
      
      Reported-by: syzbot+0196ac871673f0c20f68@syzkaller.appspotmail.com
      Fixes: 646e76bb ("mac80211: parse VHT info in injected frames")
      Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
      Link: https://lore.kernel.org/r/c26c3f02dcb38ab63b2f2534cb463d95ee81bb13.1632141760.git.lorenzo@kernel.orgSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
      13cb6d82
    • C
      mac80211: Fix ieee80211_amsdu_aggregate frag_tail bug · fe94bac6
      Chih-Kang Chang 提交于
      In ieee80211_amsdu_aggregate() set a pointer frag_tail point to the
      end of skb_shinfo(head)->frag_list, and use it to bind other skb in
      the end of this function. But when execute ieee80211_amsdu_aggregate()
      ->ieee80211_amsdu_realloc_pad()->pskb_expand_head(), the address of
      skb_shinfo(head)->frag_list will be changed. However, the
      ieee80211_amsdu_aggregate() not update frag_tail after call
      pskb_expand_head(). That will cause the second skb can't bind to the
      head skb appropriately.So we update the address of frag_tail to fix it.
      
      Fixes: 6e0456b5 ("mac80211: add A-MSDU tx support")
      Signed-off-by: NChih-Kang Chang <gary.chang@realtek.com>
      Signed-off-by: NZong-Zhe Yang <kevin_yang@realtek.com>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Link: https://lore.kernel.org/r/20210830073240.12736-1-pkshih@realtek.com
      [reword comment]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fe94bac6