Applied a series of patches from Robert Kennedy:
Hi, I fixed up some of the issues that sparse warns about when building the prism2_usb. I don't think that any of these patches change the generated modules and I've been running them on my laptop with no problems so far, 1+ days. I've not seen anything that looks to be a problem, so these patches are just to align the wlan code with the kernel best practises. With a couple of changes to ensure compilation against older kernels.
This commit is contained in:
parent
dd8d1809c9
commit
5e7b9a9de7
1
CHANGES
1
CHANGES
|
@ -41,6 +41,7 @@
|
|||
* Intersil Corporation as part of PRISM(R) chipset product development.
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
- Fixes for warnings generated by the 'sparse' tool (Richard Kennedy)
|
||||
- Add an explicit README.firmware containing copyright information
|
||||
on the firmware images.
|
||||
- Compile fixes for 2.6.8 (Victor Seva Lopez)
|
||||
|
|
1
THANKS
1
THANKS
|
@ -135,6 +135,7 @@ Ekin Meroglu <ekin@fisek.com.tr>
|
|||
Eric Koenders <Eric.Koenders@peekglobal.com>
|
||||
Andreas Schultes <flirt@hold-clan.de>
|
||||
Victor Seva Lopez <linuxmaniac@torreviejawireless.org>
|
||||
Richard Kennedy <richard@rsk.demon.co.uk>
|
||||
|
||||
[Many, many more. If I've overlooked you and you want to be listed here,
|
||||
send me e-mail and I'll fix it. I _know_ a bunch of linux-wlan contributors
|
||||
|
|
|
@ -431,6 +431,11 @@ typedef int spinlock_t;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28))
|
||||
#define __user
|
||||
#define __iomem
|
||||
#endif
|
||||
|
||||
#ifdef _LINUX_PROC_FS_H
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,25))
|
||||
|
||||
|
|
|
@ -616,7 +616,7 @@ void p80211knetdev_set_multicast_list(netdevice_t *dev)
|
|||
|
||||
#ifdef SIOCETHTOOL
|
||||
|
||||
static int p80211netdev_ethtool(wlandevice_t *wlandev, void *useraddr)
|
||||
static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr)
|
||||
{
|
||||
UINT32 ethcmd;
|
||||
struct ethtool_drvinfo info;
|
||||
|
@ -712,7 +712,7 @@ int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
|||
|
||||
#ifdef SIOCETHTOOL
|
||||
if (cmd == SIOCETHTOOL) {
|
||||
result = p80211netdev_ethtool(wlandev, (void *) ifr->ifr_data);
|
||||
result = p80211netdev_ethtool(wlandev, (void __user *) ifr->ifr_data);
|
||||
goto bail;
|
||||
}
|
||||
#endif
|
||||
|
@ -733,14 +733,14 @@ int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
|||
|
||||
/* Allocate a buf of size req->len */
|
||||
if ((msgbuf = kmalloc( req->len, GFP_KERNEL))) {
|
||||
if ( copy_from_user( msgbuf, req->data, req->len) ) {
|
||||
if ( copy_from_user( msgbuf, (void __user *) req->data, req->len) ) {
|
||||
result = -EFAULT;
|
||||
} else {
|
||||
result = p80211req_dorequest( wlandev, msgbuf);
|
||||
}
|
||||
|
||||
if ( result == 0 ) {
|
||||
if ( copy_to_user( req->data, msgbuf, req->len)) {
|
||||
if ( copy_to_user( (void __user *) req->data, msgbuf, req->len)) {
|
||||
result = -EFAULT;
|
||||
}
|
||||
}
|
||||
|
@ -1438,7 +1438,7 @@ int p80211_run_sbin_hotplug(wlandevice_t *wlandev, char *action)
|
|||
i = 0;
|
||||
argv[i++] = hotplug_path;
|
||||
argv[i++] = "wlan";
|
||||
argv[i] = 0;
|
||||
argv[i] = NULL;
|
||||
|
||||
i = 0;
|
||||
/* minimal command environment */
|
||||
|
@ -1448,7 +1448,7 @@ int p80211_run_sbin_hotplug(wlandevice_t *wlandev, char *action)
|
|||
envp [i++] = action_str;
|
||||
envp [i++] = nsdname;
|
||||
envp [i++] = wlan_wext;
|
||||
envp [i] = 0;
|
||||
envp [i] = NULL;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,62))
|
||||
return call_usermodehelper(argv [0], argv, envp);
|
||||
|
|
|
@ -1554,12 +1554,12 @@ static iw_handler p80211wext_handlers[] = {
|
|||
};
|
||||
|
||||
struct iw_handler_def p80211wext_handler_def = {
|
||||
num_standard: sizeof(p80211wext_handlers) / sizeof(iw_handler),
|
||||
num_private: 0,
|
||||
num_private_args: 0,
|
||||
standard: p80211wext_handlers,
|
||||
private: NULL,
|
||||
private_args: NULL
|
||||
.num_standard = sizeof(p80211wext_handlers) / sizeof(iw_handler),
|
||||
.num_private = 0,
|
||||
.num_private_args = 0,
|
||||
.standard = p80211wext_handlers,
|
||||
.private = NULL,
|
||||
.private_args = NULL
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#define PRISM_USB_DEVICE(vid, pid, name) \
|
||||
USB_DEVICE(vid, pid), \
|
||||
driver_info: (unsigned long) name
|
||||
.driver_info = (unsigned long) name
|
||||
|
||||
static struct usb_device_id usb_prism_tbl[] = {
|
||||
{PRISM_USB_DEVICE(0x04bb, 0x0922, "IOData AirPort WN-B11/USBS")},
|
||||
|
|
|
@ -1775,7 +1775,7 @@ typedef struct hfa384x_HandoverAddr
|
|||
} __WLAN_ATTRIB_PACK__ hfa384x_HandoverAddr_t;
|
||||
|
||||
/*-- Inquiry Frame, Diagnose: Communication Tallies --*/
|
||||
typedef struct __WLAN_ATTRIB_PACK__ hfa384x_CommTallies16
|
||||
typedef struct hfa384x_CommTallies16
|
||||
{
|
||||
UINT16 txunicastframes __WLAN_ATTRIB_PACK__;
|
||||
UINT16 txmulticastframes __WLAN_ATTRIB_PACK__;
|
||||
|
@ -1800,7 +1800,7 @@ typedef struct __WLAN_ATTRIB_PACK__ hfa384x_CommTallies16
|
|||
UINT16 rxmsginbadmsgfrag __WLAN_ATTRIB_PACK__;
|
||||
} __WLAN_ATTRIB_PACK__ hfa384x_CommTallies16_t;
|
||||
|
||||
typedef struct __WLAN_ATTRIB_PACK__ hfa384x_CommTallies32
|
||||
typedef struct hfa384x_CommTallies32
|
||||
{
|
||||
UINT32 txunicastframes __WLAN_ATTRIB_PACK__;
|
||||
UINT32 txmulticastframes __WLAN_ATTRIB_PACK__;
|
||||
|
|
Loading…
Reference in a new issue