From: Aloka Dixit <quic_alokad@quicinc.com> To: <johannes@sipsolutions.net>, <linux-wireless@vger.kernel.org>, <ath11k@lists.infradead.org> Cc: Aloka Dixit <quic_alokad@quicinc.com> Subject: [PATCH 7/9] ath11k: move vif parameter setting in a different function Date: Sun, 22 May 2022 23:01:06 -0700 [thread overview] Message-ID: <20220523060108.23982-8-quic_alokad@quicinc.com> (raw) In-Reply-To: <20220523060108.23982-1-quic_alokad@quicinc.com> Move the configuration of struct ath11k_vif parameters rsnie_present, and wpaie_present to a separate function. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> --- drivers/net/wireless/ath/ath11k/mac.c | 41 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 10d35cdfafdb..ff50341f1574 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1350,28 +1350,14 @@ static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed) return ret; } -static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) +static void ath11k_mac_setup_bcn_tmpl_vif_params(struct ath11k_vif *arvif, + struct sk_buff *bcn) { - struct ath11k *ar = arvif->ar; - struct ath11k_base *ab = ar->ab; - struct ieee80211_hw *hw = ar->hw; - 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) - return 0; - - bcn = ieee80211_beacon_get_template(hw, vif, &offs); - if (!bcn) { - ath11k_warn(ab, "failed to get beacon template from mac80211\n"); - return -EPERM; - } 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))) @@ -1385,7 +1371,28 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) arvif->wpaie_present = true; else arvif->wpaie_present = false; +} + +static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) +{ + struct ath11k *ar = arvif->ar; + struct ath11k_base *ab = ar->ab; + struct ieee80211_hw *hw = ar->hw; + struct ieee80211_vif *vif = arvif->vif; + struct ieee80211_mutable_offsets offs = {}; + struct sk_buff *bcn; + int ret; + + if (arvif->vdev_type != WMI_VDEV_TYPE_AP) + return 0; + + bcn = ieee80211_beacon_get_template(hw, vif, &offs); + if (!bcn) { + ath11k_warn(ab, "failed to get beacon template from mac80211\n"); + return -EPERM; + } + ath11k_mac_setup_bcn_tmpl_vif_params(arvif, bcn); ret = ath11k_wmi_bcn_tmpl(ar, arvif->vdev_id, &offs, bcn); kfree_skb(bcn); -- 2.31.1
WARNING: multiple messages have this Message-ID (diff)
From: Aloka Dixit <quic_alokad@quicinc.com> To: <johannes@sipsolutions.net>, <linux-wireless@vger.kernel.org>, <ath11k@lists.infradead.org> Cc: Aloka Dixit <quic_alokad@quicinc.com> Subject: [PATCH 7/9] ath11k: move vif parameter setting in a different function Date: Sun, 22 May 2022 23:01:06 -0700 [thread overview] Message-ID: <20220523060108.23982-8-quic_alokad@quicinc.com> (raw) In-Reply-To: <20220523060108.23982-1-quic_alokad@quicinc.com> Move the configuration of struct ath11k_vif parameters rsnie_present, and wpaie_present to a separate function. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> --- drivers/net/wireless/ath/ath11k/mac.c | 41 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 10d35cdfafdb..ff50341f1574 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1350,28 +1350,14 @@ static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed) return ret; } -static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) +static void ath11k_mac_setup_bcn_tmpl_vif_params(struct ath11k_vif *arvif, + struct sk_buff *bcn) { - struct ath11k *ar = arvif->ar; - struct ath11k_base *ab = ar->ab; - struct ieee80211_hw *hw = ar->hw; - 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) - return 0; - - bcn = ieee80211_beacon_get_template(hw, vif, &offs); - if (!bcn) { - ath11k_warn(ab, "failed to get beacon template from mac80211\n"); - return -EPERM; - } 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))) @@ -1385,7 +1371,28 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) arvif->wpaie_present = true; else arvif->wpaie_present = false; +} + +static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) +{ + struct ath11k *ar = arvif->ar; + struct ath11k_base *ab = ar->ab; + struct ieee80211_hw *hw = ar->hw; + struct ieee80211_vif *vif = arvif->vif; + struct ieee80211_mutable_offsets offs = {}; + struct sk_buff *bcn; + int ret; + + if (arvif->vdev_type != WMI_VDEV_TYPE_AP) + return 0; + + bcn = ieee80211_beacon_get_template(hw, vif, &offs); + if (!bcn) { + ath11k_warn(ab, "failed to get beacon template from mac80211\n"); + return -EPERM; + } + ath11k_mac_setup_bcn_tmpl_vif_params(arvif, bcn); ret = ath11k_wmi_bcn_tmpl(ar, arvif->vdev_id, &offs, bcn); kfree_skb(bcn); -- 2.31.1 -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2022-05-23 7:46 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-23 6:00 [PATCH 0/9] MBSSID and EMA support in AP mode Aloka Dixit 2022-05-23 6:00 ` Aloka Dixit 2022-05-23 6:01 ` [PATCH 1/9] mac80211: generate EMA beacons " Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit 2022-07-01 8:59 ` Johannes Berg 2022-07-01 8:59 ` Johannes Berg 2022-05-23 6:01 ` [PATCH 2/9] ath11k: add WMI resource config for EMA Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit 2022-05-23 6:01 ` [PATCH 3/9] ath11k: set MBSSID and EMA driver capabilities Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit 2022-05-23 6:01 ` [PATCH 4/9] ath11k: MBSSID configuration during vdev create/start Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit 2022-05-23 6:01 ` [PATCH 5/9] ath11k: create a structure for WMI vdev up parameters Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit 2022-05-24 19:30 ` Jeff Johnson 2022-05-24 19:30 ` Jeff Johnson 2022-05-23 6:01 ` [PATCH 6/9] ath11k: configure MBSSID device parameters Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit [this message] 2022-05-23 6:01 ` [PATCH 7/9] ath11k: move vif parameter setting in a different function Aloka Dixit 2022-05-23 6:01 ` [PATCH 8/9] ath11k: EMA beacon support Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit 2022-05-23 6:01 ` [PATCH 9/9] ath11k: configure WPA and RSN parameters for nontransmitting interface Aloka Dixit 2022-05-23 6:01 ` Aloka Dixit
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220523060108.23982-8-quic_alokad@quicinc.com \ --to=quic_alokad@quicinc.com \ --cc=ath11k@lists.infradead.org \ --cc=johannes@sipsolutions.net \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.