1e89b4d4f2118530c98f47e35891c55327d0a8d9
[openwrt/staging/hauke.git] / package / kernel / mac80211 / patches / ath11k / 0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch
1 From dd1c2322694522f674c874f5fa02ac5ae39135dd Mon Sep 17 00:00:00 2001
2 From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
3 Date: Mon, 31 Oct 2022 12:43:41 +0100
4 Subject: [PATCH] wifi: ath11k: synchronize
5 ath11k_mac_he_gi_to_nl80211_he_gi()'s return type
6
7 ath11k_mac_he_gi_to_nl80211_he_gi() generates a valid warning with gcc-13:
8 drivers/net/wireless/ath/ath11k/mac.c:321:20: error: conflicting types for 'ath11k_mac_he_gi_to_nl80211_he_gi' due to enum/integer mismatch; have 'enum nl80211_he_gi(u8)'
9 drivers/net/wireless/ath/ath11k/mac.h:166:5: note: previous declaration of 'ath11k_mac_he_gi_to_nl80211_he_gi' with type 'u32(u8)'
10
11 I.e. the type of the return value ath11k_mac_he_gi_to_nl80211_he_gi() in
12 the declaration is u32, while the definition spells enum nl80211_he_gi.
13 Synchronize them to the latter.
14
15 Cc: Martin Liska <mliska@suse.cz>
16 Cc: Kalle Valo <kvalo@kernel.org>
17 Cc: "David S. Miller" <davem@davemloft.net>
18 Cc: Eric Dumazet <edumazet@google.com>
19 Cc: Jakub Kicinski <kuba@kernel.org>
20 Cc: Paolo Abeni <pabeni@redhat.com>
21 Cc: ath11k@lists.infradead.org
22 Cc: linux-wireless@vger.kernel.org
23 Cc: netdev@vger.kernel.org
24 Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
25 Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
26 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
27 Link: https://lore.kernel.org/r/20221031114341.10377-1-jirislaby@kernel.org
28 ---
29 drivers/net/wireless/ath/ath11k/mac.h | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32 --- a/drivers/net/wireless/ath/ath11k/mac.h
33 +++ b/drivers/net/wireless/ath/ath11k/mac.h
34 @@ -163,7 +163,7 @@ void ath11k_mac_drain_tx(struct ath11k *
35 void ath11k_mac_peer_cleanup_all(struct ath11k *ar);
36 int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx);
37 u8 ath11k_mac_bw_to_mac80211_bw(u8 bw);
38 -u32 ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
39 +enum nl80211_he_gi ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
40 enum nl80211_he_ru_alloc ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(u16 ru_phy);
41 enum nl80211_he_ru_alloc ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones);
42 enum ath11k_supported_bw ath11k_mac_mac80211_bw_to_ath11k_bw(enum rate_info_bw bw);