libertas: allow for PS mode to be disabled when firmware doesn't support it

Otherwise, we go into an endless busy loop trying to enable PS mode when
the command queue is empty, dealing with the error response, and then
trying to enable PS mode again because the command queue is empty.... it
doesn't really save much power.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
David Woodhouse
2007-12-17 14:41:13 -05:00
zatwierdzone przez David S. Miller
rodzic b47ef2438d
commit b2c57eee66
3 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@@ -734,6 +734,13 @@ static int lbs_set_power(struct net_device *dev, struct iw_request_info *info,
lbs_deb_enter(LBS_DEB_WEXT);
if (!priv->ps_supported) {
if (vwrq->disabled)
return 0;
else
return -EINVAL;
}
/* PS is currently supported only in Infrastructure mode
* Remove this check if it is to be supported in IBSS mode also
*/