Lines 53-58
Link Here
|
53 |
#include <linux/pci_ids.h> |
53 |
#include <linux/pci_ids.h> |
54 |
#define WLC_MAXBSSCFG 1 |
54 |
#define WLC_MAXBSSCFG 1 |
55 |
|
55 |
|
|
|
56 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
57 |
#include <net/lib80211.h> |
58 |
#endif |
56 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) |
59 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) |
57 |
#include <net/ieee80211.h> |
60 |
#include <net/ieee80211.h> |
58 |
#endif |
61 |
#endif |
Lines 149-155
Link Here
|
149 |
bool resched; |
152 |
bool resched; |
150 |
uint32 pci_psstate[16]; |
153 |
uint32 pci_psstate[16]; |
151 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) |
154 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) |
|
|
155 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
156 |
struct lib80211_crypto_ops *tkipmodops; |
157 |
#else |
152 |
struct ieee80211_crypto_ops *tkipmodops; |
158 |
struct ieee80211_crypto_ops *tkipmodops; |
|
|
159 |
#endif |
153 |
struct ieee80211_tkip_data *tkip_ucast_data; |
160 |
struct ieee80211_tkip_data *tkip_ucast_data; |
154 |
struct ieee80211_tkip_data *tkip_bcast_data; |
161 |
struct ieee80211_tkip_data *tkip_bcast_data; |
155 |
#endif |
162 |
#endif |
Lines 190-196
Link Here
|
190 |
|
197 |
|
191 |
static int wl_found = 0; |
198 |
static int wl_found = 0; |
192 |
|
199 |
|
|
|
200 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
201 |
#define WL_DEV_IF(dev) ((wl_if_t*)netdev_priv(dev)) |
202 |
#else |
193 |
#define WL_DEV_IF(dev) ((wl_if_t*)(dev)->priv) |
203 |
#define WL_DEV_IF(dev) ((wl_if_t*)(dev)->priv) |
|
|
204 |
#endif |
194 |
#define WL_INFO(dev) ((wl_info_t*)(WL_DEV_IF(dev)->wl)) |
205 |
#define WL_INFO(dev) ((wl_info_t*)(WL_DEV_IF(dev)->wl)) |
195 |
|
206 |
|
196 |
#define WL_LOCK(wl) spin_lock_bh(&(wl)->lock) |
207 |
#define WL_LOCK(wl) spin_lock_bh(&(wl)->lock) |
Lines 350-355
Link Here
|
350 |
dev = wlif->dev; |
361 |
dev = wlif->dev; |
351 |
wl->dev = dev; |
362 |
wl->dev = dev; |
352 |
wl_if_setup(dev); |
363 |
wl_if_setup(dev); |
|
|
364 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
365 |
wlif = netdev_priv(dev); |
366 |
#endif |
353 |
|
367 |
|
354 |
dev->base_addr = regs; |
368 |
dev->base_addr = regs; |
355 |
|
369 |
|
Lines 423-432
Link Here
|
423 |
|
437 |
|
424 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) |
438 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) |
425 |
|
439 |
|
|
|
440 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
441 |
wl->tkipmodops = lib80211_get_crypto_ops("TKIP"); |
442 |
#else |
426 |
wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); |
443 |
wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); |
|
|
444 |
#endif |
427 |
if (wl->tkipmodops == NULL) { |
445 |
if (wl->tkipmodops == NULL) { |
|
|
446 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
447 |
request_module("lib80211"); |
448 |
wl->tkipmodops = lib80211_get_crypto_ops("TKIP"); |
449 |
#else |
428 |
request_module("ieee80211_crypt_tkip"); |
450 |
request_module("ieee80211_crypt_tkip"); |
429 |
wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); |
451 |
wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); |
|
|
452 |
#endif |
430 |
} |
453 |
} |
431 |
#endif |
454 |
#endif |
432 |
#ifdef CONFIG_WIRELESS_EXT |
455 |
#ifdef CONFIG_WIRELESS_EXT |
Lines 725-731
Link Here
|
725 |
} |
748 |
} |
726 |
|
749 |
|
727 |
if (wl->monitor) { |
750 |
if (wl->monitor) { |
|
|
751 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
752 |
wl_free_if(wl, (wl_if_t *)netdev_priv(wl->monitor)); |
753 |
#else |
728 |
wl_free_if(wl, (wl_if_t *)(wl->monitor->priv)); |
754 |
wl_free_if(wl, (wl_if_t *)(wl->monitor->priv)); |
|
|
755 |
#endif |
729 |
wl->monitor = NULL; |
756 |
wl->monitor = NULL; |
730 |
} |
757 |
} |
731 |
|
758 |
|
Lines 895-900
Link Here
|
895 |
#else |
922 |
#else |
896 |
|
923 |
|
897 |
dev = alloc_netdev(0, name, ether_setup); |
924 |
dev = alloc_netdev(0, name, ether_setup); |
|
|
925 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) |
926 |
wlif = netdev_priv(dev); |
927 |
#endif |
898 |
if (!dev) { |
928 |
if (!dev) { |
899 |
MFREE(wl->osh, wlif, sizeof(wl_if_t)); |
929 |
MFREE(wl->osh, wlif, sizeof(wl_if_t)); |
900 |
WL_ERROR(("wl%d: wl_alloc_if: out of memory, alloc_netdev\n", |
930 |
WL_ERROR(("wl%d: wl_alloc_if: out of memory, alloc_netdev\n", |
Lines 908-914
Link Here
|
908 |
wlif->wl = wl; |
938 |
wlif->wl = wl; |
909 |
wlif->wlcif = wlcif; |
939 |
wlif->wlcif = wlcif; |
910 |
wlif->subunit = subunit; |
940 |
wlif->subunit = subunit; |
|
|
941 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) |
911 |
dev->priv = wlif; |
942 |
dev->priv = wlif; |
|
|
943 |
#endif |
912 |
|
944 |
|
913 |
if (iftype != WL_IFTYPE_MON && wl->dev && netif_queue_stopped(wl->dev)) |
945 |
if (iftype != WL_IFTYPE_MON && wl->dev && netif_queue_stopped(wl->dev)) |
914 |
netif_stop_queue(dev); |
946 |
netif_stop_queue(dev); |