From: Felix Fietkau Date: Fri, 8 Apr 2005 13:01:32 +0000 (+0000) Subject: add SIOCSIWTXPOW X-Git-Tag: reboot~33131 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e4c2d7ba3cee5b44961f6526c2f3a064c2855881;p=oweals%2Fopenwrt.git add SIOCSIWTXPOW SVN-Revision: 581 --- diff --git a/openwrt/package/openwrt/wlcompat.c b/openwrt/package/openwrt/wlcompat.c index e120ee1da7..80242e1fdc 100644 --- a/openwrt/package/openwrt/wlcompat.c +++ b/openwrt/package/openwrt/wlcompat.c @@ -170,6 +170,14 @@ static int wlcompat_ioctl(struct net_device *dev, wrqu->txpower.flags = IW_TXPOW_MWATT; break; } + case SIOCSIWTXPOW: + { + if (wrqu->txpower.flags != IW_TXPOW_MWATT) { + err = -EINVAL; + } else { + wl_ioctl(dev, WLC_SET_TXPWR, &wrqu->txpower.value, sizeof(int)); + } + } case SIOCGIWENCODE: { wrqu->data.flags = IW_ENCODE_DISABLED; @@ -229,7 +237,7 @@ static const iw_handler wlcompat_handler[] = { wlcompat_ioctl, /* SIOCGIWRTS */ NULL, /* SIOCSIWFRAG */ wlcompat_ioctl, /* SIOCGIWFRAG */ - NULL, /* SIOCSIWTXPOW */ + wlcompat_ioctl, /* SIOCSIWTXPOW */ wlcompat_ioctl, /* SIOCGIWTXPOW */ NULL, /* SIOCSIWRETRY */ NULL, /* SIOCGIWRETRY */