On Sat, 2007-06-09 at 01:03 +0800, Zhu Yi wrote: > --- a/net/mac80211/ieee80211_i.h > +++ b/net/mac80211/ieee80211_i.h > @@ -21,6 +21,7 @@ > #include <linux/workqueue.h> > #include <linux/types.h> > #include <linux/spinlock.h> > +//#include <linux/ieee80211.h> Is that accidentally in that patch or does that serve a purpose? > +#ifdef CONFIG_MAC80211_DEBUGFS > + struct ieee80211_elem_tspec tspec; > + u8 dls_mac[ETH_ALEN]; > +#endif Not sure I understand this. What's the point of the tspec element here? I just tried to find where it's actually used but couldn't, I guess I'm blind. However, why do we even need a whole bunch of these files? For the QoS stuff I can see what you're doing, you have the DLS MAC address in debugfs and then a debugfs operations file that calls ieee80211_send_dls_req or ieee80211_send_dls_teardown. Actually, now that I understand it, don't you think it'd be easier to understand if you had two write-only (!) files * dls/teardown * dls/request and writing a mac address to each one would trigger the operation for that mac address? That way, you have it atomically and no problem with two processes stomping each other (since now you write the mac address and then the operation). That would be much closer to the nl80211 interface where I'd probably just have two commands NL80211_REQUEST_DLS and NL80211_TEARDOWN_DLS that both take an ATTR_MAC_ADDRESS (in addition to the virtual interface). Same for tspec, even though I haven't seen where it's used, why not have a single file that accepts the whole tspec information element that userspace has pieced together, this is the same thing we're doing with the information element for inclusion in the association request (wext's GENIE request, which IMHO should be called ASSOC_EXTRA_IE or something, nl80211 has it too already). Then, this tspec information element could be read in one go and then used in whatever way necessary when it's written (after suitable sanity checks on it) johannes
Attachment:
signature.asc
Description: This is a digitally signed message part