[Prism54-devel] profiles + burst + fixed_rate patch

Michal Knezourek kneza@poupe.net
Wed, 28 Jan 2004 20:52:10 +0100


This is a multi-part message in MIME format.
--------------060901070407000400080406
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,
Here is my patch that adds some private ioctls...
it's:
get/set_profile which sets profile of the card:
B_ONLY            0
MIXED             1
MIXED_LONG        2
G_ONLY            3
TEST             4
B_WIFI            5
A_ONLY            6
MIXED_SHORT       7

default is 1 - mixed

get/set_burst which sets packet burst (prism nitro)
get/set_fixedrate which enables fixed rate (max rate in the profile) - 
this feature is temporary to the time, when setting rate will be possible.

It's tested and works fine with SMC 2802W card.

-- 
   Michal Knezourek
   POUPE.NET Administrator
   +420 608 253 646

--------------060901070407000400080406
Content-Type: text/plain;
 name="profileburstfrate-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="profileburstfrate-patch"

diff -u linux-2.4.24-orig/drivers/net/wireless/prism54/isl_ioctl.c linux-2.4.24-kneza/drivers/net/wireless/prism54/isl_ioctl.c
--- linux-2.4.24-orig/drivers/net/wireless/prism54/isl_ioctl.c	2004-01-27 16:36:01.000000000 +0100
+++ linux-2.4.24-kneza/drivers/net/wireless/prism54/isl_ioctl.c	2004-01-28 20:04:51.000000000 +0100
@@ -2359,6 +2359,72 @@
 	return 0;
 }
 
+
+static int
+prism54_set_profile(struct net_device *ndev, struct iw_request_info *info,
+		__u32 *uwrq, char *extra)
+{
+	MGT_SET_REQUEST_U32((islpci_private *) ndev->priv,
+			DOT11_OID_PROFILES, *uwrq, profile);
+
+	return -EINPROGRESS;
+}
+
+
+static int
+prism54_get_profile(struct net_device *ndev, struct iw_request_info *info,
+		__u32 *uwrq, char *extra)
+{
+	MGT_GET_REQUEST_U32((islpci_private *) ndev->priv,
+			DOT11_OID_PROFILES, uwrq, profile);
+
+	return 0;
+}
+
+static int
+prism54_set_burst(struct net_device *ndev, struct iw_request_info *info,
+		__u32 *uwrq, char *extra)
+{
+	MGT_SET_REQUEST_U32((islpci_private *) ndev->priv,
+			DOT11_OID_MAXFRAMEBURST, *uwrq, profile);
+
+	return -EINPROGRESS;
+}
+
+
+static int
+prism54_get_burst(struct net_device *ndev, struct iw_request_info *info,
+		__u32 *uwrq, char *extra)
+{
+	MGT_GET_REQUEST_U32((islpci_private *) ndev->priv,
+			DOT11_OID_MAXFRAMEBURST, uwrq, profile);
+
+	return 0;
+}
+
+
+static int
+prism54_set_fixedrate(struct net_device *ndev, struct iw_request_info *info,
+		__u32 *uwrq, char *extra)
+{
+	MGT_SET_REQUEST_U32((islpci_private *) ndev->priv,
+			DOT11_OID_ALOFT_FIXEDRATE, *uwrq, fixedrate);
+
+	return -EINPROGRESS;
+}
+
+
+static int
+prism54_get_fixedrate(struct net_device *ndev, struct iw_request_info *info,
+		__u32 *uwrq, char *extra)
+{
+	MGT_GET_REQUEST_U32((islpci_private *) ndev->priv,
+			DOT11_OID_ALOFT_FIXEDRATE, uwrq, fixedrate);
+
+	return 0;
+}
+
+
 #if WIRELESS_EXT > 12
 
 static const iw_handler prism54_handler[] = {
@@ -2441,6 +2507,15 @@
 #define PRISM54_GET_WPA	   SIOCIWFIRSTPRIV+13
 #define PRISM54_SET_WPA	   SIOCIWFIRSTPRIV+14
 
+#define PRISM54_GET_PROFILE	SIOCIWFIRSTPRIV+15
+#define PRISM54_SET_PROFILE	SIOCIWFIRSTPRIV+16
+
+#define PRISM54_GET_BURST	SIOCIWFIRSTPRIV+17
+#define PRISM54_SET_BURST	SIOCIWFIRSTPRIV+18
+
+#define PRISM54_GET_FIXEDRATE	SIOCIWFIRSTPRIV+19
+#define PRISM54_SET_FIXEDRATE	SIOCIWFIRSTPRIV+20
+
 static const struct iw_priv_args prism54_private_args[] = {
 /*{ cmd, set_args, get_args, name } */
 	{PRISM54_RESET, 0, 0, "reset"},
@@ -2464,6 +2539,18 @@
 	  "get_wpa" },
 	{ PRISM54_SET_WPA, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
 	  "set_wpa" },
+	{ PRISM54_GET_PROFILE, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+	  "get_profile" },
+	{ PRISM54_SET_PROFILE, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
+	  "set_profile" },
+	{ PRISM54_GET_BURST, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+	  "get_burst" },
+	{ PRISM54_SET_BURST, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
+	  "set_burst" },
+	{ PRISM54_GET_FIXEDRATE, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+	  "get_fixedrate" },
+	{ PRISM54_SET_FIXEDRATE, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
+	  "set_fixedrate" },
 };
 
 static const iw_handler prism54_private_handler[] = {
@@ -2482,6 +2569,12 @@
 	(iw_handler) prism54_kick_all,
 	(iw_handler) prism54_get_wpa,
 	(iw_handler) prism54_set_wpa,
+	(iw_handler) prism54_get_profile,
+	(iw_handler) prism54_set_profile,
+	(iw_handler) prism54_get_burst,
+	(iw_handler) prism54_set_burst,
+	(iw_handler) prism54_get_fixedrate,
+	(iw_handler) prism54_set_fixedrate,
 };
 
 const struct iw_handler_def prism54_handler_def = {
diff -u linux-2.4.24-orig/drivers/net/wireless/prism54/islpci_dev.h linux-2.4.24-kneza/drivers/net/wireless/prism54/islpci_dev.h
--- linux-2.4.24-orig/drivers/net/wireless/prism54/islpci_dev.h	2004-01-27 16:50:49.000000000 +0100
+++ linux-2.4.24-kneza/drivers/net/wireless/prism54/islpci_dev.h	2004-01-28 20:04:28.000000000 +0100
@@ -86,6 +86,8 @@
 	u32 longretries;
 	u32 maxtxlifetime;
 	u32 fixedtxpower;
+	u32 profile;
+	u32 burst;
 
 	struct semaphore sem;
 };

--------------060901070407000400080406--