ieee80211_process_callback() use in drivers

Adrian Chadd adrian at freebsd.org
Fri Aug 19 04:41:11 UTC 2011


On 19 August 2011 12:20, PseudoCylon <moonlightakkiy at yahoo.ca> wrote:

>> Hm, so we can't kill the free, because ieee80211_ref_node() is called early on.
>> So if ic->ic_raw_xmit(), just return ret, rather then "goto bad" ?
>>
>
> Other mgmt frame Tx functions, i.e ieee80211_send_mgmt(), refs node
> and expects ic_raw_xmit() to free node whether on success or on
> failure. So, drivers free node after calling
> ieee80211_process_callback() or in ic_raw_xmit() on failure. So, ref
> count is kept balanced.
>
> But, ieee80211_send_bar() frees node. So that, on failure in
> ic_raw_xmit(), drivers need first to test if it is a BAR frame. If
> not, free node; if so, don't free node because ieee80211_send_bar()
> does by its self. Otherwise node would be freed twice on one ref.

Right. So I'll fix that function to just not free the node once
ic->ic_raw_xmit is called.



Adrian


More information about the freebsd-wireless mailing list