Zong-Zhe Yang
e885871ee8
rtw89: 8852c: support bb gain info
...
Add parser for bb gain table and configure bb gain table for 8852c.
While ctrl_ch, obtain bb gain error settings and write them to phy.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220414062027.62638-7-pkshih@realtek.com
2022-04-23 15:44:50 +03:00
Ping-Ke Shih
cc99eefa61
rtw89: 8852c: add BB initial and reset functions
...
chip_ops::bb_sethw is to initialize BB settings out of BB parameters
tables. Once switching channel or initialing, we do chip_ops::bb_reset to
reset hardware counters and states to make things in expectation.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220414062027.62638-6-pkshih@realtek.com
2022-04-23 15:44:50 +03:00
Ping-Ke Shih
c7845551bf
rtw89: 8852c: phy: configure TSSI bandedge
...
TSSI is used to manage TX power with thermal value as a factor. This patch
is to configure bandedge to TX proper waveform.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220414062027.62638-5-pkshih@realtek.com
2022-04-23 15:44:49 +03:00
Zong-Zhe Yang
c6badab206
rtw89: 8852c: add TX power track tables
...
TX power track tables are used to do TX power compensation according to
thermal value. In order to work in existing and new chip, add new 6G
entries, and change type from u8 to s8.
Internal version table is HALRF_027_00_031.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220414062027.62638-4-pkshih@realtek.com
2022-04-23 15:44:49 +03:00
Ping-Ke Shih
342475ac51
rtw89: 8852c: add TX power by rate and limit tables
...
TX power depends on rate, but must follow regulation for specific country.
Once asked to set channel, we configure registers according to these TX
power tables.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220414062027.62638-3-pkshih@realtek.com
2022-04-23 15:44:49 +03:00
Ping-Ke Shih
eefad995c2
rtw89: 8852c: add BB and RF parameters tables
...
These parameters are used to initialize BB and RF hardware when we are
going to bring up interface and start to transmit and receive.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220414062027.62638-2-pkshih@realtek.com
2022-04-23 15:44:49 +03:00
Minghao Chi
8e95061b5b
wl18xx: debugfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413093356.2538192-1-chi.minghao@zte.com.cn
2022-04-23 15:43:27 +03:00
Minghao Chi
e05c7ddfeb
wlcore: cmd: using pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220420090141.2588553-1-chi.minghao@zte.com.cn
2022-04-23 10:12:31 +03:00
Minghao Chi
00bfc8964f
wlcore: sdio: using pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220419110445.2574424-1-chi.minghao@zte.com.cn
2022-04-23 10:12:13 +03:00
Minghao Chi
d8e11976d8
wlcore: vendor_cmd: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413093939.2538825-1-chi.minghao@zte.com.cn
2022-04-23 10:11:58 +03:00
Minghao Chi
3447eebe60
wlcore: testmode: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413093502.2538316-1-chi.minghao@zte.com.cn
2022-04-23 10:11:34 +03:00
Minghao Chi
da8e909c99
wlcore: sysfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413093431.2538254-1-chi.minghao@zte.com.cn
2022-04-23 10:11:18 +03:00
Minghao Chi
ab589ac24e
wlcore: main: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220412091742.2533527-1-chi.minghao@zte.com.cn
2022-04-23 10:08:09 +03:00
Ping-Ke Shih
dc4246eff0
rtw89: pci: correct return value handling of rtw89_write16_mdio_mask()
...
Fix wrong checking statement. Fortunately, this wrong code doesn't affect
existing chip.
Fixes: 740c431c22 ("rtw89: pci: add register definition to rtw89_pci_info to generalize pci code")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413010804.8941-5-pkshih@realtek.com
2022-04-13 09:26:52 +03:00
Ping-Ke Shih
0a6f299b67
rtw89: configure security CAM for V1 chip
...
Add to configure security CAM while mac80211 calls set_key and del_key.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413010804.8941-4-pkshih@realtek.com
2022-04-13 09:26:52 +03:00
Ping-Ke Shih
04b5983ef7
rtw89: add new H2C to configure security CAM via DCTL for V1 chip
...
DCTL is short for D-MAC control that V1 chip uses this H2C to configure
security CAM. Implement the callers in next patch.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413010804.8941-3-pkshih@realtek.com
2022-04-13 09:26:51 +03:00
Ping-Ke Shih
aa7f148bed
rtw89: extend H2C of CMAC control info
...
In order to support new chip that has capability of 160M, we need new
format to fill new information, so add a new V1 ID for newer use. Since
most fields are the same, fill fields according to the function ID of chip.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220413010804.8941-2-pkshih@realtek.com
2022-04-13 09:26:51 +03:00
Kalle Valo
79649041ed
Merge branch 'wfx-move-out-of-staging'
...
This is an immutable branch shared between wireless-next and
staging-next for moving wfx driver out of staging to
drivers/net/wireless directory.
2022-04-12 17:31:44 +03:00
Lv Ruyi
780d9c48a0
rtlwifi: rtl8192cu: Fix spelling mistake "writting" -> "writing"
...
There are some spelling mistakes in the comments. Fix it.
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220411032458.2517551-1-lv.ruyi@zte.com.cn
2022-04-12 16:56:12 +03:00
Lv Ruyi
e8c241d4a7
rtlwifi: Fix spelling mistake "cacluated" -> "calculated"
...
There are some spelling mistakes in the comments. Fix it.
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408095803.2495336-1-lv.ruyi@zte.com.cn
2022-04-12 16:54:05 +03:00
Minghao Chi
b2268fd81c
wlcore: debugfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
...
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408081205.2494512-1-chi.minghao@zte.com.cn
2022-04-12 16:53:29 +03:00
Jimmy Hon
b9eb5f0742
rtw88: 8821ce: Disable PCIe ASPM L1 for 8821CE using chip ID
...
Make workaround work for other 8821CE devices with different PCI ID
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com >
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407075123.420696-3-honyuenkwun@gmail.com
2022-04-12 16:52:54 +03:00
Jimmy Hon
d528682620
rtw88: 8821ce: add support for device ID 0xb821
...
New device ID 0xb821 found on TP-Link T2E
Tested it with c821 driver. 2.4GHz and 5GHz works.
PCI id:
05:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b821
Subsystem: Realtek Semiconductor Co., Ltd. Device b821
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com >
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407075123.420696-2-honyuenkwun@gmail.com
2022-04-12 16:52:54 +03:00
Po-Hao Huang
ece31c93d4
rtw88: 8821c: fix debugfs rssi value
...
RSSI value per frame is reported to mac80211 but not maintained in
our own statistics, add it back to help us debug.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407095858.46807-7-pkshih@realtek.com
2022-04-12 16:52:06 +03:00
Ping-Ke Shih
f5207c1221
rtw88: do PHY calibration while starting AP
...
Calling calibration to yield expected PHY performance. We do this in STA
mode, so do this in AP mode as well.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407095858.46807-6-pkshih@realtek.com
2022-04-12 16:52:06 +03:00
Po-Hao Huang
f1c4dabfe6
rtw88: 8821c: Enable TX report for management frames
...
Without this setting, hardware would not report to driver even if
management frames are transmitted successfully. So we fix it.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407095858.46807-5-pkshih@realtek.com
2022-04-12 16:52:05 +03:00
Po-Hao Huang
f2217968ff
rtw88: Add update beacon flow for AP mode
...
To support stations in power saving mode, AP should notify stations
that there are frames buffered at the AP via TIM during beacons.
Driver used to transmit identical beacons that were downloaded to
hardware during the initiation phase. This beacon will become
obsolete over time.
If the beacon does not contain sufficient information, station would
not be able to percept that there is data to receive. Hence it won't
wake up and start the PS-poll procedure, this could lead to timeout
and/or lost data segments. In order to resolve this issue, driver will
now download beacon to hardware whenever the content is updated.
Enable hardware to update dtim_count for more efficiency, this reduces
the overhead of downloading beacon at every beacon interval since most
of the time only the dtim_count needs to be updated.
Change queue mapping for broadcast/multicast frames to high queue, so
these frames can be prioritized and sent when dtim_count is zero.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407095858.46807-4-pkshih@realtek.com
2022-04-12 16:52:05 +03:00
Po-Hao Huang
6723c0cde8
rtw88: fix incorrect frequency reported
...
We should only fill in frequency reported by firmware during scan.
Add this so frames won't be dropped by mac80211 due to frequency
mismatch.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407095858.46807-3-pkshih@realtek.com
2022-04-12 16:52:05 +03:00
Po-Hao Huang
c1edc86472
rtw88: add ieee80211:sta_rc_update ops
...
Adding this allows us to get notification when bitrate configuration
of the station changes. Update according parameters to firmware so
the rate control algorithm can work properly.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220407095858.46807-2-pkshih@realtek.com
2022-04-12 16:52:05 +03:00
Joe Perches
af5175acc8
rtw89: rtw89_ser: add const to struct state_ent and event_ent
...
Change the struct and the uses to const to reduce data.
$ size drivers/net/wireless/realtek/rtw89/ser.o* (x86-64 defconfig w/ rtw89)
text data bss dec hex filename
3741 8 0 3749 ea5 drivers/net/wireless/realtek/rtw89/ser.o.new
3437 312 0 3749 ea5 drivers/net/wireless/realtek/rtw89/ser.o.old
Signed-off-by: Joe Perches <joe@perches.com >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/2fd88e6119f62b968477ef9781abb1832d399fd6.camel@perches.com
2022-04-12 16:37:49 +03:00
Chia-Yuan Li
065cf8f977
rtw89: 8852c: add 8852c specific BT-coexistence initial function
...
Initialize registers to default values, such as PTA and GNT pin, and set
pin MUX according to number of antenna on hardware module.
Signed-off-by: Chia-Yuan Li <leo.li@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-10-pkshih@realtek.com
2022-04-12 16:34:39 +03:00
Johnson Lin
d264edb1cc
rtw89: Skip useless dig gain and igi related settings for 8852C
...
Separated DIG RX gain, IGI configurations from not supportted HW using
"support_igi" capability flag.
Signed-off-by: Johnson Lin <johnson.lin@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-9-pkshih@realtek.com
2022-04-12 16:34:39 +03:00
Chia-Yuan Li
ec356ffb29
rtw89: 8852c: disable firmware watchdog if CPU disabled
...
Disable watchdog timer to prevent it timeout suddenly.
Signed-off-by: Chia-Yuan Li <leo.li@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-8-pkshih@realtek.com
2022-04-12 16:34:39 +03:00
Ping-Ke Shih
1817519701
rtw89: reset BA CAM
...
BA CAM is used to react receiving AMPDU packets, so reset them to be
expected initial state.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-7-pkshih@realtek.com
2022-04-12 16:34:39 +03:00
Ping-Ke Shih
9a1ab283c7
rtw89: change station scheduler setting for hardware TX mode
...
The bit B_AX_SS_NONEMPTY_SS2FINFO_EN should be clear, because we configure
C-MAC as hardware TX/RX mode.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-6-pkshih@realtek.com
2022-04-12 16:34:38 +03:00
Ping-Ke Shih
9f405b0162
rtw89: ser: configure top ERR IMR for firmware to recover
...
Turn on ERR IMR, and then firmware can capture interrupts reflecting
errors to recover hardware states.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-5-pkshih@realtek.com
2022-04-12 16:34:38 +03:00
Chia-Yuan Li
d86369e937
rtw89: ser: configure C-MAC interrupt mask
...
Similarly, create functions to set specific C-MAC masks for firmware
recovery.
Signed-off-by: Chia-Yuan Li <leo.li@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-4-pkshih@realtek.com
2022-04-12 16:34:38 +03:00
Chia-Yuan Li
eeadcd2a47
rtw89: ser: configure D-MAC interrupt mask
...
These interrupts are used by firmware to recover hardware. Create
functions to set specific D-MAC masks to replace plain register settings.
Signed-off-by: Chia-Yuan Li <leo.li@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-3-pkshih@realtek.com
2022-04-12 16:34:38 +03:00
Zong-Zhe Yang
5ddfffd6da
rtw89: ser: fix unannotated fall-through
...
add `break` to fix warning of unannotated fall-through between switch
labels.
Fixes: 14f9f47900 ("rtw89: ser: control hci interrupts on/off by state")
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220408001353.17188-2-pkshih@realtek.com
2022-04-12 16:34:38 +03:00
Sriram R
046d2e7c50
mac80211: prepare sta handling for MLO support
...
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: Sriram 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: Johannes Berg <johannes.berg@intel.com >
2022-04-11 16:42:03 +02:00
Lorenzo Bianconi
6d945a33f2
mac80211: introduce BSS color collision detection
...
Add ieee80211_rx_check_bss_color_collision routine in order to introduce
BSS color collision detection in mac80211 if it is not supported in HW/FW
(e.g. for mt7915 chipset).
Add IEEE80211_HW_DETECTS_COLOR_COLLISION flag to let the driver notify
BSS color collision detection is supported in HW/FW. Set this for ath11k
which apparently didn't need this code.
Tested-by: Peter Chiu <Chui-Hao.Chiu@mediatek.com >
Co-developed-by: Ryder Lee <ryder.lee@mediatek.com >
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/a05eeeb1841a84560dc5aaec77894fcb69a54f27.1648204871.git.lorenzo@kernel.org
[clarify commit message a bit, move flag to mac80211]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2022-04-11 15:24:15 +02:00
Meng Tang
92bbf95df7
ipw2x00: use DEVICE_ATTR_*() macro
...
Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR,
which makes the code a bit shorter and easier to read.
Signed-off-by: Meng Tang <tangmeng@uniontech.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220406015444.14408-1-tangmeng@uniontech.com
2022-04-06 15:16:35 +03:00
Christophe Leroy
3223e922cc
orinoco: Prepare cleanup of powerpc's asm/prom.h
...
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/4e3bfd4ffe2ed6b713ddd99b69dcc3d96adffe34.1648833427.git.christophe.leroy@csgroup.eu
2022-04-06 15:16:08 +03:00
Haowen Bai
e8366bbabe
ipw2x00: Fix potential NULL dereference in libipw_xmit()
...
crypt and crypt->ops could be null, so we need to checking null
before dereference
Signed-off-by: Haowen Bai <baihaowen@meizu.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/1648797055-25730-1-git-send-email-baihaowen@meizu.com
2022-04-06 15:14:44 +03:00
Haowen Bai
11800d893b
b43: Fix assigning negative value to unsigned variable
...
fix warning reported by smatch:
drivers/net/wireless/broadcom/b43/phy_n.c:585 b43_nphy_adjust_lna_gain_table()
warn: assigning (-2) to unsigned variable '*(lna_gain[0])'
Signed-off-by: Haowen Bai <baihaowen@meizu.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/1648203315-28093-1-git-send-email-baihaowen@meizu.com
2022-04-06 15:14:23 +03:00
Haowen Bai
3f6b867559
b43legacy: Fix assigning negative value to unsigned variable
...
fix warning reported by smatch:
drivers/net/wireless/broadcom/b43legacy/phy.c:1181 b43legacy_phy_lo_b_measure()
warn: assigning (-772) to unsigned variable 'fval'
Signed-off-by: Haowen Bai <baihaowen@meizu.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/1648203433-8736-1-git-send-email-baihaowen@meizu.com
2022-04-06 15:13:08 +03:00
Chris Chiu
bd917b3d28
rtl8xxxu: fill up txrate info for gen1 chips
...
RTL8188CUS/RTL8192CU(gen1) don't support rate adaptive report hence
no real txrate info can be retrieved. The vendor driver reports the
highest rate in HT capabilities from the IEs to avoid empty txrate.
This commit initiates the txrate information with the highest supported
rate negotiated with AP. The gen2 chip keeps update the txrate from
the rate adaptive reports, and gen1 chips at least have non-NULL txrate
after associated.
Signed-off-by: Chris Chiu <chris.chiu@canonical.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220325035735.4745-3-chris.chiu@canonical.com
2022-04-06 15:12:47 +03:00
Chris Chiu
21338c5bde
rtl8xxxu: feed antenna information for cfg80211
...
Fill up the available TX/RX antenna so the iw commands can show
correct antenna information for different chips.
Signed-off-by: Chris Chiu <chris.chiu@canonical.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220325035735.4745-2-chris.chiu@canonical.com
2022-04-06 15:12:47 +03:00
Jakob Koschel
a0ff2a8719
rtlwifi: replace usage of found with dedicated list iterator variable
...
To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.
To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].
This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220324072124.62458-1-jakobkoschel@gmail.com
2022-04-06 15:11:58 +03:00
Ulf Hansson
92cadedd9d
brcmfmac: Avoid keeping power to SDIO card unless WOWL is used
...
Keeping the power to the SDIO card during system wide suspend, consumes
energy. Especially on battery driven embedded systems, this can be a
problem. Therefore, let's change the behaviour into allowing the SDIO card
to be powered off, unless WOWL is supported and enabled.
Note that, the downside from this change, is that during system resume the
SDIO card needs to be re-initialized and the FW must be re-programmed. Even
if this may take some time to complete, it should we worth it, rather than
draining the battery.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Tested-by: Christophe Roullier <christophe.roullier@foss.st.com >
Reviewed-by: Yann Gautier <yann.gautier@foss.st.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20220323083950.414783-1-ulf.hansson@linaro.org
2022-04-06 15:11:01 +03:00