aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/wext.c
diff options
context:
space:
mode:
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}