Skip to content

Commit e469b62

Browse files
committed
Merge tag 'wireless-next-2023-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
Kalle Valo says: ==================== wireless-next patches for v6.3 Third set of patches for v6.3. This time only a set of small fixes submitted during the last day or two. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 1155a22 + 38ae319 commit e469b62

File tree

9 files changed

+43
-34
lines changed

9 files changed

+43
-34
lines changed

drivers/net/wireless/intel/iwlegacy/4965-mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4020,7 +4020,7 @@ il4965_hdl_alive(struct il_priv *il, struct il_rx_buf *rxb)
40204020

40214021
if (palive->ver_subtype == INITIALIZE_SUBTYPE) {
40224022
D_INFO("Initialization Alive received.\n");
4023-
memcpy(&il->card_alive_init, &pkt->u.alive_frame,
4023+
memcpy(&il->card_alive_init, &pkt->u.raw,
40244024
sizeof(struct il_init_alive_resp));
40254025
pwork = &il->init_alive_start;
40264026
} else {

drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,6 @@ static ssize_t iwl_dbgfs_bf_params_read(struct file *file,
438438
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
439439
}
440440

441-
static inline char *iwl_dbgfs_is_match(char *name, char *buf)
442-
{
443-
int len = strlen(name);
444-
445-
return !strncmp(name, buf, len) ? buf + len : NULL;
446-
}
447-
448441
static ssize_t iwl_dbgfs_os_device_timediff_read(struct file *file,
449442
char __user *user_buf,
450443
size_t count, loff_t *ppos)

drivers/net/wireless/realtek/rtl8xxxu/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
config RTL8XXXU
66
tristate "Realtek 802.11n USB wireless chips support"
77
depends on MAC80211 && USB
8+
depends on LEDS_CLASS
89
help
910
This is an alternative driver for various Realtek RTL8XXX
1011
parts written to utilize the Linux mac80211 stack.

drivers/net/wireless/realtek/rtw88/coex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4056,7 +4056,7 @@ void rtw_coex_display_coex_info(struct rtw_dev *rtwdev, struct seq_file *m)
40564056
rtwdev->stats.tx_throughput, rtwdev->stats.rx_throughput);
40574057
seq_printf(m, "%-40s = %u/ %u/ %u\n",
40584058
"IPS/ Low Power/ PS mode",
4059-
test_bit(RTW_FLAG_INACTIVE_PS, rtwdev->flags),
4059+
!test_bit(RTW_FLAG_POWERON, rtwdev->flags),
40604060
test_bit(RTW_FLAG_LEISURE_PS_DEEP, rtwdev->flags),
40614061
rtwdev->lps_conf.mode);
40624062

drivers/net/wireless/realtek/rtw88/mac.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)
273273
if (rtw_pwr_seq_parser(rtwdev, pwr_seq))
274274
return -EINVAL;
275275

276+
if (pwr_on)
277+
set_bit(RTW_FLAG_POWERON, rtwdev->flags);
278+
else
279+
clear_bit(RTW_FLAG_POWERON, rtwdev->flags);
280+
276281
return 0;
277282
}
278283

@@ -335,6 +340,11 @@ int rtw_mac_power_on(struct rtw_dev *rtwdev)
335340
ret = rtw_mac_power_switch(rtwdev, true);
336341
if (ret == -EALREADY) {
337342
rtw_mac_power_switch(rtwdev, false);
343+
344+
ret = rtw_mac_pre_system_cfg(rtwdev);
345+
if (ret)
346+
goto err;
347+
338348
ret = rtw_mac_power_switch(rtwdev, true);
339349
if (ret)
340350
goto err;

drivers/net/wireless/realtek/rtw88/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ enum rtw_flags {
356356
RTW_FLAG_RUNNING,
357357
RTW_FLAG_FW_RUNNING,
358358
RTW_FLAG_SCANNING,
359-
RTW_FLAG_INACTIVE_PS,
359+
RTW_FLAG_POWERON,
360360
RTW_FLAG_LEISURE_PS,
361361
RTW_FLAG_LEISURE_PS_DEEP,
362362
RTW_FLAG_DIG_DISABLE,

drivers/net/wireless/realtek/rtw88/ps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static int rtw_ips_pwr_up(struct rtw_dev *rtwdev)
2525

2626
int rtw_enter_ips(struct rtw_dev *rtwdev)
2727
{
28-
if (test_and_set_bit(RTW_FLAG_INACTIVE_PS, rtwdev->flags))
28+
if (!test_bit(RTW_FLAG_POWERON, rtwdev->flags))
2929
return 0;
3030

3131
rtw_coex_ips_notify(rtwdev, COEX_IPS_ENTER);
@@ -50,7 +50,7 @@ int rtw_leave_ips(struct rtw_dev *rtwdev)
5050
{
5151
int ret;
5252

53-
if (!test_and_clear_bit(RTW_FLAG_INACTIVE_PS, rtwdev->flags))
53+
if (test_bit(RTW_FLAG_POWERON, rtwdev->flags))
5454
return 0;
5555

5656
rtw_hci_link_ps(rtwdev, false);

drivers/net/wireless/realtek/rtw88/wow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ static int rtw_wow_leave_no_link_ps(struct rtw_dev *rtwdev)
592592
if (rtw_get_lps_deep_mode(rtwdev) != LPS_DEEP_MODE_NONE)
593593
rtw_leave_lps_deep(rtwdev);
594594
} else {
595-
if (test_bit(RTW_FLAG_INACTIVE_PS, rtwdev->flags)) {
595+
if (!test_bit(RTW_FLAG_POWERON, rtwdev->flags)) {
596596
rtw_wow->ips_enabled = true;
597597
ret = rtw_leave_ips(rtwdev);
598598
if (ret)

drivers/net/wireless/realtek/rtw89/core.c

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,6 +2435,7 @@ int rtw89_core_sta_add(struct rtw89_dev *rtwdev,
24352435
struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
24362436
struct rtw89_sta *rtwsta = (struct rtw89_sta *)sta->drv_priv;
24372437
int i;
2438+
int ret;
24382439

24392440
rtwsta->rtwdev = rtwdev;
24402441
rtwsta->rtwvif = rtwvif;
@@ -2459,6 +2460,21 @@ int rtw89_core_sta_add(struct rtw89_dev *rtwdev,
24592460
RTW89_MAX_MAC_ID_NUM);
24602461
if (rtwsta->mac_id == RTW89_MAX_MAC_ID_NUM)
24612462
return -ENOSPC;
2463+
2464+
ret = rtw89_mac_set_macid_pause(rtwdev, rtwsta->mac_id, false);
2465+
if (ret) {
2466+
rtw89_core_release_bit_map(rtwdev->mac_id_map, rtwsta->mac_id);
2467+
rtw89_warn(rtwdev, "failed to send h2c macid pause\n");
2468+
return ret;
2469+
}
2470+
2471+
ret = rtw89_fw_h2c_role_maintain(rtwdev, rtwvif, rtwsta,
2472+
RTW89_ROLE_CREATE);
2473+
if (ret) {
2474+
rtw89_core_release_bit_map(rtwdev->mac_id_map, rtwsta->mac_id);
2475+
rtw89_warn(rtwdev, "failed to send h2c role info\n");
2476+
return ret;
2477+
}
24622478
}
24632479

24642480
return 0;
@@ -2513,14 +2529,6 @@ int rtw89_core_sta_disconnect(struct rtw89_dev *rtwdev,
25132529
return ret;
25142530
}
25152531

2516-
if (vif->type == NL80211_IFTYPE_AP || sta->tdls) {
2517-
ret = rtw89_fw_h2c_role_maintain(rtwdev, rtwvif, rtwsta, RTW89_ROLE_REMOVE);
2518-
if (ret) {
2519-
rtw89_warn(rtwdev, "failed to send h2c role info\n");
2520-
return ret;
2521-
}
2522-
}
2523-
25242532
/* update cam aid mac_id net_type */
25252533
ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
25262534
if (ret) {
@@ -2541,18 +2549,6 @@ int rtw89_core_sta_assoc(struct rtw89_dev *rtwdev,
25412549
int ret;
25422550

25432551
if (vif->type == NL80211_IFTYPE_AP || sta->tdls) {
2544-
ret = rtw89_mac_set_macid_pause(rtwdev, rtwsta->mac_id, false);
2545-
if (ret) {
2546-
rtw89_warn(rtwdev, "failed to send h2c macid pause\n");
2547-
return ret;
2548-
}
2549-
2550-
ret = rtw89_fw_h2c_role_maintain(rtwdev, rtwvif, rtwsta, RTW89_ROLE_CREATE);
2551-
if (ret) {
2552-
rtw89_warn(rtwdev, "failed to send h2c role info\n");
2553-
return ret;
2554-
}
2555-
25562552
if (sta->tdls) {
25572553
ret = rtw89_cam_init_bssid_cam(rtwdev, rtwvif, bssid_cam, sta->addr);
25582554
if (ret) {
@@ -2622,13 +2618,22 @@ int rtw89_core_sta_remove(struct rtw89_dev *rtwdev,
26222618
{
26232619
struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
26242620
struct rtw89_sta *rtwsta = (struct rtw89_sta *)sta->drv_priv;
2621+
int ret;
26252622

26262623
if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
26272624
rtw89_btc_ntfy_role_info(rtwdev, rtwvif, rtwsta,
26282625
BTC_ROLE_MSTS_STA_DIS_CONN);
2629-
else if (vif->type == NL80211_IFTYPE_AP || sta->tdls)
2626+
else if (vif->type == NL80211_IFTYPE_AP || sta->tdls) {
26302627
rtw89_core_release_bit_map(rtwdev->mac_id_map, rtwsta->mac_id);
26312628

2629+
ret = rtw89_fw_h2c_role_maintain(rtwdev, rtwvif, rtwsta,
2630+
RTW89_ROLE_REMOVE);
2631+
if (ret) {
2632+
rtw89_warn(rtwdev, "failed to send h2c role info\n");
2633+
return ret;
2634+
}
2635+
}
2636+
26322637
return 0;
26332638
}
26342639

0 commit comments

Comments
 (0)