Search Linux Wireless

Re: [PATCH v2 06/13] wifi: mac80211: rework RX timestamp flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/20/2023 3:41 AM, Miri Korenblit wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
> 
> We only have a single flag free, and before using that for
> another mactime flag, instead refactor the mactime flags
> to use a 2-bit field.
> 
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> Reviewed-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
> Reviewed-by: Benjamin Berg <benjamin.berg@xxxxxxxxx>
> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
> ---
> v2: Fix wrong email addresses and fix ath code
> ---
>  drivers/net/wireless/ath/ath10k/htt_rx.c |  2 +-
>  include/net/mac80211.h                   | 13 +++++++++----
>  net/mac80211/ieee80211_i.h               |  5 +----
>  net/mac80211/util.c                      | 16 ++++++++++------
>  4 files changed, 21 insertions(+), 15 deletions(-)
..snip..
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index 29312f6638a1..938f4d255668 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -1775,10 +1775,7 @@ static inline bool txq_has_queue(struct ieee80211_txq *txq)
>  static inline bool
>  ieee80211_have_rx_timestamp(struct ieee80211_rx_status *status)
>  {
> -	WARN_ON_ONCE(status->flag & RX_FLAG_MACTIME_START &&
> -		     status->flag & RX_FLAG_MACTIME_END);
> -	return !!(status->flag & (RX_FLAG_MACTIME_START | RX_FLAG_MACTIME_END |
> -				  RX_FLAG_MACTIME_PLCP_START));
> +	return status->flag & RX_FLAG_MACTIME;

curious why you dropped the !!
now the code can return a value that doesn't map to the true/false bool
enums





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux