ath1xk_common: update common athk files from upstream

Update ath1xk_common based on wireless-testing (wt-2023-05-11)
711dca0ca3d77414f8f346e564e9c8640147f40d (right after v6.4-rc1).

MFC after:	20 days
This commit is contained in:
Bjoern A. Zeeb 2023-05-20 00:38:12 +00:00
parent 734e82fe33
commit eb50aa680f
6 changed files with 21 additions and 19 deletions

View file

@ -22,6 +22,9 @@
#include <linux/if_ether.h>
#include <linux/spinlock.h>
#include <net/mac80211.h>
#if defined(__FreeBSD__)
#include <linux/stddef.h>
#endif
/*
* The key cache is used for h/w cipher state and also for
@ -96,11 +99,13 @@ struct ath_keyval {
u8 kv_type;
u8 kv_pad;
u16 kv_len;
u8 kv_val[16]; /* TK */
u8 kv_mic[8]; /* Michael MIC key */
u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
* supports both MIC keys in the same key cache entry;
* in that case, kv_mic is the RX key) */
struct_group(kv_values,
u8 kv_val[16]; /* TK */
u8 kv_mic[8]; /* Michael MIC key */
u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
* supports both MIC keys in the same key cache entry;
* in that case, kv_mic is the RX key) */
);
};
enum ath_cipher {

View file

@ -48,7 +48,7 @@
* the MAC address to obtain the relevant bits and compare the result with
* (frame's BSSID & mask) to see if they match.
*
* Simple example: on your card you have have two BSSes you have created with
* Simple example: on your card you have two BSSes you have created with
* BSSID-01 and BSSID-02. Lets assume BSSID-01 will not use the MAC address.
* There is another BSSID-03 but you are not part of it. For simplicity's sake,
* assuming only 4 bits for a mac address and for BSSIDs you can then have:

View file

@ -503,7 +503,7 @@ int ath_key_config(struct ath_common *common,
hk.kv_len = key->keylen;
if (key->keylen)
memcpy(hk.kv_val, key->key, key->keylen);
memcpy(&hk.kv_values, key->key, key->keylen);
if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
switch (vif->type) {

View file

@ -667,14 +667,14 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
/*
* Some users have reported their EEPROM programmed with
* 0x8000 or 0x0 set, this is not a supported regulatory
* domain but since we have more than one user with it we
* need a solution for them. We default to 0x64, which is
* the default Atheros world regulatory domain.
* 0x8000 set, this is not a supported regulatory domain
* but since we have more than one user with it we need
* a solution for them. We default to 0x64, which is the
* default Atheros world regulatory domain.
*/
static void ath_regd_sanitize(struct ath_regulatory *reg)
{
if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0)
if (reg->current_rd != COUNTRY_ERD_FLAG)
return;
printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
reg->current_rd = 0x64;

View file

@ -108,7 +108,7 @@ struct fft_sample_ath10k {
u8 avgpwr_db;
u8 max_exp;
u8 data[0];
u8 data[];
} __packed;
struct fft_sample_ath11k {
@ -123,7 +123,7 @@ struct fft_sample_ath11k {
__be32 tsf;
__be32 noise;
u8 data[0];
u8 data[];
} __packed;
#endif /* SPECTRAL_COMMON_H */

View file

@ -40,16 +40,13 @@ TRACE_EVENT(ath_log,
TP_STRUCT__entry(
__string(device, wiphy_name(wiphy))
__string(driver, KBUILD_MODNAME)
__dynamic_array(char, msg, ATH_DBG_MAX_LEN)
__vstring(msg, vaf->fmt, vaf->va)
),
TP_fast_assign(
__assign_str(device, wiphy_name(wiphy));
__assign_str(driver, KBUILD_MODNAME);
WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
ATH_DBG_MAX_LEN,
vaf->fmt,
*vaf->va) >= ATH_DBG_MAX_LEN);
__assign_vstr(msg, vaf->fmt, vaf->va);
),
TP_printk(