add txant and antdiv to wlcompat
authorFelix Fietkau <nbd@openwrt.org>
Fri, 13 May 2005 19:12:22 +0000 (19:12 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 13 May 2005 19:12:22 +0000 (19:12 +0000)
SVN-Revision: 884

openwrt/package/openwrt/include/wlcompat.h
openwrt/package/openwrt/wlcompat.c

index e7ead45204471be587c83475c3cfeb59ac2eae32..a4fc13439dda3a930b3e4bd838de8c789b64b0c5 100644 (file)
@@ -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
index 1719a67a7ebdc7280ce09abd719d59d4df597fbf..18ec93468e1adebca402853306a8ac12d91ef559 100644 (file)
@@ -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[] =