Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7043381rwr; Wed, 10 May 2023 03:06:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sSOvkrQAskacIqV6hQZGkxCMc2ogQoF4eXrnmFd2vlSk2Hyd81LZGKYfaxVQ5B8lhEz+8 X-Received: by 2002:a05:6a00:ccc:b0:63b:54e4:871b with SMTP id b12-20020a056a000ccc00b0063b54e4871bmr19769919pfv.8.1683713169697; Wed, 10 May 2023 03:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683713169; cv=none; d=google.com; s=arc-20160816; b=lOXqEItWvx6yIecnSovQvdBcwbOpV1EXyGVwE/cKDndpeUckbCvjubEv0FkCcx5IUf RLBmrbDDnu9Mo7nJQYCz8TMp0sxO6EAokYTqS1qPzf3zLOQ1g55hY8Qu8vldt3HFjGG/ jox+CuAHHpDGivOtDirMLzTfxxPz8UDyCuu/Fg4Zkc59MPIIo/O0MPsqg/dyMMb/GY1H LqQgyutUy77rTKIzcEcjintAfKY9iSLH9xj42kAKuJzDrIPyEuQwTmOOeJjJwGSi1y0u AXReN/vZQgMf1DEReUUQxjLLfRDAea4f4Z9yracOqIVTt9WFxdE+f8eEEmQd6xSIZbry CseA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VBnGVhVzkE4Pjhmceq5966zhhdlGlPImiWh7n+ktrdM=; b=0NNVlzn3nzzIz7OkhPToqWs9QH93YdBjUovgL7h4E7SyMA5lL3DbEUNlW77b5/1rS7 yLl6z35bPSvdEtkXMmFJAcnZHKqlimv5DAfdVOFC4w8tDdz4ZVHb9irCr2HIxU7pwwnO Ndz3jWhuoDFrXETBJNHpkQpt7lAB+9CrwKY1NTbe512zxavhf4sNt3/SdOb2FQtbZEY4 BbgeVGBbM8pndiLSxqOM/wCrVQ8E3slaGFJKbvGu0F9DTwRcdCYY8veqPDbe9xTKM8+4 qg9QT7UF6xSNpFsPb533Bz2oOLAYqom7eA+na/Bm4eHHVSiYvTE1XKJcYr6+BO1Ls2Gb QQnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gjIw+w9g; 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 g13-20020aa79dcd000000b006435b9bd9f0si4655932pfq.45.2023.05.10.03.06.01; Wed, 10 May 2023 03:06:09 -0700 (PDT) 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=gjIw+w9g; 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 S236226AbjEJKDQ (ORCPT + 61 others); Wed, 10 May 2023 06:03:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236141AbjEJKDO (ORCPT ); Wed, 10 May 2023 06:03:14 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC8566597 for ; Wed, 10 May 2023 03:03:13 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34A9CpCk023398; Wed, 10 May 2023 10:03:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=VBnGVhVzkE4Pjhmceq5966zhhdlGlPImiWh7n+ktrdM=; b=gjIw+w9g75RAjwhNIeZLK+DTcA6UUjyQaV7ElNHwux7qAU2ohHYkrfMc6gAU3KDT539e A45yByYKkmYTwJ46+/VoEZB/Kbx9xPtHd5C3hz0Wm1D6bmhrD4eUMG+E3m/hiS/RVWwK eMIW5oKuVyYbnJJ+ghcIMmOayUrNcnkAsJ39az6E0nZatIe5mm3QtbRNaEx90Ab4zWj3 Sy8APwWMDNzBKxIgnkuDhEtNuubVNOXOdMLiNKwX7mbP1TsV0ds2Mxo+jR++8g939Avg hM61+H+pXN0wgIv80ZiMNIpAPicYdSXdqkqJNgi+5E3uASKJNrkldMfkpvnAo8occBlP pQ== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qg79cr761-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 10:03:03 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34AA32de029436 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 10:03:02 GMT Received: from che-siroccolnx03.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Wed, 10 May 2023 03:03:01 -0700 From: Maharaja Kennadyrajan To: CC: , Maharaja Kennadyrajan Subject: [PATCH v2 1/2] ath11k: Relocate the func ath11k_mac_bitrate_mask_num_ht_rates() and change hweight16 to hweight8 Date: Wed, 10 May 2023 15:32:41 +0530 Message-ID: <20230510100242.1241752-2-quic_mkenna@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230510100242.1241752-1-quic_mkenna@quicinc.com> References: <20230510100242.1241752-1-quic_mkenna@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: zHnWDtZ4TJIX9yvhTi0TxIahnmBapY4y X-Proofpoint-ORIG-GUID: zHnWDtZ4TJIX9yvhTi0TxIahnmBapY4y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-10_04,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxlogscore=549 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305100078 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Relocate the function ath11k_mac_bitrate_mask_num_ht_rates() definition to call this function from other functions which helps to avoid the compilation error (function not defined). ht_mcs[] is 1 byte array and it is enough to use hweight8() instead of hweight16(). Hence, fixed the same. Tested on: Compile tested only. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/mac.c | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index a164b57dcf30..33620a7a444b 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -4337,6 +4337,20 @@ static int ath11k_mac_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, return ret; } +static int +ath11k_mac_bitrate_mask_num_ht_rates(struct ath11k *ar, + enum nl80211_band band, + const struct cfg80211_bitrate_mask *mask) +{ + int num_rates = 0; + int i; + + for (i = 0; i < ARRAY_SIZE(mask->control[band].ht_mcs); i++) + num_rates += hweight8(mask->control[band].ht_mcs[i]); + + return num_rates; +} + static int ath11k_mac_bitrate_mask_num_vht_rates(struct ath11k *ar, enum nl80211_band band, @@ -7791,20 +7805,6 @@ static void ath11k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *v ath11k_mac_flush_tx_complete(ar); } -static int -ath11k_mac_bitrate_mask_num_ht_rates(struct ath11k *ar, - enum nl80211_band band, - const struct cfg80211_bitrate_mask *mask) -{ - int num_rates = 0; - int i; - - for (i = 0; i < ARRAY_SIZE(mask->control[band].ht_mcs); i++) - num_rates += hweight16(mask->control[band].ht_mcs[i]); - - return num_rates; -} - static bool ath11k_mac_has_single_legacy_rate(struct ath11k *ar, enum nl80211_band band, -- 2.25.1