summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/hostap/hostap_wlan.h
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2005-07-30 12:50:05 -0700
committerJeff Garzik <jgarzik@pobox.com>2005-07-30 18:17:23 -0400
commitb15eff2632be3fcea68e01ba7f12e26a731e3157 (patch)
treee61b3a7b99c1078faed0dc0594b1df8c09caa9b2 /drivers/net/wireless/hostap/hostap_wlan.h
parent3e1d393240880e3d7ae580c46f1ba265643fcd15 (diff)
[PATCH] hostap update
Warning fix for 64-bit platforms Hello! The patch fixes following warning seen on 64-bit platforms (in my case - x86_64, gcc-4.0): In file included from /usr/local/src/hostap/driver/modules/hostap_cs.c:203: /usr/local/src/hostap/driver/modules/hostap_hw.c: In function ?prism2_transmit_cb?: /usr/local/src/hostap/driver/modules/hostap_hw.c:1674: warning: cast from pointer to integer of different size /usr/local/src/hostap/driver/modules/hostap_hw.c: In function ?prism2_transmit?: /usr/local/src/hostap/driver/modules/hostap_hw.c:1758: warning: cast to pointer from integer of different size prism2_transmit_cb uses a (void *) argument to get an integer. A simple fix would be to use double cast from pointer to long and then to int (and vice versa when int is passed as a pointer). But I prefer a slightly longer patch. I believe that whenever an argument can hold both a pointer and an integer, it should be declared long. long can hold both pointers and integers (except win64, but we are not coding for Windows), it can be cast to both of them and it's never assumed to be a valid pointer, which could be useful for some automatic code checkers. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_wlan.h')
-rw-r--r--drivers/net/wireless/hostap/hostap_wlan.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
index 03de0ea80bbd..f215a22e8fee 100644
--- a/drivers/net/wireless/hostap/hostap_wlan.h
+++ b/drivers/net/wireless/hostap/hostap_wlan.h
@@ -545,9 +545,9 @@ struct hostap_cmd_queue {
struct list_head list;
wait_queue_head_t compl;
volatile enum { CMD_SLEEP, CMD_CALLBACK, CMD_COMPLETED } type;
- void (*callback)(struct net_device *dev, void *context, u16 resp0,
+ void (*callback)(struct net_device *dev, long context, u16 resp0,
u16 res);
- void *context;
+ long context;
u16 cmd, param0, param1;
u16 resp0, res;
volatile int issued, issuing;