Search Linux Wireless

Re: [PATCH 13/19] rtw89: extend role_maintain to support AP mode

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

 



On Thu, 2022-02-03 at 10:42 +0200, Kalle Valo wrote:
> Pkshih <pkshih@xxxxxxxxxxx> writes:
> 
> > On Fri, 2022-01-28 at 17:51 +0200, Kalle Valo wrote:
> > > 
> > > Maybe I also move check for rtwsta first?
> > > 
> > 
> > The full logic is 
> > 
> > if (rtwvif->net_type == RTW89_NET_TYPE_AP_MODE) {
> >     if (rtwsta)
> >         self_role = RTW89_SELF_ROLE_AP_CLIENT
> >     else
> >         self_role = rtwvif->self_role;
> > } else {
> >     self_role = rtwvif->self_role;
> > }
> > 
> > And, the meaning of 'rtwsta' here is to indicate we are going to setup 
> > a connected station that connects to this AP, but not check if the
> > pointer is NULL. To emphasis the case is only existing in AP_MODE,
> > I prefer to check net_type ahead. Or, this full logic is preferred?
> 
> I don't know what others think, but I find this full logic style most
> readable.
> 

Maybe, a static analysis tool warns two else branches are the same. 
If so, we can make a decision at that time.
 
I will send v2 next week, and wait for people who have other ideas.

Happy New Year.
--
Ping-Ke






[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