Search Linux Wireless

Re: [PATCH 01/12] rtwlan: main files

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

 



Hi

On Fri, Sep 28, 2018 at 03:20:45AM +0000, Tony Chuang wrote:
> > > +	rtw_tx_pkt_info_update(rtwdev, &pkt_info, control, skb);
> > > +	if (rtw_hci_tx(rtwdev, &pkt_info, skb))
> > > +		goto out;
> > > +
> > > +	return;
> > > +
> > > +out:
> > > +	dev_kfree_skb_any(skb);
> > This can be simplified by just do kfree after if ().
> 
> 
> OK, will replace them with ieee80211_free_txskb

I was thinking about:

	if (rtw_hci_tx(rtwdev, &pkt_info, skb))
		dev_kfree_skb_any(skb)

just to remove 'return;' and out label.

> Have not noticed so far, cause not we can only support on vif.
> 
> And only STA mode is tested, should first modify the iface_conbination.
> Then modify them back again if we submit patches support concurrents
> 
> I think that vif_list & sta_list could be protected by a single mutex that
> protects concurrent access against mac80211 callbacks, and further add
> some rcu locks to protect sta_info. You have some suggestions?

That's good solution, sync multiple possible writes via mutex and
reads of list against writes via RCU.

> I think mac80211 will do it "if the vif is different", but under the same vif,
> mac80211 will protect it with "sdata->wdev.mtx". Not sure if I am right.

I need to check that as well :-)

> Yes, we can. If we have TDLS peer in STA mode or in AP mode, we could have
> different bw_mode, by the sta_info mac80211 passed to us, and that sta_info is
> checked by mac80211 based on the capabilities (IE) of the peer.
How this work with respect we configure band-width when we change the channel?
If we set band-width per sta, should then setting band-width on channel
setup be droped ?

> > > +static inline void rtw_load_table(struct rtw_dev *rtwdev,
> > > +				  const struct rtw_table *tbl)
> > > +{
> > > +	(*tbl->parse)(rtwdev, tbl);
> > > +}
> > 
> > This interface of loading/processing tables of data looks very strange.
> > I don't think is incorrect, but seems to be somewhat not necessary
> > complicated. I'll try provide more detailed comment about that when
> > review other files.
> 
> 
> OK, but I think this is needed, our tables have different forms ....

Not sure if that is better solution, but could the tables be pre-prarsed
by user-space program and then embed in the driver in ready to send
to the hardware from ?

Also there are lot of redundancy in those tables, for example:

+	0x81C, 0xFF000003,
+	0x81C, 0xF5000003,
+	0x81C, 0xF4020003,
+	0x81C, 0xF3040003,
+	0x81C, 0xF2060003,
+	0x81C, 0xF1080003,
+	0x81C, 0xF00A0003,
+	0x81C, 0xEF0C0003,
+	0x81C, 0xEE0E0003,
+	0x81C, 0xED100003,
+	0x81C, 0xEC120003,
+	0x81C, 0xEB140003,
+	0x81C, 0xEA160003,
+	0x81C, 0xE9180003,
+	0x81C, 0xE81A0003,
+	0x81C, 0xE71C0003,
+	0x81C, 0xE61E0003,
+	0x81C, 0xE5200003,

0x81C and 0003 repeats in many lines. 

This seems to be parse data, not that we have to write 0x81C
register many times. Would be possible to remove the redundancy?

Thanks
Stanislaw



[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