Search Linux Wireless

Re: [PATCH v2 1/3] mt76: connac: add mt76_connac_mcu_update_sta_cmd support

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

 



On 2021-06-02 07:24, sean.wang@xxxxxxxxxxxx wrote:
> From: Sean Wang <sean.wang@xxxxxxxxxxxx>
> 
> Add mt76_connac_mcu_update_sta_cmd support that is the prerequisite patch
> for we are able to update the station record with the current state the
> station has into the offload firmware at runtime.
> 
> Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
> ---
> v1->v2: no change
> ---
>  .../net/wireless/mediatek/mt76/mt7615/mcu.c   |  6 ++--
>  .../wireless/mediatek/mt76/mt76_connac_mcu.c  | 32 ++++++++++++++-----
>  .../wireless/mediatek/mt76/mt76_connac_mcu.h  | 16 ++++++++--
>  .../net/wireless/mediatek/mt76/mt7921/main.c  |  8 +++--
>  .../net/wireless/mediatek/mt76/mt7921/mcu.c   |  3 +-
>  .../wireless/mediatek/mt76/mt7921/mt7921.h    |  2 +-
>  6 files changed, 50 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
> index d64b8058b744..6666507f43ed 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
> +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
> @@ -902,6 +902,14 @@ struct mt76_connac_suspend_tlv {
>  	u8 pad[5];
>  } __packed;
>  
> + /* 0: state 1 - unauthenticated & unassociated
> +  * 1: state 2 - authenticated & unassociated
> +  * 2: state 3 - authenticated & associated
> +  */
> +#define MT76_STA_INFO_STATE_1	0
> +#define MT76_STA_INFO_STATE_2	1
> +#define MT76_STA_INFO_STATE_3	2
Please turn this into an enum:

enum mt76_sta_info_state {
	MT76_STA_INFO_STATE_NONE,
	MT76_STA_INFO_STATE_AUTH,
	MT76_STA_INFO_STATE_ASSOC
};

The _1 _2 _3 suffixes are not that readable and add extra confusion by
not matching the numeric values.

- Felix



[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