mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-21 06:24:12 +00:00
wireless fixes for v6.1
Second set of fixes for v6.1. Some fixes to char type usage in drivers, memory leaks in the stack and also functionality fixes. The rt2x00 char type fix is a larger (but still simple) commit, otherwise the fixes are small in size. -----BEGIN PGP SIGNATURE----- iQFFBAABCgAvFiEEiBjanGPFTz4PRfLobhckVSbrbZsFAmNjt5ERHGt2YWxvQGtl cm5lbC5vcmcACgkQbhckVSbrbZtkuQf8D3n5ugV/lWB0/YbpSWgWDzw2LyPYTcnh 1kqnCv/Zl7CDh/cwDpW1p0X7bMUv3bQpgVr/nWLMfgwygvWWR8GJENoaNOicCW0H dj3cofnrv7T2VfJgmNwxRdNTh7LJaolWiDu2AwVxFEr0UeiBgmJQLgLiwBqOmWIo RbpjUN7KvrUhZQsO1k9UtmOt5w1d/aOnopmP5EjoNnxEInA24g3V5yt51ykBoLMD ZNJwKGGzFM9qc5bQgGyGPfKlfNEjUYZCXvEBjZq+cg1OtwbYJRjtovyC5L/pVTBM vu8ORU7uLpJnCX15FvfE5cB32GtvJhShA9ExXQNsCSeXKZitHjlbnQ== =O94P -----END PGP SIGNATURE----- Merge tag 'wireless-2022-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.1 Second set of fixes for v6.1. Some fixes to char type usage in drivers, memory leaks in the stack and also functionality fixes. The rt2x00 char type fix is a larger (but still simple) commit, otherwise the fixes are small in size. * tag 'wireless-2022-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: ath11k: avoid deadlock during regulatory update in ath11k_regd_update() wifi: ath11k: Fix QCN9074 firmware boot on x86 wifi: mac80211: Set TWT Information Frame Disabled bit as 1 wifi: mac80211: Fix ack frame idr leak when mesh has no route wifi: mac80211: fix general-protection-fault in ieee80211_subif_start_xmit() wifi: brcmfmac: Fix potential buffer overflow in brcmf_fweh_event_worker() wifi: airo: do not assign -1 to unsigned char wifi: mac80211_hwsim: fix debugfs attribute ps with rc table support wifi: cfg80211: Fix bitrates overflow issue wifi: cfg80211: fix memory leak in query_regdb_file() wifi: mac80211: fix memory free error when registering wiphy fail wifi: cfg80211: silence a sparse RCU warning wifi: rt2x00: use explicitly signed or unsigned types ==================== Link: https://lore.kernel.org/r/20221103125315.04E57C433C1@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
91018bbcc6
25 changed files with 114 additions and 77 deletions
|
@ -27,7 +27,7 @@
|
|||
#define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 52
|
||||
#define ATH11K_QMI_CALDB_SIZE 0x480000
|
||||
#define ATH11K_QMI_BDF_EXT_STR_LENGTH 0x20
|
||||
#define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT 3
|
||||
#define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT 5
|
||||
|
||||
#define QMI_WLFW_REQUEST_MEM_IND_V01 0x0035
|
||||
#define QMI_WLFW_FW_MEM_READY_IND_V01 0x0037
|
||||
|
|
|
@ -287,11 +287,7 @@ int ath11k_regd_update(struct ath11k *ar)
|
|||
goto err;
|
||||
}
|
||||
|
||||
rtnl_lock();
|
||||
wiphy_lock(ar->hw->wiphy);
|
||||
ret = regulatory_set_wiphy_regd_sync(ar->hw->wiphy, regd_copy);
|
||||
wiphy_unlock(ar->hw->wiphy);
|
||||
rtnl_unlock();
|
||||
ret = regulatory_set_wiphy_regd(ar->hw->wiphy, regd_copy);
|
||||
|
||||
kfree(regd_copy);
|
||||
|
||||
|
|
|
@ -228,6 +228,10 @@ static void brcmf_fweh_event_worker(struct work_struct *work)
|
|||
brcmf_fweh_event_name(event->code), event->code,
|
||||
event->emsg.ifidx, event->emsg.bsscfgidx,
|
||||
event->emsg.addr);
|
||||
if (event->emsg.bsscfgidx >= BRCMF_MAX_IFS) {
|
||||
bphy_err(drvr, "invalid bsscfg index: %u\n", event->emsg.bsscfgidx);
|
||||
goto event_free;
|
||||
}
|
||||
|
||||
/* convert event message */
|
||||
emsg_be = &event->emsg;
|
||||
|
|
|
@ -5232,7 +5232,7 @@ static int get_wep_tx_idx(struct airo_info *ai)
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int set_wep_key(struct airo_info *ai, u16 index, const char *key,
|
||||
static int set_wep_key(struct airo_info *ai, u16 index, const u8 *key,
|
||||
u16 keylen, int perm, int lock)
|
||||
{
|
||||
static const unsigned char macaddr[ETH_ALEN] = { 0x01, 0, 0, 0, 0, 0 };
|
||||
|
@ -5283,7 +5283,7 @@ static void proc_wepkey_on_close(struct inode *inode, struct file *file)
|
|||
struct net_device *dev = pde_data(inode);
|
||||
struct airo_info *ai = dev->ml_priv;
|
||||
int i, rc;
|
||||
char key[16];
|
||||
u8 key[16];
|
||||
u16 index = 0;
|
||||
int j = 0;
|
||||
|
||||
|
@ -5311,12 +5311,22 @@ static void proc_wepkey_on_close(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
for (i = 0; i < 16*3 && data->wbuffer[i+j]; i++) {
|
||||
int val;
|
||||
|
||||
if (i % 3 == 2)
|
||||
continue;
|
||||
|
||||
val = hex_to_bin(data->wbuffer[i+j]);
|
||||
if (val < 0) {
|
||||
airo_print_err(ai->dev->name, "WebKey passed invalid key hex");
|
||||
return;
|
||||
}
|
||||
switch(i%3) {
|
||||
case 0:
|
||||
key[i/3] = hex_to_bin(data->wbuffer[i+j])<<4;
|
||||
key[i/3] = (u8)val << 4;
|
||||
break;
|
||||
case 1:
|
||||
key[i/3] |= hex_to_bin(data->wbuffer[i+j]);
|
||||
key[i/3] |= (u8)val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -910,6 +910,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
|
|||
struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
|
||||
struct sk_buff *skb;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_tx_info *cb;
|
||||
|
||||
if (!vp->assoc)
|
||||
return;
|
||||
|
@ -931,6 +932,10 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
|
|||
memcpy(hdr->addr2, mac, ETH_ALEN);
|
||||
memcpy(hdr->addr3, vp->bssid, ETH_ALEN);
|
||||
|
||||
cb = IEEE80211_SKB_CB(skb);
|
||||
cb->control.rates[0].count = 1;
|
||||
cb->control.rates[1].idx = -1;
|
||||
|
||||
rcu_read_lock();
|
||||
mac80211_hwsim_tx_frame(data->hw, skb,
|
||||
rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan);
|
||||
|
|
|
@ -1023,9 +1023,9 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
|
|||
{
|
||||
u32 reg, reg2;
|
||||
unsigned int i;
|
||||
char put_to_sleep;
|
||||
char bbp_state;
|
||||
char rf_state;
|
||||
bool put_to_sleep;
|
||||
u8 bbp_state;
|
||||
u8 rf_state;
|
||||
|
||||
put_to_sleep = (state != STATE_AWAKE);
|
||||
|
||||
|
@ -1561,7 +1561,7 @@ static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|||
{
|
||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||
struct channel_info *info;
|
||||
char *tx_power;
|
||||
u8 *tx_power;
|
||||
unsigned int i;
|
||||
|
||||
/*
|
||||
|
|
|
@ -939,7 +939,7 @@
|
|||
#define DEFAULT_TXPOWER 39
|
||||
|
||||
#define __CLAMP_TX(__txpower) \
|
||||
clamp_t(char, (__txpower), MIN_TXPOWER, MAX_TXPOWER)
|
||||
clamp_t(u8, (__txpower), MIN_TXPOWER, MAX_TXPOWER)
|
||||
|
||||
#define TXPOWER_FROM_DEV(__txpower) \
|
||||
((__CLAMP_TX(__txpower) - MAX_TXPOWER) + MIN_TXPOWER)
|
||||
|
|
|
@ -1176,9 +1176,9 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
|
|||
{
|
||||
u32 reg, reg2;
|
||||
unsigned int i;
|
||||
char put_to_sleep;
|
||||
char bbp_state;
|
||||
char rf_state;
|
||||
bool put_to_sleep;
|
||||
u8 bbp_state;
|
||||
u8 rf_state;
|
||||
|
||||
put_to_sleep = (state != STATE_AWAKE);
|
||||
|
||||
|
@ -1856,7 +1856,7 @@ static int rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|||
{
|
||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||
struct channel_info *info;
|
||||
char *tx_power;
|
||||
u8 *tx_power;
|
||||
unsigned int i;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1219,6 +1219,6 @@
|
|||
(((u8)(__txpower)) > MAX_TXPOWER) ? DEFAULT_TXPOWER : (__txpower)
|
||||
|
||||
#define TXPOWER_TO_DEV(__txpower) \
|
||||
clamp_t(char, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
clamp_t(u8, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
|
||||
#endif /* RT2500PCI_H */
|
||||
|
|
|
@ -984,9 +984,9 @@ static int rt2500usb_set_state(struct rt2x00_dev *rt2x00dev,
|
|||
u16 reg;
|
||||
u16 reg2;
|
||||
unsigned int i;
|
||||
char put_to_sleep;
|
||||
char bbp_state;
|
||||
char rf_state;
|
||||
bool put_to_sleep;
|
||||
u8 bbp_state;
|
||||
u8 rf_state;
|
||||
|
||||
put_to_sleep = (state != STATE_AWAKE);
|
||||
|
||||
|
@ -1663,7 +1663,7 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|||
{
|
||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||
struct channel_info *info;
|
||||
char *tx_power;
|
||||
u8 *tx_power;
|
||||
unsigned int i;
|
||||
|
||||
/*
|
||||
|
|
|
@ -839,6 +839,6 @@
|
|||
(((u8)(__txpower)) > MAX_TXPOWER) ? DEFAULT_TXPOWER : (__txpower)
|
||||
|
||||
#define TXPOWER_TO_DEV(__txpower) \
|
||||
clamp_t(char, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
clamp_t(u8, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
|
||||
#endif /* RT2500USB_H */
|
||||
|
|
|
@ -3372,10 +3372,10 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
|
|||
if (rt2x00_has_cap_bt_coexist(rt2x00dev)) {
|
||||
if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F)) {
|
||||
/* r55/r59 value array of channel 1~14 */
|
||||
static const char r55_bt_rev[] = {0x83, 0x83,
|
||||
static const u8 r55_bt_rev[] = {0x83, 0x83,
|
||||
0x83, 0x73, 0x73, 0x63, 0x53, 0x53,
|
||||
0x53, 0x43, 0x43, 0x43, 0x43, 0x43};
|
||||
static const char r59_bt_rev[] = {0x0e, 0x0e,
|
||||
static const u8 r59_bt_rev[] = {0x0e, 0x0e,
|
||||
0x0e, 0x0e, 0x0e, 0x0b, 0x0a, 0x09,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07};
|
||||
|
||||
|
@ -3384,7 +3384,7 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
|
|||
rt2800_rfcsr_write(rt2x00dev, 59,
|
||||
r59_bt_rev[idx]);
|
||||
} else {
|
||||
static const char r59_bt[] = {0x8b, 0x8b, 0x8b,
|
||||
static const u8 r59_bt[] = {0x8b, 0x8b, 0x8b,
|
||||
0x8b, 0x8b, 0x8b, 0x8b, 0x8a, 0x89,
|
||||
0x88, 0x88, 0x86, 0x85, 0x84};
|
||||
|
||||
|
@ -3392,10 +3392,10 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
|
|||
}
|
||||
} else {
|
||||
if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F)) {
|
||||
static const char r55_nonbt_rev[] = {0x23, 0x23,
|
||||
static const u8 r55_nonbt_rev[] = {0x23, 0x23,
|
||||
0x23, 0x23, 0x13, 0x13, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03};
|
||||
static const char r59_nonbt_rev[] = {0x07, 0x07,
|
||||
static const u8 r59_nonbt_rev[] = {0x07, 0x07,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x06, 0x05, 0x04, 0x04};
|
||||
|
||||
|
@ -3406,14 +3406,14 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
|
|||
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
||||
rt2x00_rt(rt2x00dev, RT5392) ||
|
||||
rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
static const char r59_non_bt[] = {0x8f, 0x8f,
|
||||
static const u8 r59_non_bt[] = {0x8f, 0x8f,
|
||||
0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
|
||||
0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
|
||||
|
||||
rt2800_rfcsr_write(rt2x00dev, 59,
|
||||
r59_non_bt[idx]);
|
||||
} else if (rt2x00_rt(rt2x00dev, RT5350)) {
|
||||
static const char r59_non_bt[] = {0x0b, 0x0b,
|
||||
static const u8 r59_non_bt[] = {0x0b, 0x0b,
|
||||
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0a,
|
||||
0x0a, 0x09, 0x08, 0x07, 0x07, 0x06};
|
||||
|
||||
|
@ -4035,23 +4035,23 @@ static void rt2800_iq_calibrate(struct rt2x00_dev *rt2x00dev, int channel)
|
|||
rt2800_bbp_write(rt2x00dev, 159, cal != 0xff ? cal : 0);
|
||||
}
|
||||
|
||||
static char rt2800_txpower_to_dev(struct rt2x00_dev *rt2x00dev,
|
||||
static s8 rt2800_txpower_to_dev(struct rt2x00_dev *rt2x00dev,
|
||||
unsigned int channel,
|
||||
char txpower)
|
||||
s8 txpower)
|
||||
{
|
||||
if (rt2x00_rt(rt2x00dev, RT3593) ||
|
||||
rt2x00_rt(rt2x00dev, RT3883))
|
||||
txpower = rt2x00_get_field8(txpower, EEPROM_TXPOWER_ALC);
|
||||
|
||||
if (channel <= 14)
|
||||
return clamp_t(char, txpower, MIN_G_TXPOWER, MAX_G_TXPOWER);
|
||||
return clamp_t(s8, txpower, MIN_G_TXPOWER, MAX_G_TXPOWER);
|
||||
|
||||
if (rt2x00_rt(rt2x00dev, RT3593) ||
|
||||
rt2x00_rt(rt2x00dev, RT3883))
|
||||
return clamp_t(char, txpower, MIN_A_TXPOWER_3593,
|
||||
return clamp_t(s8, txpower, MIN_A_TXPOWER_3593,
|
||||
MAX_A_TXPOWER_3593);
|
||||
else
|
||||
return clamp_t(char, txpower, MIN_A_TXPOWER, MAX_A_TXPOWER);
|
||||
return clamp_t(s8, txpower, MIN_A_TXPOWER, MAX_A_TXPOWER);
|
||||
}
|
||||
|
||||
static void rt3883_bbp_adjust(struct rt2x00_dev *rt2x00dev,
|
||||
|
@ -8530,7 +8530,7 @@ static void rt2800_r_calibration(struct rt2x00_dev *rt2x00dev)
|
|||
u8 bytevalue = 0;
|
||||
int rcalcode;
|
||||
u8 r_cal_code = 0;
|
||||
char d1 = 0, d2 = 0;
|
||||
s8 d1 = 0, d2 = 0;
|
||||
u8 rfvalue;
|
||||
u32 MAC_RF_BYPASS0, MAC_RF_CONTROL0, MAC_PWR_PIN_CFG;
|
||||
u32 maccfg;
|
||||
|
@ -8591,7 +8591,7 @@ static void rt2800_r_calibration(struct rt2x00_dev *rt2x00dev)
|
|||
if (bytevalue > 128)
|
||||
d1 = bytevalue - 256;
|
||||
else
|
||||
d1 = (char)bytevalue;
|
||||
d1 = (s8)bytevalue;
|
||||
rt2800_bbp_write(rt2x00dev, 22, 0x0);
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 35, 0x01);
|
||||
|
||||
|
@ -8601,7 +8601,7 @@ static void rt2800_r_calibration(struct rt2x00_dev *rt2x00dev)
|
|||
if (bytevalue > 128)
|
||||
d2 = bytevalue - 256;
|
||||
else
|
||||
d2 = (char)bytevalue;
|
||||
d2 = (s8)bytevalue;
|
||||
rt2800_bbp_write(rt2x00dev, 22, 0x0);
|
||||
|
||||
rcalcode = rt2800_calcrcalibrationcode(rt2x00dev, d1, d2);
|
||||
|
@ -8703,7 +8703,7 @@ static void rt2800_rxdcoc_calibration(struct rt2x00_dev *rt2x00dev)
|
|||
static u32 rt2800_do_sqrt_accumulation(u32 si)
|
||||
{
|
||||
u32 root, root_pre, bit;
|
||||
char i;
|
||||
s8 i;
|
||||
|
||||
bit = 1 << 15;
|
||||
root = 0;
|
||||
|
@ -9330,11 +9330,11 @@ static void rt2800_loft_search(struct rt2x00_dev *rt2x00dev, u8 ch_idx,
|
|||
u8 alc_idx, u8 dc_result[][RF_ALC_NUM][2])
|
||||
{
|
||||
u32 p0 = 0, p1 = 0, pf = 0;
|
||||
char idx0 = 0, idx1 = 0;
|
||||
s8 idx0 = 0, idx1 = 0;
|
||||
u8 idxf[] = {0x00, 0x00};
|
||||
u8 ibit = 0x20;
|
||||
u8 iorq;
|
||||
char bidx;
|
||||
s8 bidx;
|
||||
|
||||
rt2800_bbp_write(rt2x00dev, 158, 0xb0);
|
||||
rt2800_bbp_write(rt2x00dev, 159, 0x80);
|
||||
|
@ -9384,17 +9384,17 @@ static void rt2800_loft_search(struct rt2x00_dev *rt2x00dev, u8 ch_idx,
|
|||
static void rt2800_iq_search(struct rt2x00_dev *rt2x00dev, u8 ch_idx, u8 *ges, u8 *pes)
|
||||
{
|
||||
u32 p0 = 0, p1 = 0, pf = 0;
|
||||
char perr = 0, gerr = 0, iq_err = 0;
|
||||
char pef = 0, gef = 0;
|
||||
char psta, pend;
|
||||
char gsta, gend;
|
||||
s8 perr = 0, gerr = 0, iq_err = 0;
|
||||
s8 pef = 0, gef = 0;
|
||||
s8 psta, pend;
|
||||
s8 gsta, gend;
|
||||
|
||||
u8 ibit = 0x20;
|
||||
u8 first_search = 0x00, touch_neg_max = 0x00;
|
||||
char idx0 = 0, idx1 = 0;
|
||||
s8 idx0 = 0, idx1 = 0;
|
||||
u8 gop;
|
||||
u8 bbp = 0;
|
||||
char bidx;
|
||||
s8 bidx;
|
||||
|
||||
for (bidx = 5; bidx >= 1; bidx--) {
|
||||
for (gop = 0; gop < 2; gop++) {
|
||||
|
@ -10043,11 +10043,11 @@ static int rt2800_rf_lp_config(struct rt2x00_dev *rt2x00dev, bool btxcal)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char rt2800_lp_tx_filter_bw_cal(struct rt2x00_dev *rt2x00dev)
|
||||
static s8 rt2800_lp_tx_filter_bw_cal(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
unsigned int cnt;
|
||||
u8 bbp_val;
|
||||
char cal_val;
|
||||
s8 cal_val;
|
||||
|
||||
rt2800_bbp_dcoc_write(rt2x00dev, 0, 0x82);
|
||||
|
||||
|
@ -10079,7 +10079,7 @@ static void rt2800_bw_filter_calibration(struct rt2x00_dev *rt2x00dev,
|
|||
u8 rx_filter_target_20m = 0x27, rx_filter_target_40m = 0x31;
|
||||
int loop = 0, is_ht40, cnt;
|
||||
u8 bbp_val, rf_val;
|
||||
char cal_r32_init, cal_r32_val, cal_diff;
|
||||
s8 cal_r32_init, cal_r32_val, cal_diff;
|
||||
u8 saverfb5r00, saverfb5r01, saverfb5r03, saverfb5r04, saverfb5r05;
|
||||
u8 saverfb5r06, saverfb5r07;
|
||||
u8 saverfb5r08, saverfb5r17, saverfb5r18, saverfb5r19, saverfb5r20;
|
||||
|
@ -11550,9 +11550,9 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|||
{
|
||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||
struct channel_info *info;
|
||||
char *default_power1;
|
||||
char *default_power2;
|
||||
char *default_power3;
|
||||
s8 *default_power1;
|
||||
s8 *default_power2;
|
||||
s8 *default_power3;
|
||||
unsigned int i, tx_chains, rx_chains;
|
||||
u32 reg;
|
||||
|
||||
|
|
|
@ -32,10 +32,10 @@ struct rf_reg_pair {
|
|||
struct rt2800_drv_data {
|
||||
u8 calibration_bw20;
|
||||
u8 calibration_bw40;
|
||||
char rx_calibration_bw20;
|
||||
char rx_calibration_bw40;
|
||||
char tx_calibration_bw20;
|
||||
char tx_calibration_bw40;
|
||||
s8 rx_calibration_bw20;
|
||||
s8 rx_calibration_bw40;
|
||||
s8 tx_calibration_bw20;
|
||||
s8 tx_calibration_bw40;
|
||||
u8 bbp25;
|
||||
u8 bbp26;
|
||||
u8 txmixer_gain_24g;
|
||||
|
|
|
@ -117,12 +117,12 @@ int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
|
|||
const u16 buffer_length)
|
||||
{
|
||||
int status = 0;
|
||||
unsigned char *tb;
|
||||
u8 *tb;
|
||||
u16 off, len, bsize;
|
||||
|
||||
mutex_lock(&rt2x00dev->csr_mutex);
|
||||
|
||||
tb = (char *)buffer;
|
||||
tb = (u8 *)buffer;
|
||||
off = offset;
|
||||
len = buffer_length;
|
||||
while (len && !status) {
|
||||
|
@ -215,7 +215,7 @@ void rt2x00usb_register_read_async(struct rt2x00_dev *rt2x00dev,
|
|||
rd->cr.wLength = cpu_to_le16(sizeof(u32));
|
||||
|
||||
usb_fill_control_urb(urb, usb_dev, usb_rcvctrlpipe(usb_dev, 0),
|
||||
(unsigned char *)(&rd->cr), &rd->reg, sizeof(rd->reg),
|
||||
(u8 *)(&rd->cr), &rd->reg, sizeof(rd->reg),
|
||||
rt2x00usb_register_read_async_cb, rd);
|
||||
usb_anchor_urb(urb, rt2x00dev->anchor);
|
||||
if (usb_submit_urb(urb, GFP_ATOMIC) < 0) {
|
||||
|
|
|
@ -1709,7 +1709,7 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
|
|||
{
|
||||
u32 reg, reg2;
|
||||
unsigned int i;
|
||||
char put_to_sleep;
|
||||
bool put_to_sleep;
|
||||
|
||||
put_to_sleep = (state != STATE_AWAKE);
|
||||
|
||||
|
@ -2656,7 +2656,7 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|||
{
|
||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||
struct channel_info *info;
|
||||
char *tx_power;
|
||||
u8 *tx_power;
|
||||
unsigned int i;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1484,6 +1484,6 @@ struct hw_pairwise_ta_entry {
|
|||
(((u8)(__txpower)) > MAX_TXPOWER) ? DEFAULT_TXPOWER : (__txpower)
|
||||
|
||||
#define TXPOWER_TO_DEV(__txpower) \
|
||||
clamp_t(char, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
clamp_t(u8, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
|
||||
#endif /* RT61PCI_H */
|
||||
|
|
|
@ -1378,7 +1378,7 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
|
|||
{
|
||||
u32 reg, reg2;
|
||||
unsigned int i;
|
||||
char put_to_sleep;
|
||||
bool put_to_sleep;
|
||||
|
||||
put_to_sleep = (state != STATE_AWAKE);
|
||||
|
||||
|
@ -2090,7 +2090,7 @@ static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|||
{
|
||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||
struct channel_info *info;
|
||||
char *tx_power;
|
||||
u8 *tx_power;
|
||||
unsigned int i;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1063,6 +1063,6 @@ struct hw_pairwise_ta_entry {
|
|||
(((u8)(__txpower)) > MAX_TXPOWER) ? DEFAULT_TXPOWER : (__txpower)
|
||||
|
||||
#define TXPOWER_TO_DEV(__txpower) \
|
||||
clamp_t(char, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
clamp_t(u8, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
|
||||
#endif /* RT73USB_H */
|
||||
|
|
|
@ -1439,8 +1439,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
|
|||
ieee80211_led_exit(local);
|
||||
destroy_workqueue(local->workqueue);
|
||||
fail_workqueue:
|
||||
if (local->wiphy_ciphers_allocated)
|
||||
if (local->wiphy_ciphers_allocated) {
|
||||
kfree(local->hw.wiphy->cipher_suites);
|
||||
local->wiphy_ciphers_allocated = false;
|
||||
}
|
||||
kfree(local->int_scan_req);
|
||||
return result;
|
||||
}
|
||||
|
@ -1508,8 +1510,10 @@ void ieee80211_free_hw(struct ieee80211_hw *hw)
|
|||
mutex_destroy(&local->iflist_mtx);
|
||||
mutex_destroy(&local->mtx);
|
||||
|
||||
if (local->wiphy_ciphers_allocated)
|
||||
if (local->wiphy_ciphers_allocated) {
|
||||
kfree(local->hw.wiphy->cipher_suites);
|
||||
local->wiphy_ciphers_allocated = false;
|
||||
}
|
||||
|
||||
idr_for_each(&local->ack_status_frames,
|
||||
ieee80211_free_ack_frame, NULL);
|
||||
|
|
|
@ -710,7 +710,7 @@ int mesh_path_send_to_gates(struct mesh_path *mpath)
|
|||
void mesh_path_discard_frame(struct ieee80211_sub_if_data *sdata,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
kfree_skb(skb);
|
||||
ieee80211_free_txskb(&sdata->local->hw, skb);
|
||||
sdata->u.mesh.mshstats.dropped_frames_no_route++;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,6 +112,9 @@ ieee80211_s1g_rx_twt_setup(struct ieee80211_sub_if_data *sdata,
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* TWT Information not supported yet */
|
||||
twt->control |= IEEE80211_TWT_CONTROL_RX_DISABLED;
|
||||
|
||||
drv_add_twt_setup(sdata->local, sdata, &sta->sta, twt);
|
||||
out:
|
||||
ieee80211_s1g_send_twt_setup(sdata, mgmt->sa, sdata->vif.addr, twt);
|
||||
|
|
|
@ -4418,6 +4418,11 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
|
|||
if (likely(!is_multicast_ether_addr(eth->h_dest)))
|
||||
goto normal;
|
||||
|
||||
if (unlikely(!ieee80211_sdata_running(sdata))) {
|
||||
kfree_skb(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
if (unlikely(ieee80211_multicast_to_unicast(skb, dev))) {
|
||||
struct sk_buff_head queue;
|
||||
|
||||
|
|
|
@ -1084,6 +1084,8 @@ MODULE_FIRMWARE("regulatory.db");
|
|||
|
||||
static int query_regdb_file(const char *alpha2)
|
||||
{
|
||||
int err;
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
if (regdb)
|
||||
|
@ -1093,9 +1095,13 @@ static int query_regdb_file(const char *alpha2)
|
|||
if (!alpha2)
|
||||
return -ENOMEM;
|
||||
|
||||
return request_firmware_nowait(THIS_MODULE, true, "regulatory.db",
|
||||
err = request_firmware_nowait(THIS_MODULE, true, "regulatory.db",
|
||||
®_pdev->dev, GFP_KERNEL,
|
||||
(void *)alpha2, regdb_fw_cb);
|
||||
if (err)
|
||||
kfree(alpha2);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int reg_reload_regdb(void)
|
||||
|
|
|
@ -1674,7 +1674,9 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
|
|||
if (old == rcu_access_pointer(known->pub.ies))
|
||||
rcu_assign_pointer(known->pub.ies, new->pub.beacon_ies);
|
||||
|
||||
cfg80211_update_hidden_bsses(known, new->pub.beacon_ies, old);
|
||||
cfg80211_update_hidden_bsses(known,
|
||||
rcu_access_pointer(new->pub.beacon_ies),
|
||||
old);
|
||||
|
||||
if (old)
|
||||
kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
|
||||
|
|
|
@ -1557,10 +1557,12 @@ static u32 cfg80211_calculate_bitrate_eht(struct rate_info *rate)
|
|||
tmp = result;
|
||||
tmp *= SCALE;
|
||||
do_div(tmp, mcs_divisors[rate->mcs]);
|
||||
result = tmp;
|
||||
|
||||
/* and take NSS */
|
||||
result = (result * rate->nss) / 8;
|
||||
tmp *= rate->nss;
|
||||
do_div(tmp, 8);
|
||||
|
||||
result = tmp;
|
||||
|
||||
return result / 10000;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue