summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/wext.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-03-19 14:25:18 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:49 -0400
commitd4ff0ef635b222d5f66dad65e9364d702e5f94e0 (patch)
tree048e3396088a81a945c1af6d0a8493b9f145fd56 /drivers/net/wireless/libertas/wext.c
parentc49c3b77c8c611f562ca4e201d88d3e69465f928 (diff)
downloadlwn-d4ff0ef635b222d5f66dad65e9364d702e5f94e0.tar.gz
lwn-d4ff0ef635b222d5f66dad65e9364d702e5f94e0.zip
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>
Diffstat (limited to 'drivers/net/wireless/libertas/wext.c')
-rw-r--r--drivers/net/wireless/libertas/wext.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 5ccb4e0c8d64..c039db648fac 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -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;
}