Skip to content

Commit

Permalink
Merge tag 'wireless-next-2023-05-12' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/wireless/wireless-next

Kalle valo says:

====================
wireless-next patches for v6.5

The first pull request for v6.5 and only driver changes this time.
rtl8xxxu has been making lots of progress lately and now has AP mode
support.

Major changes:

rtl8xxxu

* AP mode support, initially only for rtl8188f

rtw89

* provide RSSI, EVN and SNR statistics via debugfs

* support U-NII-4 channels on 5 GHz band
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 15, 2023
2 parents befcc1f + 8130e94 commit 6d4ff8a
Show file tree
Hide file tree
Showing 43 changed files with 3,488 additions and 300 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/marvell/mwifiex/11n.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ static inline u8 mwifiex_space_avail_for_new_ba_stream(
{
struct mwifiex_private *priv;
u8 i;
u32 ba_stream_num = 0, ba_stream_max;
size_t ba_stream_num = 0, ba_stream_max;

ba_stream_max = MWIFIEX_MAX_TX_BASTREAM_SUPPORTED;

for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i];
if (priv)
ba_stream_num += mwifiex_wmm_list_len(
ba_stream_num += list_count_nodes(
&priv->tx_ba_stream_tbl_ptr);
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/marvell/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2187,9 +2187,9 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,

if (nd_config) {
adapter->nd_info =
kzalloc(sizeof(struct cfg80211_wowlan_nd_match) +
sizeof(struct cfg80211_wowlan_nd_match *) *
scan_rsp->number_of_sets, GFP_ATOMIC);
kzalloc(struct_size(adapter->nd_info, matches,
scan_rsp->number_of_sets),
GFP_ATOMIC);

if (adapter->nd_info)
adapter->nd_info->n_matches = scan_rsp->number_of_sets;
Expand Down
15 changes: 0 additions & 15 deletions drivers/net/wireless/marvell/mwifiex/wmm.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,6 @@ mwifiex_get_tid(struct mwifiex_ra_list_tbl *ptr)
return skb->priority;
}

/*
* This function gets the length of a list.
*/
static inline int
mwifiex_wmm_list_len(struct list_head *head)
{
struct list_head *pos;
int count = 0;

list_for_each(pos, head)
++count;

return count;
}

/*
* This function checks if a RA list is empty or not.
*/
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/mediatek/mt7601u/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ void mt7601u_init_debugfs(struct mt7601u_dev *dev)
struct dentry *dir;

dir = debugfs_create_dir("mt7601u", dev->hw->wiphy->debugfsdir);
if (!dir)
return;

debugfs_create_u8("temperature", 0400, dir, &dev->raw_temp);
debugfs_create_u32("temp_mode", 0400, dir, &dev->temp_mode);
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/microchip/wilc1000/hif.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ void *wilc_parse_join_bss_param(struct cfg80211_bss *bss,
int rsn_ie_len = sizeof(struct element) + rsn_ie[1];
int offset = 8;

param->mode_802_11i = 2;
param->rsn_found = true;

/* extract RSN capabilities */
if (offset < rsn_ie_len) {
/* skip over pairwise suites */
Expand All @@ -494,11 +497,8 @@ void *wilc_parse_join_bss_param(struct cfg80211_bss *bss,
/* skip over authentication suites */
offset += (rsn_ie[offset] * 4) + 2;

if (offset + 1 < rsn_ie_len) {
param->mode_802_11i = 2;
param->rsn_found = true;
if (offset + 1 < rsn_ie_len)
memcpy(param->rsn_cap, &rsn_ie[offset], 2);
}
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/microchip/wilc1000/hif.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ enum {
WILC_GET_CFG
};

#define WILC_MAX_ASSOC_RESP_FRAME_SIZE 256

struct rf_info {
u8 link_speed;
s8 rssi;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/microchip/wilc1000/wlan_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct wilc_cfg_str {
struct wilc_cfg_str_vals {
u8 mac_address[7];
u8 firmware_version[129];
u8 assoc_rsp[256];
u8 assoc_rsp[WILC_MAX_ASSOC_RESP_FRAME_SIZE];
};

struct wilc_cfg {
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/microchip/wilc1000/wlan_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <linux/netdevice.h>
#include "fw.h"

#define WILC_MAX_ASSOC_RESP_FRAME_SIZE 512

/********************************************
*
* Wlan Configuration ID
Expand Down
37 changes: 27 additions & 10 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,9 @@ struct rtl8xxxu_rfregs {
#define H2C_JOIN_BSS_DISCONNECT 0
#define H2C_JOIN_BSS_CONNECT 1

#define H2C_MACID_ROLE_STA 1
#define H2C_MACID_ROLE_AP 2

/*
* H2C (firmware) commands differ between the older generation chips
* 8188[cr]u, 819[12]cu, and 8723au, and the more recent chips 8723bu,
Expand Down Expand Up @@ -1727,6 +1730,8 @@ struct rtl8xxxu_cfo_tracking {
};

#define RTL8XXXU_HW_LED_CONTROL 2
#define RTL8XXXU_MAX_MAC_ID_NUM 128
#define RTL8XXXU_BC_MC_MACID 0

struct rtl8xxxu_priv {
struct ieee80211_hw *hw;
Expand Down Expand Up @@ -1850,6 +1855,7 @@ struct rtl8xxxu_priv {
struct delayed_work ra_watchdog;
struct work_struct c2hcmd_work;
struct sk_buff_head c2hcmd_queue;
struct work_struct update_beacon_work;
struct rtl8xxxu_btcoex bt_coex;
struct rtl8xxxu_ra_report ra_report;
struct rtl8xxxu_cfo_tracking cfo_tracking;
Expand All @@ -1858,6 +1864,14 @@ struct rtl8xxxu_priv {
bool led_registered;
char led_name[32];
struct led_classdev led_cdev;
DECLARE_BITMAP(mac_id_map, RTL8XXXU_MAX_MAC_ID_NUM);
};

struct rtl8xxxu_sta_info {
struct ieee80211_sta *sta;
struct ieee80211_vif *vif;

u8 macid;
};

struct rtl8xxxu_rx_urb {
Expand Down Expand Up @@ -1902,15 +1916,16 @@ struct rtl8xxxu_fileops {
void (*set_tx_power) (struct rtl8xxxu_priv *priv, int channel,
bool ht40);
void (*update_rate_mask) (struct rtl8xxxu_priv *priv,
u32 ramask, u8 rateid, int sgi, int txbw_40mhz);
u32 ramask, u8 rateid, int sgi, int txbw_40mhz,
u8 macid);
void (*report_connect) (struct rtl8xxxu_priv *priv,
u8 macid, bool connect);
u8 macid, u8 role, bool connect);
void (*report_rssi) (struct rtl8xxxu_priv *priv, u8 macid, u8 rssi);
void (*fill_txdesc) (struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
struct ieee80211_tx_info *tx_info,
struct rtl8xxxu_txdesc32 *tx_desc, bool sgi,
bool short_preamble, bool ampdu_enable,
u32 rts_rate);
u32 rts_rate, u8 macid);
void (*set_crystal_cap) (struct rtl8xxxu_priv *priv, u8 crystal_cap);
s8 (*cck_rssi) (struct rtl8xxxu_priv *priv, struct rtl8723au_phy_stats *phy_stats);
int (*led_classdev_brightness_set) (struct led_classdev *led_cdev,
Expand All @@ -1928,6 +1943,8 @@ struct rtl8xxxu_fileops {
u8 init_reg_hmtfr:1;
u8 ampdu_max_time;
u8 ustime_tsf_edca;
u8 supports_ap:1;
u16 max_macid_num;
u32 adda_1t_init;
u32 adda_1t_path_on;
u32 adda_2t_path_on_a;
Expand Down Expand Up @@ -2021,13 +2038,13 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw);
void rtl8xxxu_gen1_usb_quirks(struct rtl8xxxu_priv *priv);
void rtl8xxxu_gen2_usb_quirks(struct rtl8xxxu_priv *priv);
void rtl8xxxu_update_rate_mask(struct rtl8xxxu_priv *priv,
u32 ramask, u8 rateid, int sgi, int txbw_40mhz);
u32 ramask, u8 rateid, int sgi, int txbw_40mhz, u8 macid);
void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv,
u32 ramask, u8 rateid, int sgi, int txbw_40mhz);
u32 ramask, u8 rateid, int sgi, int txbw_40mhz, u8 macid);
void rtl8xxxu_gen1_report_connect(struct rtl8xxxu_priv *priv,
u8 macid, bool connect);
u8 macid, u8 role, bool connect);
void rtl8xxxu_gen2_report_connect(struct rtl8xxxu_priv *priv,
u8 macid, bool connect);
u8 macid, u8 role, bool connect);
void rtl8xxxu_gen1_report_rssi(struct rtl8xxxu_priv *priv, u8 macid, u8 rssi);
void rtl8xxxu_gen2_report_rssi(struct rtl8xxxu_priv *priv, u8 macid, u8 rssi);
void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv);
Expand Down Expand Up @@ -2056,17 +2073,17 @@ void rtl8xxxu_fill_txdesc_v1(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
struct ieee80211_tx_info *tx_info,
struct rtl8xxxu_txdesc32 *tx_desc, bool sgi,
bool short_preamble, bool ampdu_enable,
u32 rts_rate);
u32 rts_rate, u8 macid);
void rtl8xxxu_fill_txdesc_v2(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
struct ieee80211_tx_info *tx_info,
struct rtl8xxxu_txdesc32 *tx_desc32, bool sgi,
bool short_preamble, bool ampdu_enable,
u32 rts_rate);
u32 rts_rate, u8 macid);
void rtl8xxxu_fill_txdesc_v3(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
struct ieee80211_tx_info *tx_info,
struct rtl8xxxu_txdesc32 *tx_desc32, bool sgi,
bool short_preamble, bool ampdu_enable,
u32 rts_rate);
u32 rts_rate, u8 macid);
void rtl8723bu_set_ps_tdma(struct rtl8xxxu_priv *priv,
u8 arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5);
void rtl8723bu_phy_init_antenna_selection(struct rtl8xxxu_priv *priv);
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,8 @@ static void rtl8188e_arfb_refresh(struct rtl8xxxu_ra_info *ra)

static void
rtl8188e_update_rate_mask(struct rtl8xxxu_priv *priv,
u32 ramask, u8 rateid, int sgi, int txbw_40mhz)
u32 ramask, u8 rateid, int sgi, int txbw_40mhz,
u8 macid)
{
struct rtl8xxxu_ra_info *ra = &priv->ra_info;

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,8 @@ struct rtl8xxxu_fileops rtl8188fu_fops = {
.init_reg_hmtfr = 1,
.ampdu_max_time = 0x70,
.ustime_tsf_edca = 0x28,
.supports_ap = 1,
.max_macid_num = 16,
.adda_1t_init = 0x03c00014,
.adda_1t_path_on = 0x03c00014,
.trxff_boundary = 0x3f7f,
Expand Down
Loading

0 comments on commit 6d4ff8a

Please sign in to comment.