Message ID | 20230504092033.3542456-2-quic_mkenna@quicinc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 570eec3d40505c30babbe3b8f85a38496c975ab2 |
Delegated to: | Kalle Valo |
Headers | show |
Series | [1/2] ath11k: Relocate the func ath11k_mac_bitrate_mask_num_ht_rates() and change hweight16 to hweight8 | expand |
Hi, Ignore this patchset, I have sent the v2 version of this patchset by rebasing it on latest TOT. > 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 <quic_mkenna@quicinc.com> > --- > 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 05920ad413c5..eb46d06272de 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 <net/mac80211.h> > @@ -4159,6 +4159,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, > @@ -7542,20 +7556,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,
Maharaja Kennadyrajan <quic_mkenna@quicinc.com> writes: > Ignore this patchset, I have sent the v2 version of this patchset by > rebasing it on latest TOT. Why? I had already applied v1 to the pending branch without issues: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=e3fd9d322448ee29c65a30e9bedaed222d7548b9 https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=b7c3ee0ddc2bf3ecf511793aa55622a9aa62e420 Is there a reason why I should take v2 instead?
On 5/11/2023 3:41 PM, Kalle Valo wrote: > Maharaja Kennadyrajan <quic_mkenna@quicinc.com> writes: > >> Ignore this patchset, I have sent the v2 version of this patchset by >> rebasing it on latest TOT. > Why? I had already applied v1 to the pending branch without issues: > > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=e3fd9d322448ee29c65a30e9bedaed222d7548b9 > > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=b7c3ee0ddc2bf3ecf511793aa55622a9aa62e420 > > Is there a reason why I should take v2 instead? [Maha]: No change in v2. As the cover letter of v1 patch was not sent along with with v1 patches, cover letter mail didn't link to the patches mail in the patchwork. Hence, sent v2 patch. Please proceed with v1 patch if it is already in progress.
Maharaja Kennadyrajan <quic_mkenna@quicinc.com> wrote: > 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 <quic_mkenna@quicinc.com> > Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> 2 patches applied to ath-next branch of ath.git, thanks. 570eec3d4050 wifi: ath11k: Relocate the func ath11k_mac_bitrate_mask_num_ht_rates() and change hweight16 to hweight8 df8e3729ffc0 wifi: ath11k: Send HT fixed rate in WMI peer fixed param
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 05920ad413c5..eb46d06272de 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 <net/mac80211.h> @@ -4159,6 +4159,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, @@ -7542,20 +7556,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,
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 <quic_mkenna@quicinc.com> --- drivers/net/wireless/ath/ath11k/mac.c | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-)