Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5980638rwb; Mon, 14 Nov 2022 12:21:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf471MSyAwqN5A8RwYo7yaAxVrPtX5xZMxoUT5Q9sduWCwcyidhJUy5X62HedAOZQ+mmcy8f X-Received: by 2002:a05:6a00:d57:b0:56e:705e:360d with SMTP id n23-20020a056a000d5700b0056e705e360dmr15334819pfv.74.1668457261146; Mon, 14 Nov 2022 12:21:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668457261; cv=none; d=google.com; s=arc-20160816; b=ZYT0+w3sYZQOxqZWPRrq5wjaqKMSU5juwFwM4k4T3mdAcZ6ROHvynCsoqhJwrXmdTx xqRCvt7UnPY1XT/sKu6a5sv8INNZLSTimacS1fZo3azuSARMXXnmNRv0ReqL0dk2z5eO tYh6PoXR8FZCD5FpyIuybZrK0DW6c/IJo8YI32KAXRp444njFiZmvGRmz2w+6PhfwXwC t7PXzcBS3yM2WD1O9khBM9gtbPpM0vsT6JJ2QEyK+o0FAdXRrrGfPHYWb2CJdFpfjBHJ H5ohqf385EaGa9l1e65VfBRSdQ6nycrtIxOuMwplp0tMK3QHTs5vPIpV2SpQXHhNACXy UnEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=XkwC1tjp8mBwQXMFVTcAc8jop9rJhH315qvrWFxW6T4=; b=kNxIyt2d7SOsZTKjrR0ZnUaAR+zEX4Ig9F3mbfdg4pY7WE6JfKUssATzQjElN1E1wu AQl9XrcSQ9O7i1XM2iAjcz/oB1cngXPQoGzAc5D489Fq1k5hyVVL7w7TyYLeho8oPCcF F2o5xNv6MJkKVqQKBckvzBNs66sShWb1QfulXCYMf4ikq/EhVus/7xUDgUjHKXzMd0Z0 G7jIBRSijXLhXV3I6HZi6aNJMJRBYcfnjTIGj+q4YfPafrBxDbnDSxaUlr6drccwmEUW AScD1R/EA+cOkWwb52FWxFrniDil56YGECahD3OUtERWD5BLyLQcUHzUSVGJihBTP5X2 Xh+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QjI5TKYx; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a056a001a0200b0053a339cafb3si8973961pfv.53.2022.11.14.12.20.51; Mon, 14 Nov 2022 12:21:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QjI5TKYx; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237534AbiKNUTf (ORCPT + 66 others); Mon, 14 Nov 2022 15:19:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237527AbiKNUT3 (ORCPT ); Mon, 14 Nov 2022 15:19:29 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37F3E138 for ; Mon, 14 Nov 2022 12:19:28 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AEJumbM031918; Mon, 14 Nov 2022 20:19:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=XkwC1tjp8mBwQXMFVTcAc8jop9rJhH315qvrWFxW6T4=; b=QjI5TKYx8OkrJoGkqV+/+Y4Flz9FQLKc6W7vr5wPK2mgOW0Xl0XSJGcp/RGiLXr7XgG9 2A7hJ4T7OCFxGYwgywBIq3agRgL3ZKIKYC6aBj57sGMrbE1ASoQ2WbSq8SdBiLRDwNdE utA/nGOnmxeC67xW1nblCeBGzaQ7zGIcu2cSNY+02w8T6tXSCGqov/cSGhZSscHRvhpC jRxlqKPuFSsDd0F6DwFqSFGBJG1ZW/gj2p7gsZnGRmwvnChfEaJHeQTRi2qjHRDj1cO/ S7jb6AGOBne+4sbkgKvAvH8wJ8fdEfPCWai8hZbU6WmzfNZhyVh6Gvxc511CHVit8VbQ qQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3kus8cgku0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Nov 2022 20:19:25 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2AEKJN5B028462 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Nov 2022 20:19:24 GMT Received: from alokad-linux.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 14 Nov 2022 12:19:23 -0800 From: Aloka Dixit To: , Subject: [PATCH v2 08/10] ath11k: move vif parameter setting in a different function Date: Mon, 14 Nov 2022 12:19:10 -0800 Message-ID: <20221114201912.22893-9-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221114201912.22893-1-quic_alokad@quicinc.com> References: <20221114201912.22893-1-quic_alokad@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: hWddIsEsQzOYXify49bQtl8m_eJG-W9_ X-Proofpoint-ORIG-GUID: hWddIsEsQzOYXify49bQtl8m_eJG-W9_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-14_13,2022-11-11_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211140143 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Move the configuration of struct ath11k_vif parameters rsnie_present, and wpaie_present to a separate function. Tested-on : IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit --- v2: Changed calls to mac80211 APIs to include MLO link ID. 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 64886f9a0358..eef7fe61b7d9 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1353,28 +1353,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, 0); - 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))) @@ -1388,7 +1374,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.17.1