aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/wext.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-03-19 09:25:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:49 -0400
commitd4ff0ef635b222d5f66dad65e9364d702e5f94e0 (patch)
tree048e3396088a81a945c1af6d0a8493b9f145fd56 /drivers/net/wireless/libertas/wext.c
parentc49c3b77c8c611f562ca4e201d88d3e69465f928 (diff)
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,
656 range->num_encoding_sizes = 2; 656 range->num_encoding_sizes = 2;
657 range->max_encoding_tokens = 4; 657 range->max_encoding_tokens = 4;
658 658
659 range->min_pmp = 1000000; 659 /*
660 range->max_pmp = 120000000; 660 * Right now we support only "iwconfig ethX power on|off"
661 range->min_pmt = 1000; 661 */
662 range->max_pmt = 1000000; 662 range->pm_capa = IW_POWER_ON;
663 range->pmp_flags = IW_POWER_PERIOD;
664 range->pmt_flags = IW_POWER_TIMEOUT;
665 range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R;
666 663
667 /* 664 /*
668 * Minimum version we recommend 665 * Minimum version we recommend
@@ -784,21 +781,14 @@ static int lbs_get_power(struct net_device *dev, struct iw_request_info *info,
784 struct iw_param *vwrq, char *extra) 781 struct iw_param *vwrq, char *extra)
785{ 782{
786 struct lbs_private *priv = dev->priv; 783 struct lbs_private *priv = dev->priv;
787 int mode;
788 784
789 lbs_deb_enter(LBS_DEB_WEXT); 785 lbs_deb_enter(LBS_DEB_WEXT);
790 786
791 mode = priv->psmode;
792
793 if ((vwrq->disabled = (mode == LBS802_11POWERMODECAM))
794 || priv->connect_status == LBS_DISCONNECTED)
795 {
796 goto out;
797 }
798
799 vwrq->value = 0; 787 vwrq->value = 0;
788 vwrq->flags = 0;
789 vwrq->disabled = priv->psmode == LBS802_11POWERMODECAM
790 || priv->connect_status == LBS_DISCONNECTED;
800 791
801out:
802 lbs_deb_leave(LBS_DEB_WEXT); 792 lbs_deb_leave(LBS_DEB_WEXT);
803 return 0; 793 return 0;
804} 794}