# layer 2 information to be packed into mbuf



## pigling (Jul 15, 2010)

Hi all,
I have to collect some layer 2 information (RSSI/data rate/noise level) and pack them in mbuf so that TCP/IP level can get this information for window control calculation. I am using RT73 USB wireless driver (/sys/dev/usb/wlan/if_rum.c) to do the work. But now my concern is:
1. The mbuf structure should be modified to include those new information. If I create a new field in packet header part in first mbuf, will this new field affect later mbuf manipulation in ether and 802.11 part?
2. Which function is for rum driver to send received mbuf to above level? I check rum_bulk_read_callback(...) function. But I am confused why function rum_start() is called at the end. 

Thanks.

regards,
qichao


----------



## trasz@ (Jul 15, 2010)

You might want to use mbuf tags instead of modifying the mbuf structure.


----------



## PseudoCylon (Jul 27, 2010)

pigling said:
			
		

> 2. Which function is for rum driver to send received mbuf to above level?


ieee80211_input() or ieee80211_input_all()



			
				pigling said:
			
		

> I check rum_bulk_read_callback(...) function. But I am confused why function rum_start() is called at the end.


http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/wlan/if_rum.c#rev1.20.2.2


----------

