TDLS Question, regarding sending out management frames
Sat Jun 18 09:26:05 PDT 2011
On Tue, Jun 14, 2011 at 08:37:21PM +0300, Kalyan Gaddam wrote:
> I am implementing TDLS support in driver_nl80211 and I have a design
> question, implementing tdls_send_mgmt to the l2 layer to be sent out on
> the network, and was wondering if there are any suggestions. Considering
> in tdls.c, we already register l2 socket via l2_packet_init to
> sm->l2_tdls (struct wpa_sm), to receive tdls packets and leave sending
> the tdls frame to the driver. If the driver were to send out a tdls
> management frame to lower layer what are my options?
This is a bit asymmetric at the moment due to both kernel and user space
code doing some processing on the frame. l2_packet works fine for
receive side since wpa_supplicant just needs to receive some parts of
the frame. However, for transmit, there is assumption of the driver
adding some IEs.
> We cannot directly send out a tdls frame from the driver since we do not
> have a l2_packet_data socket to send it via "l2_packet_send" function. I
> thought about registering a new l2_packet_data socket via
> l2_packet_init, however we already registered to receive tdls frames
> (callbacks) in tdls.c file in the supplicant. Re-registering to
> receive/send packets would turn out to be redundant and unpredictable. I
> thought about these 3 ways to go about writing code. Please offer other
> suggestions or comments.
> 1) Use NL80211 new CMD instead of ABI.
I think this would likely end up being the cleanest solution. The
receive side could also be changed to use a new nl80211 event (using the
same cmd id) and the payload of that event could be defined to be the
IEs in the frame.
> 2) Pass l2_packet_data socket which is already defined in
> wpa_tdls_init function of tdls.c as a function argument to
> 3) Move TDLS management frame handling to src/rsn_supp/tdls.c and
> use l2_tdls directly to send frames.
I don't think I would like to use l2_packet for TX here since the driver
could not transmit this frame like other data frames.
> I guess the question comes out to be, should the driver handle
> creation/sending of the tdls frames or does the supplicant handle that.
> If it's going to be shared duties between the two then prefer sharing
> (passing) the initialized socket to the driver. We also need to think
> about people implementing tdls in other drivers. Please let me know the
> best way to go about it. Thank you,
While I kind of like the idea of doing this all in wpa_supplicant, that
would require adding more MLME like functionality there. In theory, that
would be fine, but as long as we have that code for association frames
in mac80211 in station mode, this should likely be there, too. This is
something that could be handled with the new nl80211 command/event and
data frame encapsulation/decapsulation for the TDLS frames in the kernel
Jouni Malinen PGP id EFC895FA
More information about the Hostap