* Re: [PATCH] ath10k: change swap mail box config for UTF mode of SDIO
From: Kalle Valo @ 2019-05-07 13:58 UTC (permalink / raw)
To: Wen Gong; +Cc: ath10k, linux-wireless
In-Reply-To: <1554870654-4236-1-git-send-email-wgong@codeaurora.org>
Wen Gong <wgong@codeaurora.org> wrote:
> For SDIO chip, it does not have HTT connect step in boot phase of UTF
> mode, so it does not need the swap configuration for UTF mode, otherwise
> it will trigger UTF load fail. For normal mode, it is swap between HTT
> and WMI, for UTF mode, it does not have HTT, so it can not swap between
> HTT and WMI.
>
> Disable swap mail box for UTF mode will let UTF mode load success.
>
> Tested with QCA6174 SDIO with firmware
> WLAN.RMH.4.4.1-00007-QCARMSWP-1.
>
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
8cdee1affe90 ath10k: change swap mail box config for UTF mode of SDIO
--
https://patchwork.kernel.org/patch/10893131/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ath10k: Fix the wrong value of enums for wmi tlv stats id
From: Kalle Valo @ 2019-05-07 13:55 UTC (permalink / raw)
To: Surabhi Vishnoi; +Cc: ath10k, linux-wireless, Surabhi Vishnoi
In-Reply-To: <1554792193-22535-1-git-send-email-svishnoi@codeaurora.org>
Surabhi Vishnoi <svishnoi@codeaurora.org> wrote:
> The enum value for WMI_TLV_STAT_PDEV, WMI_TLV_STAT_VDEV
> and WMI_TLV_STAT_PEER is wrong, due to which the vdev stats
> are not received from firmware in wmi_update_stats event.
>
> Fix the enum values for above stats to receive all stats
> from firmware in WMI_TLV_UPDATE_STATS_EVENTID.
>
> Tested HW: WCN3990
> Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1
>
> Fixes: f40a307eb92c ("ath10k: Fill rx duration for each peer in fw_stats for WCN3990)
> Signed-off-by: Surabhi Vishnoi <svishnoi@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
9280f4fc06f4 ath10k: Fix the wrong value of enums for wmi tlv stats id
--
https://patchwork.kernel.org/patch/10890577/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH][next] ath10k: coredump: use struct_size() helper
From: Kalle Valo @ 2019-05-07 13:53 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: David S. Miller, ath10k, linux-wireless, netdev, linux-kernel,
Gustavo A. R. Silva
In-Reply-To: <20190403190636.GA9827@embeddedor>
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> Make use of the struct_size() helper instead of an open-coded version
> in order to avoid any potential type mistakes, in particular in the
> context in which this code is being used.
>
> So, replace code of the following form:
>
> sizeof(*ce_hdr) + CE_COUNT * sizeof(ce_hdr->entries[0])
>
> with:
>
> struct_size(ce_hdr, entries, CE_COUNT)
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
4f735cd73650 ath10k: coredump: use struct_size() helper
--
https://patchwork.kernel.org/patch/10884377/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH][next] ath10k: Use struct_size() helper
From: Kalle Valo @ 2019-05-07 13:51 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: David S. Miller, ath10k, linux-wireless, netdev, linux-kernel,
Gustavo A. R. Silva
In-Reply-To: <20190403172029.GA302@embeddedor>
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> Make use of the struct_size() helper instead of an open-coded version
> in order to avoid any potential type mistakes, in particular in the
> context in which this code is being used.
>
> So, change the following form:
>
> sizeof(*rx) + (sizeof(struct htt_rx_indication_mpdu_range) * num_mpdu_ranges)
>
> to :
>
> struct_size(rx, mpdu_ranges, num_mpdu_ranges)
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
35b50e70df27 ath10k: Use struct_size() helper
--
https://patchwork.kernel.org/patch/10884271/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ath10k: Fix encoding for protected management frames
From: Kalle Valo @ 2019-05-07 13:50 UTC (permalink / raw)
To: Rakesh Pillai; +Cc: ath10k, linux-wireless, Rakesh Pillai
In-Reply-To: <1554208970-16527-1-git-send-email-pillair@codeaurora.org>
Rakesh Pillai <pillair@codeaurora.org> wrote:
> Currently the protected management frames are
> not appended with the MIC_LEN which results in
> the protected management frames being encoded
> incorrectly.
>
> Add the extra space at the end of the protected
> management frames to fix this encoding error for
> the protected management frames.
>
> Tested HW: WCN3990
> Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1
>
> Fixes: 1807da49733e ("ath10k: wmi: add management tx by reference support over wmi")
> Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
42f1bc43e6a9 ath10k: Fix encoding for protected management frames
--
https://patchwork.kernel.org/patch/10881571/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ath10k: rx_duration update for fw_stats debugfs entry
From: Kalle Valo @ 2019-05-07 13:44 UTC (permalink / raw)
To: Balaji Pothunoori; +Cc: ath10k, linux-wireless, Balaji Pothunoori
In-Reply-To: <1552389470-28405-1-git-send-email-bpothuno@codeaurora.org>
Balaji Pothunoori <bpothuno@codeaurora.org> wrote:
> Currently instant rx_duration always fetching as zero
> in fw_stats debugfs entry if extended peer stats event
> supports.
>
> This patch updates instant rx_duration in fw_stats entry
> based on extended peer stats and maintaining backward
> compatibility for 10.2/10.x.
>
> Tested HW: QCA9984.
> Tested FW: 10.4-3.6.0.1-00004.
>
> Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
5c51875c0943 ath10k: rx_duration update for fw_stats debugfs entry
--
https://patchwork.kernel.org/patch/10849119/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ath10k: Fix the tx stats bytes & packets parsing
From: Kalle Valo @ 2019-05-07 13:43 UTC (permalink / raw)
To: Brandon Huang; +Cc: ath10k, linux-wireless, Brandon Huang
In-Reply-To: <1552365219-16842-1-git-send-email-yanghuan@codeaurora.org>
Brandon Huang <yanghuan@codeaurora.org> wrote:
> In tx_stats debugfs, txrate->flags may contain multiple bits. For
> example, RATE_INFO_FLAGS_SHORT_GI could be set, and tx stats bytes
> and packets will be not updated correctly.
>
> Fix this issue by using bit operation to check txrate->flags.
>
> Tested HW: QCA9984
> Tested Firmware: 10.4-3.9.0.1-00007
>
> Signed-off-by: Brandon Huang <yanghuan@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
9e0b341a3d66 ath10k: Fix the tx stats bytes & packets parsing
--
https://patchwork.kernel.org/patch/10848577/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ath10k: Modify CE4 src buffer entries to 2048 for WCN3990
From: Kalle Valo @ 2019-05-07 13:41 UTC (permalink / raw)
To: Govind Singh; +Cc: ath10k, linux-wireless, Govind Singh
In-Reply-To: <20190302043605.27626-1-govinds@codeaurora.org>
Govind Singh <govinds@codeaurora.org> wrote:
> CE4 is host to target HTT tx pipe, tx completion are not served
> on time when CPU is loaded and this cause ce src ring full condition
> due to less no of src buffer entries.
>
> To mitigate the issue increase CE4 src buffer entries to 2048.
>
> Testing:
> Tested on QCS404 platform(WCN3990 HW)
> Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1
>
> Signed-off-by: Govind Singh <govinds@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
889ab61d9dc1 ath10k: Modify CE4 src buffer entries to 2048 for WCN3990
--
https://patchwork.kernel.org/patch/10836431/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ath10k: Move board id and fw version logging to info level
From: Kalle Valo @ 2019-05-07 13:39 UTC (permalink / raw)
To: Govind Singh; +Cc: ath10k, linux-wireless, Govind Singh
In-Reply-To: <20190301145000.22624-1-govinds@codeaurora.org>
Govind Singh <govinds@codeaurora.org> wrote:
> Board id and fw version is not printed by default in qmi
> cap response message. Move board id and fw version logging
> to info level for default logging.
>
> [ 34.005399] ath10k_snoc a000000.wifi: qmi chip_id 0x30b chip_family 0x4001 board_id 0xff soc_id 0x40070000
> [ 34.005432] ath10k_snoc a000000.wifi: qmi fw_version 0x3106836b fw_build_timestamp 2019-02-13 10:24 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.3.1-00875-QCAHLSWMTPL-1
>
> Signed-off-by: Govind Singh <govinds@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
7b612ed94d0a ath10k: Move board id and fw version logging to info level
--
https://patchwork.kernel.org/patch/10835539/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH 1/2] ath10k: Extended the HTT stats support to retrieve Mu-MIMO related stats
From: Kalle Valo @ 2019-05-07 13:38 UTC (permalink / raw)
To: Maharaja Kennadyrajan
Cc: ath10k, linux-wireless, vikpatel, arnagara, Maharaja Kennadyrajan
In-Reply-To: <1551266682-32073-1-git-send-email-mkenna@codeaurora.org>
Maharaja Kennadyrajan <mkenna@codeaurora.org> wrote:
> Extended the bit mask value of the HTT stats to get the Mu-MIMO
> related stats via tracing.
>
> Signed-off-by: Maharaja Kennadyrajan <mkenna@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2 patches applied to ath-next branch of ath.git, thanks.
14bf9217d66d ath10k: Extended the HTT stats support to retrieve Mu-MIMO related stats
473a4084e19e ath10k: Added support to reset HTT stats in debugfs
--
https://patchwork.kernel.org/patch/10831589/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [RFC] rtlwifi: rtl8821ae: Use inline routines rather than macros for descriptor word 0
From: Stanislaw Gruszka @ 2019-05-07 12:36 UTC (permalink / raw)
To: Larry Finger; +Cc: kvalo, linux-wireless, pkshih
In-Reply-To: <20190506173916.16486-1-Larry.Finger@lwfinger.net>
On Mon, May 06, 2019 at 12:39:16PM -0500, Larry Finger wrote:
> The driver uses complicated macros to set parts of word 0 of the TX and RX
> descriptors. These are changed into inline routines.
Why not use le32p_replace_bits() like rtw88 in
drivers/net/wireless/realtek/rtw88/tx.h ?
Stanislaw
^ permalink raw reply
* Re: [PATCH v2] ath10k: fix different tx duration output
From: Toke Høiland-Jørgensen @ 2019-05-07 11:43 UTC (permalink / raw)
To: leiwa; +Cc: ath10k, linux-wireless
In-Reply-To: <ef8c4fec57a8117b98e30c904fc1a3f5@codeaurora.org>
leiwa@codeaurora.org writes:
> On 2019-04-18 16:07, Toke Høiland-Jørgensen wrote:
>> leiwa@codeaurora.org writes:
>>
>>> On 2019-04-17 17:26, Toke Høiland-Jørgensen wrote:
>>>> Lei Wang <leiwa@codeaurora.org> writes:
>>>>
>>>>> TX duration output of tx_stats in debugfs and station dump had big
>>>>> difference because they got tx duration value from different
>>>>> statistic
>>>>> data. We should use the same statistic data.
>>>>
>>>> So are you sure you picked the most accurate one of the two? :)
>>>>
>>>> -Toke
>>>
>>> Hi Toke,
>>>
>>> Yes.
>>> Now for ath10k, there are two ways to get tx duration output.
>>> One is got from tx_stats in debugfs reported by firmware. It is a
>>> total
>>> value including all the frames which created by host and firmware sent
>>> to the peer.
>>> And the second is calculated from
>>> ath10k_htt_rx_tx_compl_ind()-->ieee80211_sta_register_airtime(), here
>>> the tx duration just includes the data frames sent from host to the
>>> peer.
>>
>> So the difference is that the former includes control frames as well?
>> Is
>> that the only difference? And what exactly is a "big difference" (from
>> the commit message)?
>>
> Yes,it adds the duration time of receiving ACK frames.
> From my test,TX from AP to station with iperf UDP test in
> 10s,tx_stats->tx_duration:5496623us,
> and another value is 3934327us.
Hmm, that's quite a big difference. Is this really only ACKs, or is it
also a question of whether retries are accounted? If so, it may actually
be that what we should do is change which value is passed to
ieee80211_sta_register_airtime()?
>>> So the first value is preferable for station dump.
>>
>> Hmm, I'm not sure if I agree with this. I specifically added the
>> tx_duration to the station dump to be able to get the values used by
>> the
>> airtime scheduler. This breaks with this patch.
>>
>> -Toke
> From our internal discussing, we will revert this change.
Cool, but see above :)
-Toke
^ permalink raw reply
* Re: [PATCH v2] ath10k: fix different tx duration output
From: leiwa @ 2019-05-07 11:14 UTC (permalink / raw)
To: Toke Høiland-Jørgensen; +Cc: ath10k, linux-wireless
In-Reply-To: <875zrbrb1q.fsf@toke.dk>
On 2019-04-18 16:07, Toke Høiland-Jørgensen wrote:
> leiwa@codeaurora.org writes:
>
>> On 2019-04-17 17:26, Toke Høiland-Jørgensen wrote:
>>> Lei Wang <leiwa@codeaurora.org> writes:
>>>
>>>> TX duration output of tx_stats in debugfs and station dump had big
>>>> difference because they got tx duration value from different
>>>> statistic
>>>> data. We should use the same statistic data.
>>>
>>> So are you sure you picked the most accurate one of the two? :)
>>>
>>> -Toke
>>
>> Hi Toke,
>>
>> Yes.
>> Now for ath10k, there are two ways to get tx duration output.
>> One is got from tx_stats in debugfs reported by firmware. It is a
>> total
>> value including all the frames which created by host and firmware sent
>> to the peer.
>> And the second is calculated from
>> ath10k_htt_rx_tx_compl_ind()-->ieee80211_sta_register_airtime(), here
>> the tx duration just includes the data frames sent from host to the
>> peer.
>
> So the difference is that the former includes control frames as well?
> Is
> that the only difference? And what exactly is a "big difference" (from
> the commit message)?
>
Yes,it adds the duration time of receiving ACK frames.
From my test,TX from AP to station with iperf UDP test in
10s,tx_stats->tx_duration:5496623us,
and another value is 3934327us.
>> So the first value is preferable for station dump.
>
> Hmm, I'm not sure if I agree with this. I specifically added the
> tx_duration to the station dump to be able to get the values used by
> the
> airtime scheduler. This breaks with this patch.
>
> -Toke
From our internal discussing, we will revert this change.
Thanks.
Lei
^ permalink raw reply
* Re: [PATCH] ath10k: remove mmc_hw_reset while hif power down
From: Kalle Valo @ 2019-05-07 9:34 UTC (permalink / raw)
To: Wen Gong
Cc: Grant Grundler, Wen Gong, linux-wireless@vger.kernel.org,
ath10k@lists.infradead.org, Ulf Hansson
In-Reply-To: <36950ff25c0747629e60ccb68819e93a@aptaiexm02f.ap.qualcomm.com>
+ Ulf to give comments from SDIO point of view
Wen Gong <wgong@qti.qualcomm.com> writes:
>> -----Original Message-----
>> From: ath10k <ath10k-bounces@lists.infradead.org> On Behalf Of Grant
>> Grundler
>> Sent: Saturday, May 4, 2019 2:01 AM
>> To: Wen Gong <wgong@codeaurora.org>
>> Cc: linux-wireless@vger.kernel.org; ath10k@lists.infradead.org
>> Subject: [EXT] Re: [PATCH] ath10k: remove mmc_hw_reset while hif power
>> down
>>
>> [repeating comments I made in the gerrit review for Chrome OS :
>> https://chromium-
>> review.googlesource.com/c/chromiumos/third_party/kernel/+/1585667
>> ]
>>
>> On Sat, Apr 27, 2019 at 7:17 PM Wen Gong <wgong@codeaurora.org> wrote:
>> >
>> > For sdio 3.0 chip, the clock will drop from 200M Hz to 50M Hz after load
>> > ath10k driver, it is because mmc_hw_reset will reset the sdio's power,
>> > then mmc will consider it as sdio 2.0 and drop the clock.
>>
>> Wen,
>> 5468e784c0600551ca03263f5255a375c05f88e7 commit message gives
>> reasons
>> for adding the mmc_hw_reset() call. The commit message for removing
>> gives different reason for removal. Both are good but second one is
>> incomplete.
>>
>> The commit message for removal should ALSO explain why adding this
>> call wasn't necessary in the first place OR move the call to a
>> different code path.
>>
>> > Remove mmc_hw_reset will avoid the drop of clock.
>>
>> This commit message makes it clear the original patch introduced a new
>> problem. But the original patch fixed a different problem and that
>> this proposed change seems likely to re-introduce and the commit
>> message should explain why that isn't true (or how the original was
>> fixed differently)
>
> The mmc_hw_reset's effect depends on the hardware layout/configure
> software's behavior, recently it will effect the clock of sdio for the
> platform I used. And it will still work well without mmc_hw_reset for
> the platform I Used currently. If sdio cannot work on other platform,
> I think it can add flag in ath10k_hw_params_list for the platform to
> call the mmc_hw_reset depends on the flag.
I don't see how you can use ath10k_hw_params_list to separate SDIO
controller functionality, I assume that's the real reason for difference
of functionality? Maybe this is a bug on the SDIO controller?
Ulf, what do you think? Any suggestions? Full discussion here:
https://patchwork.kernel.org/patch/10920563/
--
Kalle Valo
^ permalink raw reply
* [PATCH] mt76: mt7615: add static qualifier to mt7615_rx_poll_complete
From: Lorenzo Bianconi @ 2019-05-07 9:03 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, ryder.lee, royluo
In-Reply-To: <cover.1557219723.git.lorenzo@kernel.org>
Make mt7615_rx_poll_complete static since it is used just in pci.c
to initialize rx_poll_complete function pointer
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 -
drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
index 895c2904d7eb..be09a6e9f15b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
@@ -180,7 +180,6 @@ void mt7615_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
void mt7615_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
struct sk_buff *skb);
-void mt7615_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q);
void mt7615_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps);
int mt7615_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/pci.c b/drivers/net/wireless/mediatek/mt76/mt7615/pci.c
index 10a249e13a43..7a41faac997a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/pci.c
@@ -27,7 +27,8 @@ u32 mt7615_reg_map(struct mt7615_dev *dev, u32 addr)
return MT_PCIE_REMAP_BASE_2 + offset;
}
-void mt7615_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q)
+static void
+mt7615_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q)
{
struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 5.0 11/99] mac80211: fix unaligned access in mesh table hash function
From: Sasha Levin @ 2019-05-07 5:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Felix Fietkau, Johannes Berg, Sasha Levin, linux-wireless, netdev
In-Reply-To: <20190507053235.29900-1-sashal@kernel.org>
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit 40586e3fc400c00c11151804dcdc93f8c831c808 ]
The pointer to the last four bytes of the address is not guaranteed to be
aligned, so we need to use __get_unaligned_cpu32 here
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/mesh_pathtbl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 88a6d5e18ccc..ac1f5db52994 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -23,7 +23,7 @@ static void mesh_path_free_rcu(struct mesh_table *tbl, struct mesh_path *mpath);
static u32 mesh_table_hash(const void *addr, u32 len, u32 seed)
{
/* Use last four bytes of hw addr as hash index */
- return jhash_1word(*(u32 *)(addr+2), seed);
+ return jhash_1word(__get_unaligned_cpu32((u8 *)addr + 2), seed);
}
static const struct rhashtable_params mesh_rht_params = {
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 5.0 13/99] cfg80211: Handle WMM rules in regulatory domain intersection
From: Sasha Levin @ 2019-05-07 5:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Ilan Peer, Luca Coelho, Johannes Berg, Sasha Levin,
linux-wireless, netdev
In-Reply-To: <20190507053235.29900-1-sashal@kernel.org>
From: Ilan Peer <ilan.peer@intel.com>
[ Upstream commit 08a75a887ee46828b54600f4bb7068d872a5edd5 ]
The support added for regulatory WMM rules did not handle
the case of regulatory domain intersections. Fix it.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Fixes: 230ebaa189af ("cfg80211: read wmm rules from regulatory database")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/reg.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index dd58b9909ac9..649c89946dec 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1298,6 +1298,16 @@ reg_intersect_dfs_region(const enum nl80211_dfs_regions dfs_region1,
return dfs_region1;
}
+static void reg_wmm_rules_intersect(const struct ieee80211_wmm_ac *wmm_ac1,
+ const struct ieee80211_wmm_ac *wmm_ac2,
+ struct ieee80211_wmm_ac *intersect)
+{
+ intersect->cw_min = max_t(u16, wmm_ac1->cw_min, wmm_ac2->cw_min);
+ intersect->cw_max = max_t(u16, wmm_ac1->cw_max, wmm_ac2->cw_max);
+ intersect->cot = min_t(u16, wmm_ac1->cot, wmm_ac2->cot);
+ intersect->aifsn = max_t(u8, wmm_ac1->aifsn, wmm_ac2->aifsn);
+}
+
/*
* Helper for regdom_intersect(), this does the real
* mathematical intersection fun
@@ -1312,6 +1322,8 @@ static int reg_rules_intersect(const struct ieee80211_regdomain *rd1,
struct ieee80211_freq_range *freq_range;
const struct ieee80211_power_rule *power_rule1, *power_rule2;
struct ieee80211_power_rule *power_rule;
+ const struct ieee80211_wmm_rule *wmm_rule1, *wmm_rule2;
+ struct ieee80211_wmm_rule *wmm_rule;
u32 freq_diff, max_bandwidth1, max_bandwidth2;
freq_range1 = &rule1->freq_range;
@@ -1322,6 +1334,10 @@ static int reg_rules_intersect(const struct ieee80211_regdomain *rd1,
power_rule2 = &rule2->power_rule;
power_rule = &intersected_rule->power_rule;
+ wmm_rule1 = &rule1->wmm_rule;
+ wmm_rule2 = &rule2->wmm_rule;
+ wmm_rule = &intersected_rule->wmm_rule;
+
freq_range->start_freq_khz = max(freq_range1->start_freq_khz,
freq_range2->start_freq_khz);
freq_range->end_freq_khz = min(freq_range1->end_freq_khz,
@@ -1365,6 +1381,29 @@ static int reg_rules_intersect(const struct ieee80211_regdomain *rd1,
intersected_rule->dfs_cac_ms = max(rule1->dfs_cac_ms,
rule2->dfs_cac_ms);
+ if (rule1->has_wmm && rule2->has_wmm) {
+ u8 ac;
+
+ for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
+ reg_wmm_rules_intersect(&wmm_rule1->client[ac],
+ &wmm_rule2->client[ac],
+ &wmm_rule->client[ac]);
+ reg_wmm_rules_intersect(&wmm_rule1->ap[ac],
+ &wmm_rule2->ap[ac],
+ &wmm_rule->ap[ac]);
+ }
+
+ intersected_rule->has_wmm = true;
+ } else if (rule1->has_wmm) {
+ *wmm_rule = *wmm_rule1;
+ intersected_rule->has_wmm = true;
+ } else if (rule2->has_wmm) {
+ *wmm_rule = *wmm_rule2;
+ intersected_rule->has_wmm = true;
+ } else {
+ intersected_rule->has_wmm = false;
+ }
+
if (!is_valid_reg_rule(intersected_rule))
return -EINVAL;
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 5.0 14/99] mac80211: fix memory accounting with A-MSDU aggregation
From: Sasha Levin @ 2019-05-07 5:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Felix Fietkau, Toke Høiland-Jørgensen, Johannes Berg,
Sasha Levin, linux-wireless, netdev
In-Reply-To: <20190507053235.29900-1-sashal@kernel.org>
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit eb9b64e3a9f8483e6e54f4e03b2ae14ae5db2690 ]
skb->truesize can change due to memory reallocation or when adding extra
fragments. Adjust fq->memory_usage accordingly
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 928f13a208b0..714d80e48a10 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3214,6 +3214,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
u8 max_subframes = sta->sta.max_amsdu_subframes;
int max_frags = local->hw.max_tx_fragments;
int max_amsdu_len = sta->sta.max_amsdu_len;
+ int orig_truesize;
__be16 len;
void *data;
bool ret = false;
@@ -3254,6 +3255,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
if (!head || skb_is_gso(head))
goto out;
+ orig_truesize = head->truesize;
orig_len = head->len;
if (skb->len + head->len > max_amsdu_len)
@@ -3311,6 +3313,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
*frag_tail = skb;
out_recalc:
+ fq->memory_usage += head->truesize - orig_truesize;
if (head->len != orig_len) {
flow->backlog += head->len - orig_len;
tin->backlog_bytes += head->len - orig_len;
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 5.0 12/99] mac80211: Increase MAX_MSG_LEN
From: Sasha Levin @ 2019-05-07 5:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Andrei Otcheretianski, Luca Coelho, Johannes Berg, Sasha Levin,
linux-wireless, netdev
In-Reply-To: <20190507053235.29900-1-sashal@kernel.org>
From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
[ Upstream commit 78be2d21cc1cd3069c6138dcfecec62583130171 ]
Looks that 100 chars isn't enough for messages, as we keep getting
warnings popping from different places due to message shortening.
Instead of trying to shorten the prints, just increase the buffer size.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/trace_msg.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/trace_msg.h b/net/mac80211/trace_msg.h
index 366b9e6f043e..40141df09f25 100644
--- a/net/mac80211/trace_msg.h
+++ b/net/mac80211/trace_msg.h
@@ -1,4 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Portions of this file
+ * Copyright (C) 2019 Intel Corporation
+ */
+
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
#if !defined(__MAC80211_MSG_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
@@ -11,7 +16,7 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM mac80211_msg
-#define MAX_MSG_LEN 100
+#define MAX_MSG_LEN 120
DECLARE_EVENT_CLASS(mac80211_msg_event,
TP_PROTO(struct va_format *vaf),
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 5.0 15/99] nl80211: Add NL80211_FLAG_CLEAR_SKB flag for other NL commands
From: Sasha Levin @ 2019-05-07 5:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sunil Dutt, Johannes Berg, Sasha Levin, linux-wireless, netdev
In-Reply-To: <20190507053235.29900-1-sashal@kernel.org>
From: Sunil Dutt <usdutt@codeaurora.org>
[ Upstream commit d6db02a88a4aaa1cd7105137c67ddec7f3bdbc05 ]
This commit adds NL80211_FLAG_CLEAR_SKB flag to other NL commands
that carry key data to ensure they do not stick around on heap
after the SKB is freed.
Also introduced this flag for NL80211_CMD_VENDOR as there are sub
commands which configure the keys.
Signed-off-by: Sunil Dutt <usdutt@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/nl80211.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d91a408db113..156ce708b533 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -13596,7 +13596,8 @@ static const struct genl_ops nl80211_ops[] = {
.policy = nl80211_policy,
.flags = GENL_UNS_ADMIN_PERM,
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
- NL80211_FLAG_NEED_RTNL,
+ NL80211_FLAG_NEED_RTNL |
+ NL80211_FLAG_CLEAR_SKB,
},
{
.cmd = NL80211_CMD_DEAUTHENTICATE,
@@ -13647,7 +13648,8 @@ static const struct genl_ops nl80211_ops[] = {
.policy = nl80211_policy,
.flags = GENL_UNS_ADMIN_PERM,
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
- NL80211_FLAG_NEED_RTNL,
+ NL80211_FLAG_NEED_RTNL |
+ NL80211_FLAG_CLEAR_SKB,
},
{
.cmd = NL80211_CMD_UPDATE_CONNECT_PARAMS,
@@ -13655,7 +13657,8 @@ static const struct genl_ops nl80211_ops[] = {
.policy = nl80211_policy,
.flags = GENL_ADMIN_PERM,
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
- NL80211_FLAG_NEED_RTNL,
+ NL80211_FLAG_NEED_RTNL |
+ NL80211_FLAG_CLEAR_SKB,
},
{
.cmd = NL80211_CMD_DISCONNECT,
@@ -13684,7 +13687,8 @@ static const struct genl_ops nl80211_ops[] = {
.policy = nl80211_policy,
.flags = GENL_UNS_ADMIN_PERM,
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
- NL80211_FLAG_NEED_RTNL,
+ NL80211_FLAG_NEED_RTNL |
+ NL80211_FLAG_CLEAR_SKB,
},
{
.cmd = NL80211_CMD_DEL_PMKSA,
@@ -14036,7 +14040,8 @@ static const struct genl_ops nl80211_ops[] = {
.policy = nl80211_policy,
.flags = GENL_UNS_ADMIN_PERM,
.internal_flags = NL80211_FLAG_NEED_WIPHY |
- NL80211_FLAG_NEED_RTNL,
+ NL80211_FLAG_NEED_RTNL |
+ NL80211_FLAG_CLEAR_SKB,
},
{
.cmd = NL80211_CMD_SET_QOS_MAP,
@@ -14091,7 +14096,8 @@ static const struct genl_ops nl80211_ops[] = {
.doit = nl80211_set_pmk,
.policy = nl80211_policy,
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
- NL80211_FLAG_NEED_RTNL,
+ NL80211_FLAG_NEED_RTNL |
+ NL80211_FLAG_CLEAR_SKB,
},
{
.cmd = NL80211_CMD_DEL_PMK,
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 5.0 20/99] mac80211: Honor SW_CRYPTO_CONTROL for unicast keys in AP VLAN mode
From: Sasha Levin @ 2019-05-07 5:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alexander Wetzel, Johannes Berg, Sasha Levin, linux-wireless,
netdev
In-Reply-To: <20190507053235.29900-1-sashal@kernel.org>
From: Alexander Wetzel <alexander@wetzel-home.de>
[ Upstream commit 78ad2341521d5ea96cb936244ed4c4c4ef9ec13b ]
Restore SW_CRYPTO_CONTROL operation on AP_VLAN interfaces for unicast
keys, the original override was intended to be done for group keys as
those are treated specially by mac80211 and would always have been
rejected.
Now the situation is that AP_VLAN support must be enabled by the driver
if it can support it (meaning it can support software crypto GTK TX).
Thus, also simplify the code - if we get here with AP_VLAN and non-
pairwise key, software crypto must be used (driver doesn't know about
the interface) and can be used (driver must've advertised AP_VLAN if
it also uses SW_CRYPTO_CONTROL).
Fixes: db3bdcb9c3ff ("mac80211: allow AP_VLAN operation on crypto controlled devices")
Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/key.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 4700718e010f..37e372896230 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -167,8 +167,10 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
* The driver doesn't know anything about VLAN interfaces.
* Hence, don't send GTKs for VLAN interfaces to the driver.
*/
- if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE))
+ if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
+ ret = 1;
goto out_unsupported;
+ }
}
ret = drv_set_key(key->local, SET_KEY, sdata,
@@ -213,11 +215,8 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
/* all of these we can do in software - if driver can */
if (ret == 1)
return 0;
- if (ieee80211_hw_check(&key->local->hw, SW_CRYPTO_CONTROL)) {
- if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
- return 0;
+ if (ieee80211_hw_check(&key->local->hw, SW_CRYPTO_CONTROL))
return -EINVAL;
- }
return 0;
default:
return -EINVAL;
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 4.19 11/81] mac80211: fix unaligned access in mesh table hash function
From: Sasha Levin @ 2019-05-07 5:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Felix Fietkau, Johannes Berg, Sasha Levin, linux-wireless, netdev
In-Reply-To: <20190507053554.30848-1-sashal@kernel.org>
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit 40586e3fc400c00c11151804dcdc93f8c831c808 ]
The pointer to the last four bytes of the address is not guaranteed to be
aligned, so we need to use __get_unaligned_cpu32 here
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/mesh_pathtbl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index c3a7396fb955..49a90217622b 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -23,7 +23,7 @@ static void mesh_path_free_rcu(struct mesh_table *tbl, struct mesh_path *mpath);
static u32 mesh_table_hash(const void *addr, u32 len, u32 seed)
{
/* Use last four bytes of hw addr as hash index */
- return jhash_1word(*(u32 *)(addr+2), seed);
+ return jhash_1word(__get_unaligned_cpu32((u8 *)addr + 2), seed);
}
static const struct rhashtable_params mesh_rht_params = {
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 4.19 12/81] mac80211: Increase MAX_MSG_LEN
From: Sasha Levin @ 2019-05-07 5:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Andrei Otcheretianski, Luca Coelho, Johannes Berg, Sasha Levin,
linux-wireless, netdev
In-Reply-To: <20190507053554.30848-1-sashal@kernel.org>
From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
[ Upstream commit 78be2d21cc1cd3069c6138dcfecec62583130171 ]
Looks that 100 chars isn't enough for messages, as we keep getting
warnings popping from different places due to message shortening.
Instead of trying to shorten the prints, just increase the buffer size.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/trace_msg.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/trace_msg.h b/net/mac80211/trace_msg.h
index 366b9e6f043e..40141df09f25 100644
--- a/net/mac80211/trace_msg.h
+++ b/net/mac80211/trace_msg.h
@@ -1,4 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Portions of this file
+ * Copyright (C) 2019 Intel Corporation
+ */
+
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
#if !defined(__MAC80211_MSG_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
@@ -11,7 +16,7 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM mac80211_msg
-#define MAX_MSG_LEN 100
+#define MAX_MSG_LEN 120
DECLARE_EVENT_CLASS(mac80211_msg_event,
TP_PROTO(struct va_format *vaf),
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 4.19 14/81] mac80211: fix memory accounting with A-MSDU aggregation
From: Sasha Levin @ 2019-05-07 5:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Felix Fietkau, Toke Høiland-Jørgensen, Johannes Berg,
Sasha Levin, linux-wireless, netdev
In-Reply-To: <20190507053554.30848-1-sashal@kernel.org>
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit eb9b64e3a9f8483e6e54f4e03b2ae14ae5db2690 ]
skb->truesize can change due to memory reallocation or when adding extra
fragments. Adjust fq->memory_usage accordingly
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 743cde66aaf6..2f726cde9998 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3185,6 +3185,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
u8 max_subframes = sta->sta.max_amsdu_subframes;
int max_frags = local->hw.max_tx_fragments;
int max_amsdu_len = sta->sta.max_amsdu_len;
+ int orig_truesize;
__be16 len;
void *data;
bool ret = false;
@@ -3218,6 +3219,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
if (!head)
goto out;
+ orig_truesize = head->truesize;
orig_len = head->len;
if (skb->len + head->len > max_amsdu_len)
@@ -3272,6 +3274,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
*frag_tail = skb;
out_recalc:
+ fq->memory_usage += head->truesize - orig_truesize;
if (head->len != orig_len) {
flow->backlog += head->len - orig_len;
tin->backlog_bytes += head->len - orig_len;
--
2.20.1
^ permalink raw reply related
* [PATCH AUTOSEL 4.19 18/81] mac80211: Honor SW_CRYPTO_CONTROL for unicast keys in AP VLAN mode
From: Sasha Levin @ 2019-05-07 5:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alexander Wetzel, Johannes Berg, Sasha Levin, linux-wireless,
netdev
In-Reply-To: <20190507053554.30848-1-sashal@kernel.org>
From: Alexander Wetzel <alexander@wetzel-home.de>
[ Upstream commit 78ad2341521d5ea96cb936244ed4c4c4ef9ec13b ]
Restore SW_CRYPTO_CONTROL operation on AP_VLAN interfaces for unicast
keys, the original override was intended to be done for group keys as
those are treated specially by mac80211 and would always have been
rejected.
Now the situation is that AP_VLAN support must be enabled by the driver
if it can support it (meaning it can support software crypto GTK TX).
Thus, also simplify the code - if we get here with AP_VLAN and non-
pairwise key, software crypto must be used (driver doesn't know about
the interface) and can be used (driver must've advertised AP_VLAN if
it also uses SW_CRYPTO_CONTROL).
Fixes: db3bdcb9c3ff ("mac80211: allow AP_VLAN operation on crypto controlled devices")
Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/key.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index c054ac85793c..f20bb39f492d 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -167,8 +167,10 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
* The driver doesn't know anything about VLAN interfaces.
* Hence, don't send GTKs for VLAN interfaces to the driver.
*/
- if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE))
+ if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
+ ret = 1;
goto out_unsupported;
+ }
}
ret = drv_set_key(key->local, SET_KEY, sdata,
@@ -213,11 +215,8 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
/* all of these we can do in software - if driver can */
if (ret == 1)
return 0;
- if (ieee80211_hw_check(&key->local->hw, SW_CRYPTO_CONTROL)) {
- if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
- return 0;
+ if (ieee80211_hw_check(&key->local->hw, SW_CRYPTO_CONTROL))
return -EINVAL;
- }
return 0;
default:
return -EINVAL;
--
2.20.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox