1. 22 6月, 2022 1 次提交
  2. 30 5月, 2022 1 次提交
    • P
      wifi: rtw88: add a work to correct atomic scheduling warning of ::set_tim · 7711fe71
      Ping-Ke Shih 提交于
      The set_tim is supposed to be atomic, but we should download beacon
      context to firmware with a mutex lock. To avoid warning, do the thing in
      another work.
      
      BUG: scheduling while atomic: swapper/1/0/0x00000700
      Modules linked in:
      CPU: 1 PID: 0 Comm: swapper/1 Tainted: G        W         5.18.0-rc7-00703-g33b5ee09a0c1 #4
      Hardware name: Pine64 RK3566 Quartz64-A Board (DT)
      Call trace:
       dump_backtrace.part.0+0xc4/0xd0
       show_stack+0x14/0x60
       dump_stack_lvl+0x60/0x78
       dump_stack+0x14/0x2c
       __schedule_bug+0x5c/0x70
       __schedule+0x5c4/0x630
       schedule+0x44/0xb0
       schedule_preempt_disabled+0xc/0x14
       __mutex_lock.constprop.0+0x538/0x56c
       __mutex_lock_slowpath+0x10/0x20
       mutex_lock+0x54/0x60
       rtw_ops_set_tim+0x20/0x40
       __sta_info_recalc_tim+0x150/0x250
       sta_info_recalc_tim+0x10/0x20
       invoke_tx_handlers_early+0x4e4/0x5c0
       ieee80211_tx+0x78/0x110
       ieee80211_xmit+0x94/0xc0
       __ieee80211_subif_start_xmit+0x818/0xd20
       ieee80211_subif_start_xmit+0x44/0x2d0
       dev_hard_start_xmit+0xd0/0x150
       __dev_queue_xmit+0x250/0xb30
       dev_queue_xmit+0x10/0x20
       br_dev_queue_push_xmit+0x94/0x174
       br_forward_finish+0x90/0xa0
       __br_forward+0xc0/0x13c
       br_forward+0x108/0x134
       br_dev_xmit+0x1cc/0x3a4
       dev_hard_start_xmit+0xd0/0x150
       __dev_queue_xmit+0x250/0xb30
       dev_queue_xmit+0x10/0x20
       arp_xmit+0x6c/0x7c
       arp_send_dst+0x8c/0xc0
       arp_solicit+0xd4/0x1e0
       neigh_probe+0x58/0xa0
       neigh_timer_handler+0x27c/0x380
       call_timer_fn.constprop.0+0x20/0x80
       __run_timers.part.0+0x230/0x280
       run_timer_softirq+0x38/0x70
       _stext+0x104/0x278
       __irq_exit_rcu+0xa4/0xdc
       irq_exit_rcu+0xc/0x14
       el1_interrupt+0x34/0x50
       el1h_64_irq_handler+0x14/0x20
       el1h_64_irq+0x64/0x68
       arch_cpu_idle+0x14/0x20
       do_idle+0x208/0x290
       cpu_startup_entry+0x20/0x30
       secondary_start_kernel+0x130/0x144
       __secondary_switched+0x54/0x58
      
      Fixes: f2217968 ("rtw88: Add update beacon flow for AP mode")
      Reported-by: NOndřej Jirman <megi@xff.cz>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Tested-by: NOndřej Jirman <megi@xff.cz>
      Signed-off-by: NKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20220526051251.281905-1-pkshih@realtek.com
      7711fe71
  3. 02 5月, 2022 1 次提交
  4. 12 4月, 2022 2 次提交
  5. 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
  6. 06 4月, 2022 1 次提交
  7. 22 2月, 2022 1 次提交
  8. 21 2月, 2022 3 次提交
  9. 10 2月, 2022 1 次提交
  10. 31 1月, 2022 1 次提交
  11. 22 12月, 2021 2 次提交
    • Z
      rtw88: support SAR via kernel common API · 8704d0be
      Zong-Zhe Yang 提交于
      Register cfg80211_sar_capa with type NL80211_SAR_TYPE_POWER and four
      frequency ranges for configurations in unit of 0.25 dBm. And handle
      callback set_sar_specs.
      
      Originally, TX power has three main parameters, i.e. power base,
      power by rate, and power limit. The formula can be simply considered
      as TX power = power base + min(power by rate, power limit). With the
      support of SAR which can be treated as another power limit, there is
      one more parameter for TX power. And the formula will evolve into
      TX power = power base + min(power by rate, power limit, power sar).
      
      Besides, debugfs tx_pwr_tbl is also refined to show SAR information.
      The following is an example for the difference.
      Before supporting SAR,
      -----------------------------------
      ...
      path rate       pwr       base      (byr  lmt ) rem
         A  CCK_1M     66(0x42)   78  -12 (  12  -12)    0
         A  CCK_2M     66(0x42)   78  -12 (   8  -12)    0
      ...
      -----------------------------------
      After supporting SAR and making some configurations,
      -----------------------------------
      ...
      path rate       pwr       base      (byr  lmt  sar ) rem
         A  CCK_1M     62(0x3e)   78  -16 (  12  -12  -16)    0
         A  CCK_2M     62(0x3e)   78  -16 (   8  -12  -16)    0
      ...
      -----------------------------------
      Signed-off-by: NZong-Zhe Yang <kevin_yang@realtek.com>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20211220093656.65312-1-pkshih@realtek.com
      8704d0be
    • P
      rtw88: 8822c: add ieee80211_ops::hw_scan · 10d162b2
      Po-Hao Huang 提交于
      Declare this function allows us to use customized scanning policy.
      By doing so we can be more time efficient on each scan. In order to
      make existing coex mechanism work as usual, firmware notifies driver
      on each channel switch event, then decide antenna ownership based on
      the current channel/band. Do note that this new mechanism affects
      throughput more than the sw_scan we used to have, but the overall
      average throughput is not affected since each scan take less time.
      Since the firmware size is limited, we only support probe requests
      with custom IEs length under 128 bytes for now, if any user space
      tools requires more than that, we'll introduce related changes
      afterwards. For backward compatibility, we fallback to sw_scan when
      using older firmware that does not support this feature.
      Signed-off-by: NPo-Hao Huang <phhuang@realtek.com>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20211221085010.39421-1-pkshih@realtek.com
      10d162b2
  12. 21 12月, 2021 1 次提交
  13. 09 12月, 2021 1 次提交
  14. 05 10月, 2021 1 次提交
  15. 21 9月, 2021 2 次提交
    • Z
      rtw88: support adaptivity for ETSI/JP DFS region · 7285eb96
      Zong-Zhe Yang 提交于
      Add Energy Detected CCA (EDCCA) mechanism to detect energy on the channel.
      And EDCCA support adaptivity mode now. From MIC Ordinance Regulating Radio
      Equipment article 49.20, ETSI EN-300-328 and EN-301-893, the device should
      be able to dynamically pause TX activity when energy detected on the air.
      According to ETSI/JP DFS region, driver will set corresponding threshold
      and stop TX activity if the detected energy exceeds the threshold. For now,
      we support it on 8822b and 8822c first.
      
      By default, EDCCA mechanism is turned on. For ETSI/JP DFS region, it will
      turn to adaptivity mode. However, with adaptivity, if environment is too
      noisy, TX may often be halted. So, a debugfs for EDCCA is added. It can
      show what EDCCA mode is used currently. And EDCCA mechanism can be turned
      on/off through the debugfs while debugging.
      Signed-off-by: NZong-Zhe Yang <kevin_yang@realtek.com>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20210830072014.12250-4-pkshih@realtek.com
      7285eb96
    • Z
      rtw88: add regulatory strategy by chip type · 8d4fb399
      Zong-Zhe Yang 提交于
      Realtek chips can program a specific country domain on efuse to
      indicate what is the expected rtw_regulatory. For chips with a
      programmed country domain, we set REGULATORY_STRICT_REG to tell
      stack to consider follow-up regulatory_hint() as the superset of
      our regulatory rule. Besides, on driver side, only the request via
      NL80211_REGDOM_SET_BY_DRIVER, which matches programmed country
      domain, will be handled to keep rtw_regulatory unchanged.
      
      For worldwide roaming chips, i.e. ones without a specific programmed
      country domain, system of distro can set expected regulatory via
      NL80211_REGDOM_SET_BY_USER. With setting from it, rtw_regulatory
      will handle the requests only via NL80211_REGDOM_SET_BY_USER to
      follow setting from system of distro. REGULATORY_COUNTRY_IE_IGNORE
      will then be set to tell stack to ignore country IE for us. The
      restrictions mentioned above will remain until 00, i.e. worldwide,
      is set via NL80211_REGDOM_SET_BY_USER.
      
      On the other hand, for worldwide roamin chips, if there is no
      specific regulatory set via NL80211_REGDOM_SET_BY_USER, requests
      from all regulatory notifications will be handled by rtw_regulatory.
      And REGULATORY_COUNTRY_IE_IGNORE won't be set.
      Signed-off-by: NZong-Zhe Yang <kevin_yang@realtek.com>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20210830072014.12250-3-pkshih@realtek.com
      8d4fb399
  16. 22 8月, 2021 1 次提交
  17. 25 6月, 2021 1 次提交
  18. 22 6月, 2021 4 次提交
  19. 15 3月, 2021 3 次提交
  20. 12 2月, 2021 2 次提交
  21. 08 2月, 2021 1 次提交
  22. 15 1月, 2021 1 次提交
  23. 08 12月, 2020 1 次提交
  24. 03 12月, 2020 1 次提交
    • C
      rtw88: coex: add function to avoid cck lock · 8e6947dc
      Ching-Te Ku 提交于
      Some AP will not follow the power save request, or it cannot stop
      transmission until its queue is empty. It may bring the decreasing of
      data rate.
      
      WLAN firmware will count is the AP still leaked packet after power save
      handshake was done or not to enable WLAN slot extend mechanism.
      
      The extend WLAN slot mechanism will extend the WLAN slot after power save
      handshake, 5 ms per times, maximum is 5 times to received the leaked packet
      to avoid the rate lower down.
      
      And if the transmission was already locked at CCK rate.
      The extended WLAN slot can also increase the opportunity that we can
      received the CCK's long packet and be released from CCK rate.
      
      While BT multi-link status was finished, there is possible that it still
      has some packet remained for seconds. Add a timer to remain the multi-link
      mechanism to protect WLAN Rx.
      Signed-off-by: NChing-Te Ku <ku920601@realtek.com>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201126021059.11981-8-pkshih@realtek.com
      8e6947dc
  25. 11 11月, 2020 2 次提交
  26. 07 11月, 2020 3 次提交