mac80211: Update to version 4.19.161-1
The removed patches were applied upstream. The changes to 357-mac80211-optimize-skb-resizing.patch are more complex. I think the patch already took care of the new changes done upstream. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
3f5fecfd33
commit
0a59e2a76e
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=mac80211
|
PKG_NAME:=mac80211
|
||||||
|
|
||||||
PKG_VERSION:=4.19.137-1
|
PKG_VERSION:=4.19.161-1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.137/
|
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.161/
|
||||||
PKG_HASH:=dc5eea4f77fc5c43b69e38f46fbf766880fa4bdeef83dcc8dcc85aa6b645bb7c
|
PKG_HASH:=01a4173ba180eb8ca67c898239d5accb49a3ea9aea51510e17d5c937d6e93f9a
|
||||||
|
|
||||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/wireless/reg.c
|
--- a/net/wireless/reg.c
|
||||||
+++ b/net/wireless/reg.c
|
+++ b/net/wireless/reg.c
|
||||||
@@ -3034,6 +3034,8 @@ void regulatory_hint_country_ie(struct w
|
@@ -3037,6 +3037,8 @@ void regulatory_hint_country_ie(struct w
|
||||||
enum environment_cap env = ENVIRON_ANY;
|
enum environment_cap env = ENVIRON_ANY;
|
||||||
struct regulatory_request *request = NULL, *lr;
|
struct regulatory_request *request = NULL, *lr;
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
/* IE len must be evenly divisible by 2 */
|
/* IE len must be evenly divisible by 2 */
|
||||||
if (country_ie_len & 0x01)
|
if (country_ie_len & 0x01)
|
||||||
return;
|
return;
|
||||||
@@ -3259,6 +3261,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
@@ -3262,6 +3264,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||||
|
|
||||||
void regulatory_hint_disconnect(void)
|
void regulatory_hint_disconnect(void)
|
||||||
{
|
{
|
||||||
|
@ -105,7 +105,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
|
|||||||
}
|
}
|
||||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||||
@@ -7378,12 +7378,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a
|
@@ -7391,12 +7391,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a
|
||||||
struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;
|
struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;
|
||||||
|
|
||||||
ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg);
|
ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg);
|
||||||
|
@ -475,7 +475,7 @@ v13:
|
|||||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||||
@@ -7198,6 +7198,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
@@ -7211,6 +7211,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -525,7 +525,7 @@ v13:
|
|||||||
static struct sk_buff *
|
static struct sk_buff *
|
||||||
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
||||||
enum wmi_sta_ps_mode psmode)
|
enum wmi_sta_ps_mode psmode)
|
||||||
@@ -8809,6 +8852,9 @@ static const struct wmi_ops wmi_ops = {
|
@@ -8822,6 +8865,9 @@ static const struct wmi_ops wmi_ops = {
|
||||||
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
@ -535,7 +535,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -8879,6 +8925,8 @@ static const struct wmi_ops wmi_10_1_ops
|
@@ -8892,6 +8938,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
@ -544,7 +544,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -8950,6 +8998,8 @@ static const struct wmi_ops wmi_10_2_ops
|
@@ -8963,6 +9011,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||||
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
@ -553,7 +553,7 @@ v13:
|
|||||||
/* .gen_pdev_enable_adaptive_cca not implemented */
|
/* .gen_pdev_enable_adaptive_cca not implemented */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -9020,6 +9070,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
@@ -9033,6 +9083,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||||
.gen_pdev_enable_adaptive_cca =
|
.gen_pdev_enable_adaptive_cca =
|
||||||
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
||||||
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
||||||
@ -562,7 +562,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -9099,6 +9151,8 @@ static const struct wmi_ops wmi_10_4_ops
|
@@ -9112,6 +9164,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||||
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
||||||
|
@ -67,7 +67,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
fwreq->bus_nr = devinfo->pdev->bus->number;
|
fwreq->bus_nr = devinfo->pdev->bus->number;
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||||
@@ -4215,6 +4215,7 @@ brcmf_sdio_prepare_fw_request(struct brc
|
@@ -4219,6 +4219,7 @@ brcmf_sdio_prepare_fw_request(struct brc
|
||||||
|
|
||||||
fwreq->items[BRCMF_SDIO_FW_CODE].type = BRCMF_FW_TYPE_BINARY;
|
fwreq->items[BRCMF_SDIO_FW_CODE].type = BRCMF_FW_TYPE_BINARY;
|
||||||
fwreq->items[BRCMF_SDIO_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM;
|
fwreq->items[BRCMF_SDIO_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM;
|
||||||
|
@ -27,7 +27,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
int credits_borrowed[BRCMF_FWS_FIFO_AC_VO + 1];
|
int credits_borrowed[BRCMF_FWS_FIFO_AC_VO + 1];
|
||||||
int deq_node_pos[BRCMF_FWS_FIFO_COUNT];
|
int deq_node_pos[BRCMF_FWS_FIFO_COUNT];
|
||||||
u32 fifo_credit_map;
|
u32 fifo_credit_map;
|
||||||
@@ -1241,6 +1242,9 @@ static void brcmf_fws_return_credits(str
|
@@ -1245,6 +1246,9 @@ static void brcmf_fws_return_credits(str
|
||||||
}
|
}
|
||||||
|
|
||||||
fws->fifo_credit[fifo] += credits;
|
fws->fifo_credit[fifo] += credits;
|
||||||
@ -37,7 +37,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void brcmf_fws_schedule_deq(struct brcmf_fws_info *fws)
|
static void brcmf_fws_schedule_deq(struct brcmf_fws_info *fws)
|
||||||
@@ -1599,19 +1603,21 @@ static int brcmf_fws_notify_credit_map(s
|
@@ -1603,19 +1607,21 @@ static int brcmf_fws_notify_credit_map(s
|
||||||
brcmf_err("event payload too small (%d)\n", e->datalen);
|
brcmf_err("event payload too small (%d)\n", e->datalen);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
}
|
}
|
||||||
brcmf_fws_schedule_deq(fws);
|
brcmf_fws_schedule_deq(fws);
|
||||||
brcmf_fws_unlock(fws);
|
brcmf_fws_unlock(fws);
|
||||||
@@ -2017,7 +2023,7 @@ static int brcmf_fws_borrow_credit(struc
|
@@ -2021,7 +2027,7 @@ static int brcmf_fws_borrow_credit(struc
|
||||||
}
|
}
|
||||||
|
|
||||||
for (lender_ac = 0; lender_ac <= BRCMF_FWS_FIFO_AC_VO; lender_ac++) {
|
for (lender_ac = 0; lender_ac <= BRCMF_FWS_FIFO_AC_VO; lender_ac++) {
|
||||||
@ -72,7 +72,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
fws->credits_borrowed[lender_ac]++;
|
fws->credits_borrowed[lender_ac]++;
|
||||||
fws->fifo_credit[lender_ac]--;
|
fws->fifo_credit[lender_ac]--;
|
||||||
if (fws->fifo_credit[lender_ac] == 0)
|
if (fws->fifo_credit[lender_ac] == 0)
|
||||||
@@ -2216,8 +2222,9 @@ static void brcmf_fws_dequeue_worker(str
|
@@ -2220,8 +2226,9 @@ static void brcmf_fws_dequeue_worker(str
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
skb = brcmf_fws_deq(fws, fifo);
|
skb = brcmf_fws_deq(fws, fifo);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
break;
|
break;
|
||||||
@@ -2228,7 +2235,7 @@ static void brcmf_fws_dequeue_worker(str
|
@@ -2232,7 +2239,7 @@ static void brcmf_fws_dequeue_worker(str
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((fifo == BRCMF_FWS_FIFO_AC_BE) &&
|
if ((fifo == BRCMF_FWS_FIFO_AC_BE) &&
|
||||||
|
@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
@@ -1459,9 +1459,10 @@ static int brcmf_fws_txstatus_suppressed
|
@@ -1463,9 +1463,10 @@ static int brcmf_fws_txstatus_suppressed
|
||||||
|
|
||||||
static int
|
static int
|
||||||
brcmf_fws_txs_process(struct brcmf_fws_info *fws, u8 flags, u32 hslot,
|
brcmf_fws_txs_process(struct brcmf_fws_info *fws, u8 flags, u32 hslot,
|
||||||
@ -30,7 +30,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
int ret;
|
int ret;
|
||||||
bool remove_from_hanger = true;
|
bool remove_from_hanger = true;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
@@ -1472,60 +1473,71 @@ brcmf_fws_txs_process(struct brcmf_fws_i
|
@@ -1476,60 +1477,71 @@ brcmf_fws_txs_process(struct brcmf_fws_i
|
||||||
brcmf_dbg(DATA, "flags %d\n", flags);
|
brcmf_dbg(DATA, "flags %d\n", flags);
|
||||||
|
|
||||||
if (flags == BRCMF_FWS_TXSTATUS_DISCARD)
|
if (flags == BRCMF_FWS_TXSTATUS_DISCARD)
|
||||||
@ -144,7 +144,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1551,7 +1563,8 @@ static int brcmf_fws_fifocreditback_indi
|
@@ -1555,7 +1567,8 @@ static int brcmf_fws_fifocreditback_indi
|
||||||
return BRCMF_FWS_RET_OK_SCHEDULE;
|
return BRCMF_FWS_RET_OK_SCHEDULE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
{
|
{
|
||||||
__le32 status_le;
|
__le32 status_le;
|
||||||
__le16 seq_le;
|
__le16 seq_le;
|
||||||
@@ -1560,23 +1573,31 @@ static int brcmf_fws_txstatus_indicate(s
|
@@ -1564,23 +1577,31 @@ static int brcmf_fws_txstatus_indicate(s
|
||||||
u32 genbit;
|
u32 genbit;
|
||||||
u8 flags;
|
u8 flags;
|
||||||
u16 seq;
|
u16 seq;
|
||||||
@ -189,7 +189,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
brcmf_fws_unlock(fws);
|
brcmf_fws_unlock(fws);
|
||||||
return BRCMF_FWS_RET_OK_NOSCHEDULE;
|
return BRCMF_FWS_RET_OK_NOSCHEDULE;
|
||||||
}
|
}
|
||||||
@@ -1892,8 +1913,6 @@ void brcmf_fws_hdrpull(struct brcmf_if *
|
@@ -1896,8 +1917,6 @@ void brcmf_fws_hdrpull(struct brcmf_if *
|
||||||
|
|
||||||
err = BRCMF_FWS_RET_OK_NOSCHEDULE;
|
err = BRCMF_FWS_RET_OK_NOSCHEDULE;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -198,7 +198,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
case BRCMF_FWS_TYPE_HOST_REORDER_RXPKTS:
|
case BRCMF_FWS_TYPE_HOST_REORDER_RXPKTS:
|
||||||
rd = (struct brcmf_skb_reorder_data *)skb->cb;
|
rd = (struct brcmf_skb_reorder_data *)skb->cb;
|
||||||
rd->reorder = data;
|
rd->reorder = data;
|
||||||
@@ -1916,7 +1935,8 @@ void brcmf_fws_hdrpull(struct brcmf_if *
|
@@ -1920,7 +1939,8 @@ void brcmf_fws_hdrpull(struct brcmf_if *
|
||||||
err = brcmf_fws_request_indicate(fws, type, data);
|
err = brcmf_fws_request_indicate(fws, type, data);
|
||||||
break;
|
break;
|
||||||
case BRCMF_FWS_TYPE_TXSTATUS:
|
case BRCMF_FWS_TYPE_TXSTATUS:
|
||||||
@ -208,7 +208,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
break;
|
break;
|
||||||
case BRCMF_FWS_TYPE_FIFO_CREDITBACK:
|
case BRCMF_FWS_TYPE_FIFO_CREDITBACK:
|
||||||
err = brcmf_fws_fifocreditback_indicate(fws, data);
|
err = brcmf_fws_fifocreditback_indicate(fws, data);
|
||||||
@@ -2005,7 +2025,7 @@ static void brcmf_fws_rollback_toq(struc
|
@@ -2009,7 +2029,7 @@ static void brcmf_fws_rollback_toq(struc
|
||||||
fws->stats.rollback_failed++;
|
fws->stats.rollback_failed++;
|
||||||
hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT);
|
hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT);
|
||||||
brcmf_fws_txs_process(fws, BRCMF_FWS_TXSTATUS_HOST_TOSSED,
|
brcmf_fws_txs_process(fws, BRCMF_FWS_TXSTATUS_HOST_TOSSED,
|
||||||
@ -217,7 +217,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
} else {
|
} else {
|
||||||
fws->stats.rollback_success++;
|
fws->stats.rollback_success++;
|
||||||
brcmf_fws_return_credits(fws, fifo, 1);
|
brcmf_fws_return_credits(fws, fifo, 1);
|
||||||
@@ -2476,7 +2496,8 @@ void brcmf_fws_bustxfail(struct brcmf_fw
|
@@ -2480,7 +2500,8 @@ void brcmf_fws_bustxfail(struct brcmf_fw
|
||||||
}
|
}
|
||||||
brcmf_fws_lock(fws);
|
brcmf_fws_lock(fws);
|
||||||
hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT);
|
hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT);
|
||||||
|
@ -209,7 +209,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
if (err) {
|
if (err) {
|
||||||
brcmf_err("error writing SBSDIO_FUNC1_CHIPCLKCSR\n");
|
brcmf_err("error writing SBSDIO_FUNC1_CHIPCLKCSR\n");
|
||||||
return;
|
return;
|
||||||
@@ -4067,7 +4114,7 @@ static void brcmf_sdio_firmware_callback
|
@@ -4071,7 +4118,7 @@ static void brcmf_sdio_firmware_callback
|
||||||
const struct firmware *code;
|
const struct firmware *code;
|
||||||
void *nvram;
|
void *nvram;
|
||||||
u32 nvram_len;
|
u32 nvram_len;
|
||||||
@ -218,7 +218,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
u8 devctl;
|
u8 devctl;
|
||||||
|
|
||||||
brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err);
|
brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err);
|
||||||
@@ -4101,8 +4148,11 @@ static void brcmf_sdio_firmware_callback
|
@@ -4105,8 +4152,11 @@ static void brcmf_sdio_firmware_callback
|
||||||
/* Force clocks on backplane to be sure F2 interrupt propagates */
|
/* Force clocks on backplane to be sure F2 interrupt propagates */
|
||||||
saveclk = brcmf_sdiod_readb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, &err);
|
saveclk = brcmf_sdiod_readb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, &err);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
@ -29,7 +29,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
@@ -4189,6 +4190,17 @@ static void brcmf_sdio_firmware_callback
|
@@ -4193,6 +4194,17 @@ static void brcmf_sdio_firmware_callback
|
||||||
CY_4373_F2_WATERMARK |
|
CY_4373_F2_WATERMARK |
|
||||||
SBSDIO_MESBUSYCTRL_ENAB, &err);
|
SBSDIO_MESBUSYCTRL_ENAB, &err);
|
||||||
break;
|
break;
|
||||||
|
@ -81,7 +81,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -4213,7 +4229,7 @@ static void brcmf_sdio_firmware_callback
|
@@ -4217,7 +4233,7 @@ static void brcmf_sdio_firmware_callback
|
||||||
} else {
|
} else {
|
||||||
/* Disable F2 again */
|
/* Disable F2 again */
|
||||||
sdio_disable_func(sdiod->func2);
|
sdio_disable_func(sdiod->func2);
|
||||||
@ -90,7 +90,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (brcmf_chip_sr_capable(bus->ci)) {
|
if (brcmf_chip_sr_capable(bus->ci)) {
|
||||||
@@ -4234,8 +4250,10 @@ static void brcmf_sdio_firmware_callback
|
@@ -4238,8 +4254,10 @@ static void brcmf_sdio_firmware_callback
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we didn't come up, turn off backplane clock */
|
/* If we didn't come up, turn off backplane clock */
|
||||||
@ -102,7 +102,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
sdio_release_host(sdiod->func1);
|
sdio_release_host(sdiod->func1);
|
||||||
|
|
||||||
@@ -4249,12 +4267,15 @@ static void brcmf_sdio_firmware_callback
|
@@ -4253,12 +4271,15 @@ static void brcmf_sdio_firmware_callback
|
||||||
err = brcmf_attach(sdiod->dev, sdiod->settings);
|
err = brcmf_attach(sdiod->dev, sdiod->settings);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
brcmf_err("brcmf_attach failed\n");
|
brcmf_err("brcmf_attach failed\n");
|
||||||
|
@ -690,7 +690,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
ifp->bsscfgidx, name, len);
|
ifp->bsscfgidx, name, len);
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
@@ -1259,6 +1259,7 @@ static int brcmf_fws_enq(struct brcmf_fw
|
@@ -1263,6 +1263,7 @@ static int brcmf_fws_enq(struct brcmf_fw
|
||||||
enum brcmf_fws_skb_state state, int fifo,
|
enum brcmf_fws_skb_state state, int fifo,
|
||||||
struct sk_buff *p)
|
struct sk_buff *p)
|
||||||
{
|
{
|
||||||
@ -698,7 +698,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
int prec = 2 * fifo;
|
int prec = 2 * fifo;
|
||||||
u32 *qfull_stat = &fws->stats.delayq_full_error;
|
u32 *qfull_stat = &fws->stats.delayq_full_error;
|
||||||
struct brcmf_fws_mac_descriptor *entry;
|
struct brcmf_fws_mac_descriptor *entry;
|
||||||
@@ -1271,7 +1272,7 @@ static int brcmf_fws_enq(struct brcmf_fw
|
@@ -1275,7 +1276,7 @@ static int brcmf_fws_enq(struct brcmf_fw
|
||||||
|
|
||||||
entry = brcmf_skbcb(p)->mac;
|
entry = brcmf_skbcb(p)->mac;
|
||||||
if (entry == NULL) {
|
if (entry == NULL) {
|
||||||
@ -707,7 +707,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1461,6 +1462,7 @@ static int
|
@@ -1465,6 +1466,7 @@ static int
|
||||||
brcmf_fws_txs_process(struct brcmf_fws_info *fws, u8 flags, u32 hslot,
|
brcmf_fws_txs_process(struct brcmf_fws_info *fws, u8 flags, u32 hslot,
|
||||||
u32 genbit, u16 seq, u8 compcnt)
|
u32 genbit, u16 seq, u8 compcnt)
|
||||||
{
|
{
|
||||||
@ -715,7 +715,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
u32 fifo;
|
u32 fifo;
|
||||||
u8 cnt = 0;
|
u8 cnt = 0;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -1485,14 +1487,14 @@ brcmf_fws_txs_process(struct brcmf_fws_i
|
@@ -1489,14 +1491,14 @@ brcmf_fws_txs_process(struct brcmf_fws_i
|
||||||
else if (flags == BRCMF_FWS_TXSTATUS_HOST_TOSSED)
|
else if (flags == BRCMF_FWS_TXSTATUS_HOST_TOSSED)
|
||||||
fws->stats.txs_host_tossed += compcnt;
|
fws->stats.txs_host_tossed += compcnt;
|
||||||
else
|
else
|
||||||
@ -733,7 +733,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
goto cont;
|
goto cont;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1616,12 +1618,13 @@ static int brcmf_fws_notify_credit_map(s
|
@@ -1620,12 +1622,13 @@ static int brcmf_fws_notify_credit_map(s
|
||||||
const struct brcmf_event_msg *e,
|
const struct brcmf_event_msg *e,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
@ -749,7 +749,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1685,6 +1688,7 @@ static void brcmf_rxreorder_get_skb_list
|
@@ -1689,6 +1692,7 @@ static void brcmf_rxreorder_get_skb_list
|
||||||
|
|
||||||
void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt)
|
void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
@ -757,7 +757,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
u8 *reorder_data;
|
u8 *reorder_data;
|
||||||
u8 flow_id, max_idx, cur_idx, exp_idx, end_idx;
|
u8 flow_id, max_idx, cur_idx, exp_idx, end_idx;
|
||||||
struct brcmf_ampdu_rx_reorder *rfi;
|
struct brcmf_ampdu_rx_reorder *rfi;
|
||||||
@@ -1699,7 +1703,7 @@ void brcmf_fws_rxreorder(struct brcmf_if
|
@@ -1703,7 +1707,7 @@ void brcmf_fws_rxreorder(struct brcmf_if
|
||||||
|
|
||||||
/* validate flags and flow id */
|
/* validate flags and flow id */
|
||||||
if (flags == 0xFF) {
|
if (flags == 0xFF) {
|
||||||
@ -766,7 +766,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
brcmf_netif_rx(ifp, pkt);
|
brcmf_netif_rx(ifp, pkt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1736,7 +1740,7 @@ void brcmf_fws_rxreorder(struct brcmf_if
|
@@ -1740,7 +1744,7 @@ void brcmf_fws_rxreorder(struct brcmf_if
|
||||||
flow_id, max_idx);
|
flow_id, max_idx);
|
||||||
rfi = kzalloc(buf_size, GFP_ATOMIC);
|
rfi = kzalloc(buf_size, GFP_ATOMIC);
|
||||||
if (rfi == NULL) {
|
if (rfi == NULL) {
|
||||||
@ -775,7 +775,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
brcmf_netif_rx(ifp, pkt);
|
brcmf_netif_rx(ifp, pkt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2000,6 +2004,7 @@ static u8 brcmf_fws_precommit_skb(struct
|
@@ -2004,6 +2008,7 @@ static u8 brcmf_fws_precommit_skb(struct
|
||||||
static void brcmf_fws_rollback_toq(struct brcmf_fws_info *fws,
|
static void brcmf_fws_rollback_toq(struct brcmf_fws_info *fws,
|
||||||
struct sk_buff *skb, int fifo)
|
struct sk_buff *skb, int fifo)
|
||||||
{
|
{
|
||||||
@ -783,7 +783,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
struct brcmf_fws_mac_descriptor *entry;
|
struct brcmf_fws_mac_descriptor *entry;
|
||||||
struct sk_buff *pktout;
|
struct sk_buff *pktout;
|
||||||
int qidx, hslot;
|
int qidx, hslot;
|
||||||
@@ -2013,11 +2018,11 @@ static void brcmf_fws_rollback_toq(struc
|
@@ -2017,11 +2022,11 @@ static void brcmf_fws_rollback_toq(struc
|
||||||
|
|
||||||
pktout = brcmu_pktq_penq_head(&entry->psq, qidx, skb);
|
pktout = brcmu_pktq_penq_head(&entry->psq, qidx, skb);
|
||||||
if (pktout == NULL) {
|
if (pktout == NULL) {
|
||||||
@ -797,7 +797,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
rc = -ENOENT;
|
rc = -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2122,7 +2127,8 @@ static int brcmf_fws_assign_htod(struct
|
@@ -2126,7 +2131,8 @@ static int brcmf_fws_assign_htod(struct
|
||||||
|
|
||||||
int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
|
int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
@ -807,7 +807,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
struct brcmf_skbuff_cb *skcb = brcmf_skbcb(skb);
|
struct brcmf_skbuff_cb *skcb = brcmf_skbcb(skb);
|
||||||
struct ethhdr *eh = (struct ethhdr *)(skb->data);
|
struct ethhdr *eh = (struct ethhdr *)(skb->data);
|
||||||
int fifo = BRCMF_FWS_FIFO_BCMC;
|
int fifo = BRCMF_FWS_FIFO_BCMC;
|
||||||
@@ -2150,7 +2156,7 @@ int brcmf_fws_process_skb(struct brcmf_i
|
@@ -2154,7 +2160,7 @@ int brcmf_fws_process_skb(struct brcmf_i
|
||||||
brcmf_fws_enq(fws, BRCMF_FWS_SKBSTATE_DELAYED, fifo, skb);
|
brcmf_fws_enq(fws, BRCMF_FWS_SKBSTATE_DELAYED, fifo, skb);
|
||||||
brcmf_fws_schedule_deq(fws);
|
brcmf_fws_schedule_deq(fws);
|
||||||
} else {
|
} else {
|
||||||
@ -816,7 +816,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
brcmf_txfinalize(ifp, skb, false);
|
brcmf_txfinalize(ifp, skb, false);
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
}
|
}
|
||||||
@@ -2371,7 +2377,7 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
@@ -2375,7 +2381,7 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
||||||
|
|
||||||
fws->fws_wq = create_singlethread_workqueue("brcmf_fws_wq");
|
fws->fws_wq = create_singlethread_workqueue("brcmf_fws_wq");
|
||||||
if (fws->fws_wq == NULL) {
|
if (fws->fws_wq == NULL) {
|
||||||
@ -825,7 +825,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
rc = -EBADF;
|
rc = -EBADF;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@@ -2387,13 +2393,13 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
@@ -2391,13 +2397,13 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
||||||
rc = brcmf_fweh_register(drvr, BRCMF_E_FIFO_CREDIT_MAP,
|
rc = brcmf_fweh_register(drvr, BRCMF_E_FIFO_CREDIT_MAP,
|
||||||
brcmf_fws_notify_credit_map);
|
brcmf_fws_notify_credit_map);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
@ -841,7 +841,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
brcmf_fweh_unregister(drvr, BRCMF_E_FIFO_CREDIT_MAP);
|
brcmf_fweh_unregister(drvr, BRCMF_E_FIFO_CREDIT_MAP);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@@ -2405,7 +2411,7 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
@@ -2409,7 +2415,7 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
||||||
fws->fw_signals = true;
|
fws->fw_signals = true;
|
||||||
ifp = brcmf_get_ifp(drvr, 0);
|
ifp = brcmf_get_ifp(drvr, 0);
|
||||||
if (brcmf_fil_iovar_int_set(ifp, "tlv", tlv)) {
|
if (brcmf_fil_iovar_int_set(ifp, "tlv", tlv)) {
|
||||||
|
@ -85,7 +85,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
wiphy_free(drvr->wiphy);
|
wiphy_free(drvr->wiphy);
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
@@ -2432,25 +2432,17 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
@@ -2436,25 +2436,17 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
||||||
return fws;
|
return fws;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
@ -153,7 +153,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
kfree(bus->msgbuf->flowrings);
|
kfree(bus->msgbuf->flowrings);
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||||
@@ -4254,17 +4254,26 @@ static void brcmf_sdio_firmware_callback
|
@@ -4258,17 +4258,26 @@ static void brcmf_sdio_firmware_callback
|
||||||
sdiod->bus_if->chip = bus->ci->chip;
|
sdiod->bus_if->chip = bus->ci->chip;
|
||||||
sdiod->bus_if->chiprev = bus->ci->chiprev;
|
sdiod->bus_if->chiprev = bus->ci->chiprev;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
@@ -4212,6 +4214,19 @@ static void brcmf_sdio_firmware_callback
|
@@ -4216,6 +4218,19 @@ static void brcmf_sdio_firmware_callback
|
||||||
brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl,
|
brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl,
|
||||||
&err);
|
&err);
|
||||||
break;
|
break;
|
||||||
|
@ -16,7 +16,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||||
@@ -908,7 +908,7 @@ static u8 brcmf_fws_hdrpush(struct brcmf
|
@@ -912,7 +912,7 @@ static u8 brcmf_fws_hdrpush(struct brcmf
|
||||||
wlh += wlh[1] + 2;
|
wlh += wlh[1] + 2;
|
||||||
|
|
||||||
if (entry->send_tim_signal) {
|
if (entry->send_tim_signal) {
|
||||||
|
@ -29,7 +29,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||||
@@ -4249,6 +4249,12 @@ static void brcmf_sdio_firmware_callback
|
@@ -4253,6 +4253,12 @@ static void brcmf_sdio_firmware_callback
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err == 0) {
|
if (err == 0) {
|
||||||
@ -42,7 +42,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|||||||
/* Allow full data communication using DPC from now on. */
|
/* Allow full data communication using DPC from now on. */
|
||||||
brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA);
|
brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA);
|
||||||
|
|
||||||
@@ -4265,12 +4271,6 @@ static void brcmf_sdio_firmware_callback
|
@@ -4269,12 +4275,6 @@ static void brcmf_sdio_firmware_callback
|
||||||
|
|
||||||
sdio_release_host(sdiod->func1);
|
sdio_release_host(sdiod->func1);
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
From 1b9ae0c92925ac40489be526d67d0010d0724ce0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
Date: Thu, 21 May 2020 22:14:22 +0200
|
|
||||||
Subject: [PATCH] wireless: Use linux/stddef.h instead of stddef.h
|
|
||||||
|
|
||||||
When compiling inside the kernel include linux/stddef.h instead of
|
|
||||||
stddef.h. When I compile this header file in backports for power PC I
|
|
||||||
run into a conflict with ptrdiff_t. I was unable to reproduce this in
|
|
||||||
mainline kernel. I still would like to fix this problem in the kernel.
|
|
||||||
|
|
||||||
Fixes: 6989310f5d43 ("wireless: Use offsetof instead of custom macro.")
|
|
||||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
Link: https://lore.kernel.org/r/20200521201422.16493-1-hauke@hauke-m.de
|
|
||||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
||||||
---
|
|
||||||
include/uapi/linux/wireless.h | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/include/uapi/linux/wireless.h
|
|
||||||
+++ b/include/uapi/linux/wireless.h
|
|
||||||
@@ -74,7 +74,11 @@
|
|
||||||
#include <linux/socket.h> /* for "struct sockaddr" et al */
|
|
||||||
#include <linux/if.h> /* for IFNAMSIZ and co... */
|
|
||||||
|
|
||||||
-#include <stddef.h> /* for offsetof */
|
|
||||||
+#ifdef __KERNEL__
|
|
||||||
+# include <linux/stddef.h> /* for offsetof */
|
|
||||||
+#else
|
|
||||||
+# include <stddef.h> /* for offsetof */
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/***************************** VERSION *****************************/
|
|
||||||
/*
|
|
@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects
|
|||||||
|
|
||||||
--- a/net/mac80211/cfg.c
|
--- a/net/mac80211/cfg.c
|
||||||
+++ b/net/mac80211/cfg.c
|
+++ b/net/mac80211/cfg.c
|
||||||
@@ -1067,7 +1067,6 @@ static int ieee80211_stop_ap(struct wiph
|
@@ -1068,7 +1068,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||||
sdata->u.ap.driver_smps_mode = IEEE80211_SMPS_OFF;
|
sdata->u.ap.driver_smps_mode = IEEE80211_SMPS_OFF;
|
||||||
|
|
||||||
__sta_info_flush(sdata, true);
|
__sta_info_flush(sdata, true);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -3822,6 +3822,12 @@ out:
|
@@ -3833,6 +3833,12 @@ out:
|
||||||
netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
|
netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
|
||||||
struct net_device *dev)
|
struct net_device *dev)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/mac80211/cfg.c
|
--- a/net/mac80211/cfg.c
|
||||||
+++ b/net/mac80211/cfg.c
|
+++ b/net/mac80211/cfg.c
|
||||||
@@ -2189,7 +2189,7 @@ static int ieee80211_scan(struct wiphy *
|
@@ -2190,7 +2190,7 @@ static int ieee80211_scan(struct wiphy *
|
||||||
* the frames sent while scanning on other channel will be
|
* the frames sent while scanning on other channel will be
|
||||||
* lost)
|
* lost)
|
||||||
*/
|
*/
|
||||||
|
@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
(unsigned long) local);
|
(unsigned long) local);
|
||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -3487,13 +3487,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
|
@@ -3498,13 +3498,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
|
||||||
struct ieee80211_tx_info *info;
|
struct ieee80211_tx_info *info;
|
||||||
struct ieee80211_tx_data tx;
|
struct ieee80211_tx_data tx;
|
||||||
ieee80211_tx_result r;
|
ieee80211_tx_result r;
|
||||||
@ -122,7 +122,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
/* Make sure fragments stay together. */
|
/* Make sure fragments stay together. */
|
||||||
skb = __skb_dequeue(&txqi->frags);
|
skb = __skb_dequeue(&txqi->frags);
|
||||||
if (skb)
|
if (skb)
|
||||||
@@ -3606,6 +3612,7 @@ begin:
|
@@ -3617,6 +3623,7 @@ begin:
|
||||||
}
|
}
|
||||||
|
|
||||||
IEEE80211_SKB_CB(skb)->control.vif = vif;
|
IEEE80211_SKB_CB(skb)->control.vif = vif;
|
||||||
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/net/mac80211/rc80211_minstrel.c
|
--- a/net/mac80211/rc80211_minstrel.c
|
||||||
+++ b/net/mac80211/rc80211_minstrel.c
|
+++ b/net/mac80211/rc80211_minstrel.c
|
||||||
@@ -689,8 +689,8 @@ minstrel_alloc(struct ieee80211_hw *hw,
|
@@ -672,8 +672,8 @@ minstrel_alloc(struct ieee80211_hw *hw,
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_DEBUGFS
|
#ifdef CPTCFG_MAC80211_DEBUGFS
|
||||||
mp->fixed_rate_idx = (u32) -1;
|
mp->fixed_rate_idx = (u32) -1;
|
||||||
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
minstrel_init_cck_rates(mp);
|
minstrel_init_cck_rates(mp);
|
||||||
@@ -701,9 +701,6 @@ minstrel_alloc(struct ieee80211_hw *hw,
|
@@ -684,9 +684,6 @@ minstrel_alloc(struct ieee80211_hw *hw,
|
||||||
static void
|
static void
|
||||||
minstrel_free(void *priv)
|
minstrel_free(void *priv)
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
kfree(priv);
|
kfree(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,7 +732,6 @@ const struct rate_control_ops mac80211_m
|
@@ -718,7 +715,6 @@ const struct rate_control_ops mac80211_m
|
||||||
.free_sta = minstrel_free_sta,
|
.free_sta = minstrel_free_sta,
|
||||||
#ifdef CPTCFG_MAC80211_DEBUGFS
|
#ifdef CPTCFG_MAC80211_DEBUGFS
|
||||||
.add_sta_debugfs = minstrel_add_sta_debugfs,
|
.add_sta_debugfs = minstrel_add_sta_debugfs,
|
||||||
@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
};
|
};
|
||||||
--- a/net/mac80211/rc80211_minstrel.h
|
--- a/net/mac80211/rc80211_minstrel.h
|
||||||
+++ b/net/mac80211/rc80211_minstrel.h
|
+++ b/net/mac80211/rc80211_minstrel.h
|
||||||
@@ -109,11 +109,6 @@ struct minstrel_sta_info {
|
@@ -108,11 +108,6 @@ struct minstrel_sta_info {
|
||||||
|
|
||||||
/* sampling table */
|
/* sampling table */
|
||||||
u8 *sample_table;
|
u8 *sample_table;
|
||||||
@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct minstrel_priv {
|
struct minstrel_priv {
|
||||||
@@ -137,7 +132,6 @@ struct minstrel_priv {
|
@@ -136,7 +131,6 @@ struct minstrel_priv {
|
||||||
* - setting will be applied on next update
|
* - setting will be applied on next update
|
||||||
*/
|
*/
|
||||||
u32 fixed_rate_idx;
|
u32 fixed_rate_idx;
|
||||||
@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -156,7 +150,6 @@ minstrel_get_ewmsd10(struct minstrel_rat
|
@@ -155,7 +149,6 @@ minstrel_get_ewmsd10(struct minstrel_rat
|
||||||
|
|
||||||
extern const struct rate_control_ops mac80211_minstrel;
|
extern const struct rate_control_ops mac80211_minstrel;
|
||||||
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
||||||
|
@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
#endif /* IEEE80211_RATE_H */
|
#endif /* IEEE80211_RATE_H */
|
||||||
--- a/net/mac80211/rc80211_minstrel.c
|
--- a/net/mac80211/rc80211_minstrel.c
|
||||||
+++ b/net/mac80211/rc80211_minstrel.c
|
+++ b/net/mac80211/rc80211_minstrel.c
|
||||||
@@ -572,138 +572,6 @@ minstrel_rate_init(void *priv, struct ie
|
@@ -555,138 +555,6 @@ minstrel_rate_init(void *priv, struct ie
|
||||||
minstrel_update_rates(mp, mi);
|
minstrel_update_rates(mp, mi);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
static u32 minstrel_get_expected_throughput(void *priv_sta)
|
static u32 minstrel_get_expected_throughput(void *priv_sta)
|
||||||
{
|
{
|
||||||
struct minstrel_sta_info *mi = priv_sta;
|
struct minstrel_sta_info *mi = priv_sta;
|
||||||
@@ -722,28 +590,8 @@ static u32 minstrel_get_expected_through
|
@@ -705,28 +573,8 @@ static u32 minstrel_get_expected_through
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct rate_control_ops mac80211_minstrel = {
|
const struct rate_control_ops mac80211_minstrel = {
|
||||||
@ -287,7 +287,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
-}
|
-}
|
||||||
--- a/net/mac80211/rc80211_minstrel.h
|
--- a/net/mac80211/rc80211_minstrel.h
|
||||||
+++ b/net/mac80211/rc80211_minstrel.h
|
+++ b/net/mac80211/rc80211_minstrel.h
|
||||||
@@ -158,7 +158,5 @@ int minstrel_get_tp_avg(struct minstrel_
|
@@ -157,7 +157,5 @@ int minstrel_get_tp_avg(struct minstrel_
|
||||||
/* debugfs */
|
/* debugfs */
|
||||||
int minstrel_stats_open(struct inode *inode, struct file *file);
|
int minstrel_stats_open(struct inode *inode, struct file *file);
|
||||||
int minstrel_stats_csv_open(struct inode *inode, struct file *file);
|
int minstrel_stats_csv_open(struct inode *inode, struct file *file);
|
||||||
|
@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/net/mac80211/rc80211_minstrel.h
|
--- a/net/mac80211/rc80211_minstrel.h
|
||||||
+++ b/net/mac80211/rc80211_minstrel.h
|
+++ b/net/mac80211/rc80211_minstrel.h
|
||||||
@@ -114,6 +114,7 @@ struct minstrel_sta_info {
|
@@ -113,6 +113,7 @@ struct minstrel_sta_info {
|
||||||
struct minstrel_priv {
|
struct minstrel_priv {
|
||||||
struct ieee80211_hw *hw;
|
struct ieee80211_hw *hw;
|
||||||
bool has_mrr;
|
bool has_mrr;
|
||||||
|
@ -191,7 +191,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
|
|
||||||
--- a/net/mac80211/sta_info.c
|
--- a/net/mac80211/sta_info.c
|
||||||
+++ b/net/mac80211/sta_info.c
|
+++ b/net/mac80211/sta_info.c
|
||||||
@@ -1249,7 +1249,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
|
@@ -1261,7 +1261,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
|
||||||
if (!txq_has_queue(sta->sta.txq[i]))
|
if (!txq_has_queue(sta->sta.txq[i]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -3620,6 +3624,60 @@ out:
|
@@ -3631,6 +3635,60 @@ out:
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ieee80211_tx_dequeue);
|
EXPORT_SYMBOL(ieee80211_tx_dequeue);
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* policy for the key attributes */
|
/* policy for the key attributes */
|
||||||
@@ -4709,6 +4710,11 @@ static int nl80211_send_station(struct s
|
@@ -4715,6 +4716,11 @@ static int nl80211_send_station(struct s
|
||||||
PUT_SINFO(PLID, plid, u16);
|
PUT_SINFO(PLID, plid, u16);
|
||||||
PUT_SINFO(PLINK_STATE, plink_state, u8);
|
PUT_SINFO(PLINK_STATE, plink_state, u8);
|
||||||
PUT_SINFO_U64(RX_DURATION, rx_duration);
|
PUT_SINFO_U64(RX_DURATION, rx_duration);
|
||||||
@ -168,7 +168,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
|
|
||||||
switch (rdev->wiphy.signal_type) {
|
switch (rdev->wiphy.signal_type) {
|
||||||
case CFG80211_SIGNAL_TYPE_MBM:
|
case CFG80211_SIGNAL_TYPE_MBM:
|
||||||
@@ -5345,6 +5351,15 @@ static int nl80211_set_station(struct sk
|
@@ -5351,6 +5357,15 @@ static int nl80211_set_station(struct sk
|
||||||
nla_get_u8(info->attrs[NL80211_ATTR_OPMODE_NOTIF]);
|
nla_get_u8(info->attrs[NL80211_ATTR_OPMODE_NOTIF]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
/* Include parameters for TDLS peer (will check later) */
|
/* Include parameters for TDLS peer (will check later) */
|
||||||
err = nl80211_set_station_tdls(info, ¶ms);
|
err = nl80211_set_station_tdls(info, ¶ms);
|
||||||
if (err)
|
if (err)
|
||||||
@@ -5483,6 +5498,15 @@ static int nl80211_new_station(struct sk
|
@@ -5489,6 +5504,15 @@ static int nl80211_new_station(struct sk
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
* The values are not guaranteed to be coherent with regard to each other, i.e.
|
* The values are not guaranteed to be coherent with regard to each other, i.e.
|
||||||
--- a/net/mac80211/cfg.c
|
--- a/net/mac80211/cfg.c
|
||||||
+++ b/net/mac80211/cfg.c
|
+++ b/net/mac80211/cfg.c
|
||||||
@@ -1390,6 +1390,9 @@ static int sta_apply_parameters(struct i
|
@@ -1391,6 +1391,9 @@ static int sta_apply_parameters(struct i
|
||||||
if (ieee80211_vif_is_mesh(&sdata->vif))
|
if (ieee80211_vif_is_mesh(&sdata->vif))
|
||||||
sta_apply_mesh_params(local, sta, params);
|
sta_apply_mesh_params(local, sta, params);
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,9 +378,12 @@ struct sta_info *sta_info_alloc(struct i
|
@@ -399,9 +396,12 @@ struct sta_info *sta_info_alloc(struct i
|
||||||
if (sta_prepare_rate_control(local, sta, gfp))
|
if (sta_prepare_rate_control(local, sta, gfp))
|
||||||
goto free_txq;
|
goto free_txq;
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < IEEE80211_NUM_TIDS; i++)
|
for (i = 0; i < IEEE80211_NUM_TIDS; i++)
|
||||||
@@ -1826,6 +1826,27 @@ void ieee80211_sta_set_buffered(struct i
|
@@ -1838,6 +1838,27 @@ void ieee80211_sta_set_buffered(struct i
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ieee80211_sta_set_buffered);
|
EXPORT_SYMBOL(ieee80211_sta_set_buffered);
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
int sta_info_move_state(struct sta_info *sta,
|
int sta_info_move_state(struct sta_info *sta,
|
||||||
enum ieee80211_sta_state new_state)
|
enum ieee80211_sta_state new_state)
|
||||||
{
|
{
|
||||||
@@ -2192,6 +2213,23 @@ void sta_set_sinfo(struct sta_info *sta,
|
@@ -2208,6 +2229,23 @@ void sta_set_sinfo(struct sta_info *sta,
|
||||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
|
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
|
spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
|
||||||
list_del_init(&txqi->schedule_order);
|
list_del_init(&txqi->schedule_order);
|
||||||
spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
|
spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
|
||||||
@@ -3631,11 +3634,28 @@ struct ieee80211_txq *ieee80211_next_txq
|
@@ -3642,11 +3645,28 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||||
|
|
||||||
lockdep_assert_held(&local->active_txq_lock[ac]);
|
lockdep_assert_held(&local->active_txq_lock[ac]);
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
list_del_init(&txqi->schedule_order);
|
list_del_init(&txqi->schedule_order);
|
||||||
@@ -3653,12 +3673,74 @@ void ieee80211_return_txq(struct ieee802
|
@@ -3664,12 +3684,74 @@ void ieee80211_return_txq(struct ieee802
|
||||||
lockdep_assert_held(&local->active_txq_lock[txq->ac]);
|
lockdep_assert_held(&local->active_txq_lock[txq->ac]);
|
||||||
|
|
||||||
if (list_empty(&txqi->schedule_order) &&
|
if (list_empty(&txqi->schedule_order) &&
|
||||||
|
@ -51,7 +51,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
|
|
||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -3693,6 +3693,19 @@ void ieee80211_return_txq(struct ieee802
|
@@ -3704,6 +3704,19 @@ void ieee80211_return_txq(struct ieee802
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ieee80211_return_txq);
|
EXPORT_SYMBOL(ieee80211_return_txq);
|
||||||
|
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
From: Felix Fietkau <nbd@nbd.name>
|
|
||||||
Date: Thu, 17 Sep 2020 12:07:19 +0200
|
|
||||||
Subject: [PATCH] mac80211: do not allow bigger VHT MPDUs than the hardware
|
|
||||||
supports
|
|
||||||
|
|
||||||
Limit maximum VHT MPDU size by local capability
|
|
||||||
|
|
||||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
---
|
|
||||||
|
|
||||||
--- a/net/mac80211/vht.c
|
|
||||||
+++ b/net/mac80211/vht.c
|
|
||||||
@@ -170,10 +170,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
|
||||||
/* take some capabilities as-is */
|
|
||||||
cap_info = le32_to_cpu(vht_cap_ie->vht_cap_info);
|
|
||||||
vht_cap->cap = cap_info;
|
|
||||||
- vht_cap->cap &= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 |
|
|
||||||
- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
|
|
||||||
- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
|
|
||||||
- IEEE80211_VHT_CAP_RXLDPC |
|
|
||||||
+ vht_cap->cap &= IEEE80211_VHT_CAP_RXLDPC |
|
|
||||||
IEEE80211_VHT_CAP_VHT_TXOP_PS |
|
|
||||||
IEEE80211_VHT_CAP_HTC_VHT |
|
|
||||||
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK |
|
|
||||||
@@ -182,6 +179,9 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
|
||||||
IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN |
|
|
||||||
IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN;
|
|
||||||
|
|
||||||
+ vht_cap->cap |= min_t(u32, cap_info & IEEE80211_VHT_CAP_MAX_MPDU_MASK,
|
|
||||||
+ own_cap.cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK);
|
|
||||||
+
|
|
||||||
/* and some based on our own capabilities */
|
|
||||||
switch (own_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
|
|
||||||
case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
|
|
@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
if (likely(sta)) {
|
if (likely(sta)) {
|
||||||
if (!IS_ERR(sta))
|
if (!IS_ERR(sta))
|
||||||
tx->sta = sta;
|
tx->sta = sta;
|
||||||
@@ -3525,6 +3525,7 @@ begin:
|
@@ -3536,6 +3536,7 @@ begin:
|
||||||
tx.local = local;
|
tx.local = local;
|
||||||
tx.skb = skb;
|
tx.skb = skb;
|
||||||
tx.sdata = vif_to_sdata(info->control.vif);
|
tx.sdata = vif_to_sdata(info->control.vif);
|
||||||
@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (txq->sta) {
|
if (txq->sta) {
|
||||||
tx.sta = container_of(txq->sta, struct sta_info, sta);
|
tx.sta = container_of(txq->sta, struct sta_info, sta);
|
||||||
@@ -3569,7 +3570,7 @@ begin:
|
@@ -3580,7 +3581,7 @@ begin:
|
||||||
|
|
||||||
if (tx.key &&
|
if (tx.key &&
|
||||||
(tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
|
(tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
|
||||||
@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
|
ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
|
||||||
tx.key, skb);
|
tx.key, skb);
|
||||||
@@ -4028,6 +4029,7 @@ ieee80211_build_data_template(struct iee
|
@@ -4039,6 +4040,7 @@ ieee80211_build_data_template(struct iee
|
||||||
hdr = (void *)skb->data;
|
hdr = (void *)skb->data;
|
||||||
tx.sta = sta_info_get(sdata, hdr->addr1);
|
tx.sta = sta_info_get(sdata, hdr->addr1);
|
||||||
tx.skb = skb;
|
tx.skb = skb;
|
||||||
|
@ -227,7 +227,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (likely(sta)) {
|
if (likely(sta)) {
|
||||||
if (!IS_ERR(sta))
|
if (!IS_ERR(sta))
|
||||||
@@ -2222,7 +2221,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
|
@@ -2233,7 +2232,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
|
hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
|
||||||
@ -236,7 +236,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (skb->len < len_rthdr + hdrlen)
|
if (skb->len < len_rthdr + hdrlen)
|
||||||
goto fail;
|
goto fail;
|
||||||
@@ -2441,7 +2440,7 @@ static struct sk_buff *ieee80211_build_h
|
@@ -2452,7 +2451,7 @@ static struct sk_buff *ieee80211_build_h
|
||||||
struct ieee80211_chanctx_conf *chanctx_conf;
|
struct ieee80211_chanctx_conf *chanctx_conf;
|
||||||
struct ieee80211_sub_if_data *ap_sdata;
|
struct ieee80211_sub_if_data *ap_sdata;
|
||||||
enum nl80211_band band;
|
enum nl80211_band band;
|
||||||
@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (IS_ERR(sta))
|
if (IS_ERR(sta))
|
||||||
sta = NULL;
|
sta = NULL;
|
||||||
@@ -2740,7 +2739,9 @@ static struct sk_buff *ieee80211_build_h
|
@@ -2751,7 +2750,9 @@ static struct sk_buff *ieee80211_build_h
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_pull(skb, skip_header_bytes);
|
skb_pull(skb, skip_header_bytes);
|
||||||
@ -255,7 +255,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* So we need to modify the skb header and hence need a copy of
|
* So we need to modify the skb header and hence need a copy of
|
||||||
@@ -2773,6 +2774,9 @@ static struct sk_buff *ieee80211_build_h
|
@@ -2784,6 +2785,9 @@ static struct sk_buff *ieee80211_build_h
|
||||||
memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen);
|
memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
if (ieee80211_is_data_qos(fc)) {
|
if (ieee80211_is_data_qos(fc)) {
|
||||||
__le16 *qos_control;
|
__le16 *qos_control;
|
||||||
|
|
||||||
@@ -2949,6 +2953,8 @@ void ieee80211_check_fast_xmit(struct st
|
@@ -2960,6 +2964,8 @@ void ieee80211_check_fast_xmit(struct st
|
||||||
fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
|
fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
/* We store the key here so there's no point in using rcu_dereference()
|
/* We store the key here so there's no point in using rcu_dereference()
|
||||||
* but that's fine because the code that changes the pointers will call
|
* but that's fine because the code that changes the pointers will call
|
||||||
* this function after doing so. For a single CPU that would be enough,
|
* this function after doing so. For a single CPU that would be enough,
|
||||||
@@ -3525,7 +3531,7 @@ begin:
|
@@ -3536,7 +3542,7 @@ begin:
|
||||||
tx.local = local;
|
tx.local = local;
|
||||||
tx.skb = skb;
|
tx.skb = skb;
|
||||||
tx.sdata = vif_to_sdata(info->control.vif);
|
tx.sdata = vif_to_sdata(info->control.vif);
|
||||||
@ -283,7 +283,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (txq->sta) {
|
if (txq->sta) {
|
||||||
tx.sta = container_of(txq->sta, struct sta_info, sta);
|
tx.sta = container_of(txq->sta, struct sta_info, sta);
|
||||||
@@ -4029,7 +4035,7 @@ ieee80211_build_data_template(struct iee
|
@@ -4040,7 +4046,7 @@ ieee80211_build_data_template(struct iee
|
||||||
hdr = (void *)skb->data;
|
hdr = (void *)skb->data;
|
||||||
tx.sta = sta_info_get(sdata, hdr->addr1);
|
tx.sta = sta_info_get(sdata, hdr->addr1);
|
||||||
tx.skb = skb;
|
tx.skb = skb;
|
||||||
|
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
* ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
|
* ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
|
||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -3637,16 +3637,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
|
@@ -3648,16 +3648,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
|
||||||
struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
|
struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
|
||||||
{
|
{
|
||||||
struct ieee80211_local *local = hw_to_local(hw);
|
struct ieee80211_local *local = hw_to_local(hw);
|
||||||
@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (txqi->txq.sta) {
|
if (txqi->txq.sta) {
|
||||||
struct sta_info *sta = container_of(txqi->txq.sta,
|
struct sta_info *sta = container_of(txqi->txq.sta,
|
||||||
@@ -3663,21 +3664,25 @@ struct ieee80211_txq *ieee80211_next_txq
|
@@ -3674,21 +3675,25 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||||
|
|
||||||
|
|
||||||
if (txqi->schedule_round == local->schedule_round[ac])
|
if (txqi->schedule_round == local->schedule_round[ac])
|
||||||
@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (list_empty(&txqi->schedule_order) &&
|
if (list_empty(&txqi->schedule_order) &&
|
||||||
(!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) {
|
(!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) {
|
||||||
@@ -3697,18 +3702,7 @@ void ieee80211_return_txq(struct ieee802
|
@@ -3708,18 +3713,7 @@ void ieee80211_return_txq(struct ieee802
|
||||||
list_add_tail(&txqi->schedule_order,
|
list_add_tail(&txqi->schedule_order,
|
||||||
&local->active_txqs[txq->ac]);
|
&local->active_txqs[txq->ac]);
|
||||||
}
|
}
|
||||||
@ -165,7 +165,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
|
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ieee80211_schedule_txq);
|
EXPORT_SYMBOL(ieee80211_schedule_txq);
|
||||||
@@ -3721,7 +3715,7 @@ bool ieee80211_txq_may_transmit(struct i
|
@@ -3732,7 +3726,7 @@ bool ieee80211_txq_may_transmit(struct i
|
||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
u8 ac = txq->ac;
|
u8 ac = txq->ac;
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (!txqi->txq.sta)
|
if (!txqi->txq.sta)
|
||||||
goto out;
|
goto out;
|
||||||
@@ -3751,34 +3745,27 @@ bool ieee80211_txq_may_transmit(struct i
|
@@ -3762,34 +3756,27 @@ bool ieee80211_txq_may_transmit(struct i
|
||||||
|
|
||||||
sta->airtime[ac].deficit += sta->airtime_weight;
|
sta->airtime[ac].deficit += sta->airtime_weight;
|
||||||
list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);
|
list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);
|
||||||
|
@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
schedule_and_wake_txq(local, txqi);
|
schedule_and_wake_txq(local, txqi);
|
||||||
|
|
||||||
@@ -3200,6 +3201,7 @@ static bool ieee80211_amsdu_aggregate(st
|
@@ -3211,6 +3212,7 @@ static bool ieee80211_amsdu_aggregate(st
|
||||||
u8 max_subframes = sta->sta.max_amsdu_subframes;
|
u8 max_subframes = sta->sta.max_amsdu_subframes;
|
||||||
int max_frags = local->hw.max_tx_fragments;
|
int max_frags = local->hw.max_tx_fragments;
|
||||||
int max_amsdu_len = sta->sta.max_amsdu_len;
|
int max_amsdu_len = sta->sta.max_amsdu_len;
|
||||||
@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
int orig_truesize;
|
int orig_truesize;
|
||||||
__be16 len;
|
__be16 len;
|
||||||
void *data;
|
void *data;
|
||||||
@@ -3222,6 +3224,8 @@ static bool ieee80211_amsdu_aggregate(st
|
@@ -3233,6 +3235,8 @@ static bool ieee80211_amsdu_aggregate(st
|
||||||
max_amsdu_len = min_t(int, max_amsdu_len,
|
max_amsdu_len = min_t(int, max_amsdu_len,
|
||||||
sta->sta.max_rc_amsdu_len);
|
sta->sta.max_rc_amsdu_len);
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
spin_lock_bh(&fq->lock);
|
spin_lock_bh(&fq->lock);
|
||||||
|
|
||||||
/* TODO: Ideally aggregation should be done on dequeue to remain
|
/* TODO: Ideally aggregation should be done on dequeue to remain
|
||||||
@@ -3229,7 +3233,8 @@ static bool ieee80211_amsdu_aggregate(st
|
@@ -3240,7 +3244,8 @@ static bool ieee80211_amsdu_aggregate(st
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tin = &txqi->tin;
|
tin = &txqi->tin;
|
||||||
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -3507,6 +3507,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
|
@@ -3518,6 +3518,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
|
||||||
ieee80211_tx_result r;
|
ieee80211_tx_result r;
|
||||||
struct ieee80211_vif *vif = txq->vif;
|
struct ieee80211_vif *vif = txq->vif;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
spin_lock_bh(&fq->lock);
|
spin_lock_bh(&fq->lock);
|
||||||
|
|
||||||
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
|
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
|
||||||
@@ -3523,11 +3524,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
|
@@ -3534,11 +3535,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
|
||||||
if (skb)
|
if (skb)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
hdr = (struct ieee80211_hdr *)skb->data;
|
hdr = (struct ieee80211_hdr *)skb->data;
|
||||||
info = IEEE80211_SKB_CB(skb);
|
info = IEEE80211_SKB_CB(skb);
|
||||||
|
|
||||||
@@ -3591,8 +3593,11 @@ begin:
|
@@ -3602,8 +3604,11 @@ begin:
|
||||||
|
|
||||||
skb = __skb_dequeue(&tx.skbs);
|
skb = __skb_dequeue(&tx.skbs);
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (skb && skb_has_frag_list(skb) &&
|
if (skb && skb_has_frag_list(skb) &&
|
||||||
@@ -3631,6 +3636,7 @@ begin:
|
@@ -3642,6 +3647,7 @@ begin:
|
||||||
}
|
}
|
||||||
|
|
||||||
IEEE80211_SKB_CB(skb)->control.vif = vif;
|
IEEE80211_SKB_CB(skb)->control.vif = vif;
|
||||||
|
@ -50,33 +50,39 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) {
|
if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) {
|
||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -1914,37 +1914,53 @@ static bool ieee80211_tx(struct ieee8021
|
@@ -1914,42 +1914,53 @@ static bool ieee80211_tx(struct ieee8021
|
||||||
}
|
}
|
||||||
|
|
||||||
/* device xmit handlers */
|
/* device xmit handlers */
|
||||||
-
|
-
|
||||||
|
-enum ieee80211_encrypt {
|
||||||
|
- ENCRYPT_NO,
|
||||||
|
- ENCRYPT_MGMT,
|
||||||
|
- ENCRYPT_DATA,
|
||||||
|
-};
|
||||||
|
-
|
||||||
-static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
|
-static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
|
||||||
- struct sk_buff *skb,
|
- struct sk_buff *skb,
|
||||||
- int head_need, bool may_encrypt)
|
- int head_need,
|
||||||
|
- enum ieee80211_encrypt encrypt)
|
||||||
+int ieee80211_skb_resize(struct ieee80211_local *local,
|
+int ieee80211_skb_resize(struct ieee80211_local *local,
|
||||||
+ struct ieee80211_sub_if_data *sdata,
|
+ struct ieee80211_sub_if_data *sdata,
|
||||||
+ struct sk_buff *skb, int hdr_len, int hdr_extra)
|
+ struct sk_buff *skb, int hdr_len, int hdr_extra)
|
||||||
{
|
{
|
||||||
- struct ieee80211_local *local = sdata->local;
|
- struct ieee80211_local *local = sdata->local;
|
||||||
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
|
||||||
struct ieee80211_hdr *hdr;
|
|
||||||
- bool enc_tailroom;
|
- bool enc_tailroom;
|
||||||
- int tail_need = 0;
|
- int tail_need = 0;
|
||||||
-
|
-
|
||||||
- hdr = (struct ieee80211_hdr *) skb->data;
|
- enc_tailroom = encrypt == ENCRYPT_MGMT ||
|
||||||
- enc_tailroom = may_encrypt &&
|
- (encrypt == ENCRYPT_DATA &&
|
||||||
- (sdata->crypto_tx_tailroom_needed_cnt ||
|
- sdata->crypto_tx_tailroom_needed_cnt);
|
||||||
- ieee80211_is_mgmt(hdr->frame_control));
|
|
||||||
-
|
-
|
||||||
- if (enc_tailroom) {
|
- if (enc_tailroom) {
|
||||||
- tail_need = IEEE80211_ENCRYPT_TAILROOM;
|
- tail_need = IEEE80211_ENCRYPT_TAILROOM;
|
||||||
- tail_need -= skb_tailroom(skb);
|
- tail_need -= skb_tailroom(skb);
|
||||||
- tail_need = max_t(int, tail_need, 0);
|
- tail_need = max_t(int, tail_need, 0);
|
||||||
|
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||||
|
+ struct ieee80211_hdr *hdr;
|
||||||
+ int head_need, head_max;
|
+ int head_need, head_max;
|
||||||
+ int tail_need, tail_max;
|
+ int tail_need, tail_max;
|
||||||
+ bool enc_tailroom = false;
|
+ bool enc_tailroom = false;
|
||||||
@ -123,27 +129,34 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
wiphy_debug(local->hw.wiphy,
|
wiphy_debug(local->hw.wiphy,
|
||||||
"failed to reallocate TX buffer\n");
|
"failed to reallocate TX buffer\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -1960,18 +1976,8 @@ void ieee80211_xmit(struct ieee80211_sub
|
@@ -1964,24 +1975,9 @@ void ieee80211_xmit(struct ieee80211_sub
|
||||||
|
{
|
||||||
struct ieee80211_local *local = sdata->local;
|
struct ieee80211_local *local = sdata->local;
|
||||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||||
struct ieee80211_hdr *hdr;
|
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
|
||||||
- int headroom;
|
- int headroom;
|
||||||
- bool may_encrypt;
|
- enum ieee80211_encrypt encrypt;
|
||||||
|
-
|
||||||
|
- if (info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)
|
||||||
|
- encrypt = ENCRYPT_NO;
|
||||||
|
- else if (ieee80211_is_mgmt(hdr->frame_control))
|
||||||
|
- encrypt = ENCRYPT_MGMT;
|
||||||
|
- else
|
||||||
|
- encrypt = ENCRYPT_DATA;
|
||||||
-
|
-
|
||||||
- may_encrypt = !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT);
|
|
||||||
|
|
||||||
- headroom = local->tx_headroom;
|
- headroom = local->tx_headroom;
|
||||||
- if (may_encrypt)
|
- if (encrypt != ENCRYPT_NO)
|
||||||
- headroom += sdata->encrypt_headroom;
|
- headroom += sdata->encrypt_headroom;
|
||||||
- headroom -= skb_headroom(skb);
|
- headroom -= skb_headroom(skb);
|
||||||
- headroom = max_t(int, 0, headroom);
|
- headroom = max_t(int, 0, headroom);
|
||||||
-
|
+ struct ieee80211_hdr *hdr;
|
||||||
- if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) {
|
|
||||||
|
- if (ieee80211_skb_resize(sdata, skb, headroom, encrypt)) {
|
||||||
+ if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) {
|
+ if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) {
|
||||||
ieee80211_free_txskb(&local->hw, skb);
|
ieee80211_free_txskb(&local->hw, skb);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2741,30 +2747,14 @@ static struct sk_buff *ieee80211_build_h
|
@@ -2752,30 +2748,14 @@ static struct sk_buff *ieee80211_build_h
|
||||||
|
|
||||||
skb_pull(skb, skip_header_bytes);
|
skb_pull(skb, skip_header_bytes);
|
||||||
padsize = ieee80211_hdr_padsize(&local->hw, hdrlen);
|
padsize = ieee80211_hdr_padsize(&local->hw, hdrlen);
|
||||||
@ -167,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
- head_need += sdata->encrypt_headroom;
|
- head_need += sdata->encrypt_headroom;
|
||||||
- head_need += local->tx_headroom;
|
- head_need += local->tx_headroom;
|
||||||
- head_need = max_t(int, 0, head_need);
|
- head_need = max_t(int, 0, head_need);
|
||||||
- if (ieee80211_skb_resize(sdata, skb, head_need, true)) {
|
- if (ieee80211_skb_resize(sdata, skb, head_need, ENCRYPT_DATA)) {
|
||||||
- ieee80211_free_txskb(&local->hw, skb);
|
- ieee80211_free_txskb(&local->hw, skb);
|
||||||
- skb = NULL;
|
- skb = NULL;
|
||||||
- return ERR_PTR(-ENOMEM);
|
- return ERR_PTR(-ENOMEM);
|
||||||
@ -180,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (encaps_data)
|
if (encaps_data)
|
||||||
@@ -3377,7 +3367,6 @@ static bool ieee80211_xmit_fast(struct i
|
@@ -3388,7 +3368,6 @@ static bool ieee80211_xmit_fast(struct i
|
||||||
struct ieee80211_local *local = sdata->local;
|
struct ieee80211_local *local = sdata->local;
|
||||||
u16 ethertype = (skb->data[12] << 8) | skb->data[13];
|
u16 ethertype = (skb->data[12] << 8) | skb->data[13];
|
||||||
int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
|
int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
|
||||||
@ -188,14 +201,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
struct ethhdr eth;
|
struct ethhdr eth;
|
||||||
struct ieee80211_tx_info *info;
|
struct ieee80211_tx_info *info;
|
||||||
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
|
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
|
||||||
@@ -3429,10 +3418,7 @@ static bool ieee80211_xmit_fast(struct i
|
@@ -3440,10 +3419,7 @@ static bool ieee80211_xmit_fast(struct i
|
||||||
* as the may-encrypt argument for the resize to not account for
|
* as the may-encrypt argument for the resize to not account for
|
||||||
* more room than we already have in 'extra_head'
|
* more room than we already have in 'extra_head'
|
||||||
*/
|
*/
|
||||||
- if (unlikely(ieee80211_skb_resize(sdata, skb,
|
- if (unlikely(ieee80211_skb_resize(sdata, skb,
|
||||||
- max_t(int, extra_head + hw_headroom -
|
- max_t(int, extra_head + hw_headroom -
|
||||||
- skb_headroom(skb), 0),
|
- skb_headroom(skb), 0),
|
||||||
- false))) {
|
- ENCRYPT_NO))) {
|
||||||
+ if (unlikely(ieee80211_skb_resize(local, sdata, skb, extra_head, 0))) {
|
+ if (unlikely(ieee80211_skb_resize(local, sdata, skb, extra_head, 0))) {
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
return true;
|
return true;
|
||||||
|
@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
/**
|
/**
|
||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -3673,8 +3673,9 @@ out:
|
@@ -3674,8 +3674,9 @@ out:
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ieee80211_next_txq);
|
EXPORT_SYMBOL(ieee80211_next_txq);
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
{
|
{
|
||||||
struct ieee80211_local *local = hw_to_local(hw);
|
struct ieee80211_local *local = hw_to_local(hw);
|
||||||
struct txq_info *txqi = to_txq_info(txq);
|
struct txq_info *txqi = to_txq_info(txq);
|
||||||
@@ -3682,7 +3683,8 @@ void ieee80211_schedule_txq(struct ieee8
|
@@ -3683,7 +3684,8 @@ void ieee80211_schedule_txq(struct ieee8
|
||||||
spin_lock_bh(&local->active_txq_lock[txq->ac]);
|
spin_lock_bh(&local->active_txq_lock[txq->ac]);
|
||||||
|
|
||||||
if (list_empty(&txqi->schedule_order) &&
|
if (list_empty(&txqi->schedule_order) &&
|
||||||
@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
/* If airtime accounting is active, always enqueue STAs at the
|
/* If airtime accounting is active, always enqueue STAs at the
|
||||||
* head of the list to ensure that they only get moved to the
|
* head of the list to ensure that they only get moved to the
|
||||||
* back by the airtime DRR scheduler once they have a negative
|
* back by the airtime DRR scheduler once they have a negative
|
||||||
@@ -3702,7 +3704,7 @@ void ieee80211_schedule_txq(struct ieee8
|
@@ -3703,7 +3705,7 @@ void ieee80211_schedule_txq(struct ieee8
|
||||||
|
|
||||||
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
|
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/net/mac80211/tx.c
|
--- a/net/mac80211/tx.c
|
||||||
+++ b/net/mac80211/tx.c
|
+++ b/net/mac80211/tx.c
|
||||||
@@ -3772,6 +3772,7 @@ void __ieee80211_subif_start_xmit(struct
|
@@ -3773,6 +3773,7 @@ void __ieee80211_subif_start_xmit(struct
|
||||||
u32 ctrl_flags)
|
u32 ctrl_flags)
|
||||||
{
|
{
|
||||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||||
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
struct sk_buff *next;
|
struct sk_buff *next;
|
||||||
|
|
||||||
@@ -3785,7 +3786,15 @@ void __ieee80211_subif_start_xmit(struct
|
@@ -3786,7 +3787,15 @@ void __ieee80211_subif_start_xmit(struct
|
||||||
if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
|
if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/net/mac80211/rc80211_minstrel.c
|
--- a/net/mac80211/rc80211_minstrel.c
|
||||||
+++ b/net/mac80211/rc80211_minstrel.c
|
+++ b/net/mac80211/rc80211_minstrel.c
|
||||||
@@ -295,8 +295,7 @@ minstrel_tx_status(void *priv, struct ie
|
@@ -289,8 +289,7 @@ minstrel_tx_status(void *priv, struct ie
|
||||||
if (mi->sample_deferred > 0)
|
mi->r[ndx].stats.success += success;
|
||||||
mi->sample_deferred--;
|
}
|
||||||
|
|
||||||
- if (time_after(jiffies, mi->last_stats_update +
|
- if (time_after(jiffies, mi->last_stats_update +
|
||||||
- (mp->update_interval * HZ) / 1000))
|
- (mp->update_interval * HZ) / 1000))
|
||||||
|
@ -64,9 +64,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
/* Sample less often below the 10% chance of success.
|
/* Sample less often below the 10% chance of success.
|
||||||
* Sample less often above the 95% chance of success. */
|
* Sample less often above the 95% chance of success. */
|
||||||
@@ -295,7 +299,8 @@ minstrel_tx_status(void *priv, struct ie
|
@@ -289,7 +293,8 @@ minstrel_tx_status(void *priv, struct ie
|
||||||
if (mi->sample_deferred > 0)
|
mi->r[ndx].stats.success += success;
|
||||||
mi->sample_deferred--;
|
}
|
||||||
|
|
||||||
- if (time_after(jiffies, mi->last_stats_update + mp->update_interval))
|
- if (time_after(jiffies, mi->last_stats_update + mp->update_interval))
|
||||||
+ if (time_after(jiffies, mi->last_stats_update +
|
+ if (time_after(jiffies, mi->last_stats_update +
|
||||||
@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
/* statistis of packet delivery probability
|
/* statistis of packet delivery probability
|
||||||
* prob_ewma - exponential weighted moving average of prob
|
* prob_ewma - exponential weighted moving average of prob
|
||||||
* prob_ewmsd - exp. weighted moving standard deviation of prob */
|
* prob_ewmsd - exp. weighted moving standard deviation of prob */
|
||||||
@@ -114,6 +166,7 @@ struct minstrel_sta_info {
|
@@ -113,6 +165,7 @@ struct minstrel_sta_info {
|
||||||
struct minstrel_priv {
|
struct minstrel_priv {
|
||||||
struct ieee80211_hw *hw;
|
struct ieee80211_hw *hw;
|
||||||
bool has_mrr;
|
bool has_mrr;
|
||||||
@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
u32 sample_switch;
|
u32 sample_switch;
|
||||||
unsigned int cw_min;
|
unsigned int cw_min;
|
||||||
unsigned int cw_max;
|
unsigned int cw_max;
|
||||||
@@ -153,7 +206,8 @@ extern const struct rate_control_ops mac
|
@@ -152,7 +205,8 @@ extern const struct rate_control_ops mac
|
||||||
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
||||||
|
|
||||||
/* Recalculate success probabilities and counters for a given rate using EWMA */
|
/* Recalculate success probabilities and counters for a given rate using EWMA */
|
||||||
|
@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
tmp_prob_rate = i;
|
tmp_prob_rate = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -436,7 +436,7 @@ minstrel_get_rate(void *priv, struct iee
|
@@ -418,7 +418,7 @@ minstrel_get_rate(void *priv, struct iee
|
||||||
* has a probability of >95%, we shouldn't be attempting
|
* has a probability of >95%, we shouldn't be attempting
|
||||||
* to use it, as this only wastes precious airtime */
|
* to use it, as this only wastes precious airtime */
|
||||||
if (!mrr_capable &&
|
if (!mrr_capable &&
|
||||||
@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
mi->prev_sample = true;
|
mi->prev_sample = true;
|
||||||
@@ -587,7 +587,7 @@ static u32 minstrel_get_expected_through
|
@@ -570,7 +570,7 @@ static u32 minstrel_get_expected_through
|
||||||
* computing cur_tp
|
* computing cur_tp
|
||||||
*/
|
*/
|
||||||
tmp_mrs = &mi->r[idx].stats;
|
tmp_mrs = &mi->r[idx].stats;
|
||||||
@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
/* maximum retry counts */
|
/* maximum retry counts */
|
||||||
u8 retry_count;
|
u8 retry_count;
|
||||||
u8 retry_count_rtscts;
|
u8 retry_count_rtscts;
|
||||||
@@ -208,7 +205,7 @@ void minstrel_add_sta_debugfs(void *priv
|
@@ -207,7 +204,7 @@ void minstrel_add_sta_debugfs(void *priv
|
||||||
/* Recalculate success probabilities and counters for a given rate using EWMA */
|
/* Recalculate success probabilities and counters for a given rate using EWMA */
|
||||||
void minstrel_calc_rate_stats(struct minstrel_priv *mp,
|
void minstrel_calc_rate_stats(struct minstrel_priv *mp,
|
||||||
struct minstrel_rate_stats *mrs);
|
struct minstrel_rate_stats *mrs);
|
||||||
|
@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|||||||
|
|
||||||
--- a/net/mac80211/sta_info.c
|
--- a/net/mac80211/sta_info.c
|
||||||
+++ b/net/mac80211/sta_info.c
|
+++ b/net/mac80211/sta_info.c
|
||||||
@@ -322,6 +322,7 @@ struct sta_info *sta_info_alloc(struct i
|
@@ -340,6 +340,7 @@ struct sta_info *sta_info_alloc(struct i
|
||||||
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
|
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
|
||||||
INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
|
INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
|
||||||
mutex_init(&sta->ampdu_mlme.mtx);
|
mutex_init(&sta->ampdu_mlme.mtx);
|
||||||
|
@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
__NL80211_SURVEY_INFO_AFTER_LAST,
|
__NL80211_SURVEY_INFO_AFTER_LAST,
|
||||||
--- a/net/wireless/nl80211.c
|
--- a/net/wireless/nl80211.c
|
||||||
+++ b/net/wireless/nl80211.c
|
+++ b/net/wireless/nl80211.c
|
||||||
@@ -8373,6 +8373,10 @@ static int nl80211_send_survey(struct sk
|
@@ -8379,6 +8379,10 @@ static int nl80211_send_survey(struct sk
|
||||||
nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN,
|
nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN,
|
||||||
survey->time_scan, NL80211_SURVEY_INFO_PAD))
|
survey->time_scan, NL80211_SURVEY_INFO_PAD))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
From 5981fe5b0529ba25d95f37d7faa434183ad618c5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Johannes Berg <johannes.berg@intel.com>
|
|
||||||
Date: Mon, 3 Aug 2020 11:02:10 +0200
|
|
||||||
Subject: [PATCH] mac80211: fix misplaced while instead of if
|
|
||||||
|
|
||||||
This never was intended to be a 'while' loop, it should've
|
|
||||||
just been an 'if' instead of 'while'. Fix this.
|
|
||||||
|
|
||||||
I noticed this while applying another patch from Ben that
|
|
||||||
intended to fix a busy loop at this spot.
|
|
||||||
|
|
||||||
Cc: stable@vger.kernel.org
|
|
||||||
Fixes: b16798f5b907 ("mac80211: mark station unauthorized before key removal")
|
|
||||||
Reported-by: Ben Greear <greearb@candelatech.com>
|
|
||||||
Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeid
|
|
||||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
||||||
---
|
|
||||||
net/mac80211/sta_info.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/net/mac80211/sta_info.c
|
|
||||||
+++ b/net/mac80211/sta_info.c
|
|
||||||
@@ -980,7 +980,7 @@ static void __sta_info_destroy_part2(str
|
|
||||||
might_sleep();
|
|
||||||
lockdep_assert_held(&local->sta_mtx);
|
|
||||||
|
|
||||||
- while (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
|
|
||||||
+ if (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
|
|
||||||
ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
|
|
||||||
WARN_ON_ONCE(ret);
|
|
||||||
}
|
|
@ -57,7 +57,7 @@
|
|||||||
__NL80211_ATTR_AFTER_LAST,
|
__NL80211_ATTR_AFTER_LAST,
|
||||||
--- a/net/mac80211/cfg.c
|
--- a/net/mac80211/cfg.c
|
||||||
+++ b/net/mac80211/cfg.c
|
+++ b/net/mac80211/cfg.c
|
||||||
@@ -2457,6 +2457,19 @@ static int ieee80211_get_tx_power(struct
|
@@ -2458,6 +2458,19 @@ static int ieee80211_get_tx_power(struct
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@
|
|||||||
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
||||||
const u8 *addr)
|
const u8 *addr)
|
||||||
{
|
{
|
||||||
@@ -3846,6 +3859,7 @@ const struct cfg80211_ops mac80211_confi
|
@@ -3847,6 +3860,7 @@ const struct cfg80211_ops mac80211_confi
|
||||||
.set_wiphy_params = ieee80211_set_wiphy_params,
|
.set_wiphy_params = ieee80211_set_wiphy_params,
|
||||||
.set_tx_power = ieee80211_set_tx_power,
|
.set_tx_power = ieee80211_set_tx_power,
|
||||||
.get_tx_power = ieee80211_get_tx_power,
|
.get_tx_power = ieee80211_get_tx_power,
|
||||||
@ -137,7 +137,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* policy for the key attributes */
|
/* policy for the key attributes */
|
||||||
@@ -2629,6 +2630,20 @@ static int nl80211_set_wiphy(struct sk_b
|
@@ -2632,6 +2633,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user