summaryrefslogtreecommitdiffstats
path: root/openwrt
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-05-13 19:12:22 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-05-13 19:12:22 +0000
commit0053f0585c9410373250186c51dbc57e71eff005 (patch)
tree38c9fc98ba1eae6af5c25dfd8a6df44905991444 /openwrt
parent4abdc14d85b3e447fa56b1d8c60f0cfffa93455f (diff)
add txant and antdiv to wlcompat
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@884 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/package/openwrt/include/wlcompat.h4
-rw-r--r--openwrt/package/openwrt/wlcompat.c50
2 files changed, 53 insertions, 1 deletions
diff --git a/openwrt/package/openwrt/include/wlcompat.h b/openwrt/package/openwrt/include/wlcompat.h
index e7ead4520..a4fc13439 100644
--- a/openwrt/package/openwrt/include/wlcompat.h
+++ b/openwrt/package/openwrt/include/wlcompat.h
@@ -28,5 +28,9 @@
#define WLCOMPAT_GET_MONITOR SIOCIWFIRSTPRIV + 1
#define WLCOMPAT_SET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 2
#define WLCOMPAT_GET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 3
+#define WLCOMPAT_SET_ANTDIV SIOCIWFIRSTPRIV + 4
+#define WLCOMPAT_GET_ANTDIV SIOCIWFIRSTPRIV + 5
+#define WLCOMPAT_SET_TXANT SIOCIWFIRSTPRIV + 6
+#define WLCOMPAT_GET_TXANT SIOCIWFIRSTPRIV + 7
#endif
diff --git a/openwrt/package/openwrt/wlcompat.c b/openwrt/package/openwrt/wlcompat.c
index 1719a67a7..18ec93468 100644
--- a/openwrt/package/openwrt/wlcompat.c
+++ b/openwrt/package/openwrt/wlcompat.c
@@ -599,6 +599,34 @@ static int wlcompat_private_ioctl(struct net_device *dev,
break;
}
+ case WLCOMPAT_SET_ANTDIV:
+ {
+ if (wl_ioctl(dev, WLC_SET_ANTDIV, value, sizeof(int)) < 0)
+ return -EINVAL;
+
+ break;
+ }
+ case WLCOMPAT_GET_ANTDIV:
+ {
+ if (wl_ioctl(dev, WLC_GET_ANTDIV, extra, sizeof(int)) < 0)
+ return -EINVAL;
+
+ break;
+ }
+ case WLCOMPAT_SET_TXANT:
+ {
+ if (wl_ioctl(dev, WLC_SET_TXANT, value, sizeof(int)) < 0)
+ return -EINVAL;
+
+ break;
+ }
+ case WLCOMPAT_GET_TXANT:
+ {
+ if (wl_ioctl(dev, WLC_GET_TXANT, extra, sizeof(int)) < 0)
+ return -EINVAL;
+
+ break;
+ }
default:
{
return -EINVAL;
@@ -629,7 +657,27 @@ static const struct iw_priv_args wlcompat_private_args[] =
0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"get_txpwr_force"
- }
+ },
+ { WLCOMPAT_SET_ANTDIV,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "set_antdiv"
+ },
+ { WLCOMPAT_GET_ANTDIV,
+ 0,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ "get_antdiv"
+ },
+ { WLCOMPAT_SET_TXANT,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "set_txant"
+ },
+ { WLCOMPAT_GET_TXANT,
+ 0,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ "get_txant"
+ },
};
static const iw_handler wlcompat_private[] =