mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +00:00
71 lines
2.2 KiB
Diff
71 lines
2.2 KiB
Diff
From 7f105d59ad8eef9b136999a7988201170f39479c Mon Sep 17 00:00:00 2001
|
|
From: Aloka Dixit <quic_alokad@quicinc.com>
|
|
Date: Fri, 21 Jan 2022 12:11:09 -0800
|
|
Subject: [PATCH 08/14] ath12k: move vif parameter setting in a different
|
|
function
|
|
|
|
Move the configuration of struct ath12k_vif parameters rsnie_present,
|
|
wpaie_present and vht_cap to a separate function.
|
|
|
|
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
|
|
---
|
|
drivers/net/wireless/ath/ath12k/mac.c | 33 ++++++++++++++++-----------
|
|
1 file changed, 20 insertions(+), 13 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
|
@@ -1176,6 +1176,25 @@ err_mon_del:
|
|
return 0;
|
|
}
|
|
|
|
+static void ath12k_mac_setup_bcn_tmpl_vif_params(struct ath12k_vif *arvif,
|
|
+ struct sk_buff *bcn)
|
|
+{
|
|
+ struct ieee80211_mgmt *mgmt;
|
|
+ u8 *ies;
|
|
+
|
|
+ ies = bcn->data + ieee80211_get_hdrlen_from_skb(bcn);
|
|
+ mgmt = (struct ieee80211_mgmt *)bcn->data;
|
|
+ ies += sizeof(mgmt->u.beacon);
|
|
+
|
|
+ if (cfg80211_find_ie(WLAN_EID_RSN, ies, (skb_tail_pointer(bcn) - ies)))
|
|
+ arvif->rsnie_present = true;
|
|
+
|
|
+ if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
|
+ WLAN_OUI_TYPE_MICROSOFT_WPA,
|
|
+ ies, (skb_tail_pointer(bcn) - ies)))
|
|
+ arvif->wpaie_present = true;
|
|
+}
|
|
+
|
|
static int ath12k_mac_setup_bcn_tmpl(struct ath12k_vif *arvif)
|
|
{
|
|
struct ath12k *ar = arvif->ar;
|
|
@@ -1184,8 +1203,6 @@ static int ath12k_mac_setup_bcn_tmpl(str
|
|
struct ieee80211_vif *vif = arvif->vif;
|
|
struct ieee80211_mutable_offsets offs = {};
|
|
struct sk_buff *bcn;
|
|
- struct ieee80211_mgmt *mgmt;
|
|
- u8 *ies;
|
|
int ret;
|
|
|
|
if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
|
|
@@ -1197,17 +1214,7 @@ static int ath12k_mac_setup_bcn_tmpl(str
|
|
return -EPERM;
|
|
}
|
|
|
|
- ies = bcn->data + ieee80211_get_hdrlen_from_skb(bcn);
|
|
- ies += sizeof(mgmt->u.beacon);
|
|
-
|
|
- if (cfg80211_find_ie(WLAN_EID_RSN, ies, (skb_tail_pointer(bcn) - ies)))
|
|
- arvif->rsnie_present = true;
|
|
-
|
|
- if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
|
- WLAN_OUI_TYPE_MICROSOFT_WPA,
|
|
- ies, (skb_tail_pointer(bcn) - ies)))
|
|
- arvif->wpaie_present = true;
|
|
-
|
|
+ ath12k_mac_setup_bcn_tmpl_vif_params(arvif, bcn);
|
|
ret = ath12k_wmi_bcn_tmpl(ar, arvif->vdev_id, &offs, bcn);
|
|
|
|
kfree_skb(bcn);
|