On Mon, 2013-04-08 at 12:30 -0700, Thomas Pedersen wrote:

> OK those functions are exported to the drivers. The 'enum
> queue_stop_reason' is defined in ieee80211_i.h, so the driver wouldn't
> be able to interpret them anyway?

Oh, you're way underestimating the creativity of driver authors :-)

> Would you prefer a utility function internal to mac80211 which does
> return the reason, 

That seems fine, although a bit more inefficient?

> or just the following pattern?
> 
> if (ieee80211_queue_stopped(hw, queue)) {
>     qreason = hw_to_local(hw)->queue_stop_reasons[queue];
>     if (qreason & ~(ALLOWED_QUEUE_STOP_REASONS))
>         something;
> }

That seems racy? Even asking whether it's stopped is racy though, what
are you even trying to accomplish?

johannes

_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to