libertas: misc power saving adjusts
* firmware for the CF card supports power saving * the driver currenly only accept "iwconfig ethX power on|off", so I fixed what the range wext ioctl reports. * initialize value/flags in lbs_get_power() * get rid of unused parameter psmode in lbs_ps_confirm_sleep() * some minor debug output tweaks Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
c49c3b77c8
commit
d4ff0ef635
@ -656,13 +656,10 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info,
|
||||
range->num_encoding_sizes = 2;
|
||||
range->max_encoding_tokens = 4;
|
||||
|
||||
range->min_pmp = 1000000;
|
||||
range->max_pmp = 120000000;
|
||||
range->min_pmt = 1000;
|
||||
range->max_pmt = 1000000;
|
||||
range->pmp_flags = IW_POWER_PERIOD;
|
||||
range->pmt_flags = IW_POWER_TIMEOUT;
|
||||
range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R;
|
||||
/*
|
||||
* Right now we support only "iwconfig ethX power on|off"
|
||||
*/
|
||||
range->pm_capa = IW_POWER_ON;
|
||||
|
||||
/*
|
||||
* Minimum version we recommend
|
||||
@ -784,21 +781,14 @@ static int lbs_get_power(struct net_device *dev, struct iw_request_info *info,
|
||||
struct iw_param *vwrq, char *extra)
|
||||
{
|
||||
struct lbs_private *priv = dev->priv;
|
||||
int mode;
|
||||
|
||||
lbs_deb_enter(LBS_DEB_WEXT);
|
||||
|
||||
mode = priv->psmode;
|
||||
|
||||
if ((vwrq->disabled = (mode == LBS802_11POWERMODECAM))
|
||||
|| priv->connect_status == LBS_DISCONNECTED)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
|
||||
vwrq->value = 0;
|
||||
vwrq->flags = 0;
|
||||
vwrq->disabled = priv->psmode == LBS802_11POWERMODECAM
|
||||
|| priv->connect_status == LBS_DISCONNECTED;
|
||||
|
||||
out:
|
||||
lbs_deb_leave(LBS_DEB_WEXT);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user