Hi Jouni,

> This commit defines new scan flags (LOW_SPAN, LOW_POWER, HIGH_LATENCY)
> to emphasize the requested scan behavior for the driver. These flags are
> optional and are mutually exclusive. Driver shall resort to default
> behavior if a respective flag is not supported. The implementation of
> the respective functionality can be driver/hardware specific.

I really dislike falling back to some unspecified default behavior in case 
something is not supported. That is a really bad API towards userspace. Let the 
driver just fail and reject that operation. Userspace can define the policy and 
behavior if certain low power or high accuracy functionality is not available. 
Asking the kernel to do one thing and then the driver does whatever it wants 
anyway is Wireless Extensions behavior. We complained about it back then and 
falling back into the same pattern is bad.

And as Dan mentioned, just indicate the capabilities to userspace and then it 
knows what it can use. That means a good userspace will not use unsupported 
flags and a bad one gets hit with an error (which is a good thing).

Regards

Marcel

Reply via email to