Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 248450 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/wl/sys/wl_iw.c (+24 lines)
Lines 610-616 Link Here
610
	char *extra
610
	char *extra
611
)
611
)
612
{
612
{
613
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
614
	wl_iw_t *iw = netdev_priv(dev);
615
#else
613
	wl_iw_t *iw = dev->priv;
616
	wl_iw_t *iw = dev->priv;
617
#endif
614
	struct sockaddr *addr = (struct sockaddr *) extra;
618
	struct sockaddr *addr = (struct sockaddr *) extra;
615
	int i;
619
	int i;
616
620
Lines 635-641 Link Here
635
	char *extra
639
	char *extra
636
)
640
)
637
{
641
{
642
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
643
	wl_iw_t *iw = netdev_priv(dev);
644
#else
638
	wl_iw_t *iw = dev->priv;
645
	wl_iw_t *iw = dev->priv;
646
#endif
639
	struct sockaddr *addr = (struct sockaddr *) extra;
647
	struct sockaddr *addr = (struct sockaddr *) extra;
640
	struct iw_quality *qual = (struct iw_quality *) &addr[iw->spy_num];
648
	struct iw_quality *qual = (struct iw_quality *) &addr[iw->spy_num];
641
	int i;
649
	int i;
Lines 1111-1117 Link Here
1111
	char *extra
1119
	char *extra
1112
)
1120
)
1113
{
1121
{
1122
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
1123
	wl_iw_t *iw = netdev_priv(dev);
1124
#else
1114
	wl_iw_t *iw = dev->priv;
1125
	wl_iw_t *iw = dev->priv;
1126
#endif
1115
1127
1116
	WL_TRACE(("%s: SIOCSIWNICKN\n", dev->name));
1128
	WL_TRACE(("%s: SIOCSIWNICKN\n", dev->name));
1117
1129
Lines 1135-1141 Link Here
1135
	char *extra
1147
	char *extra
1136
)
1148
)
1137
{
1149
{
1150
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
1151
	wl_iw_t *iw = netdev_priv(dev);
1152
#else
1138
	wl_iw_t *iw = dev->priv;
1153
	wl_iw_t *iw = dev->priv;
1154
#endif
1139
1155
1140
	WL_TRACE(("%s: SIOCGIWNICKN\n", dev->name));
1156
	WL_TRACE(("%s: SIOCGIWNICKN\n", dev->name));
1141
1157
Lines 1795-1801 Link Here
1795
	int paramid;
1811
	int paramid;
1796
	int paramval;
1812
	int paramval;
1797
	int val = 0;
1813
	int val = 0;
1814
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
1815
	wl_iw_t *iw = netdev_priv(dev);
1816
#else
1798
	wl_iw_t *iw = dev->priv;
1817
	wl_iw_t *iw = dev->priv;
1818
#endif
1799
1819
1800
	WL_TRACE(("%s: SIOCSIWAUTH\n", dev->name));
1820
	WL_TRACE(("%s: SIOCSIWAUTH\n", dev->name));
1801
1821
Lines 1926-1932 Link Here
1926
	int paramid;
1946
	int paramid;
1927
	int paramval = 0;
1947
	int paramval = 0;
1928
	int val;
1948
	int val;
1949
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
1950
	wl_iw_t *iw = netdev_priv(dev);
1951
#else
1929
	wl_iw_t *iw = dev->priv;
1952
	wl_iw_t *iw = dev->priv;
1953
#endif
1930
1954
1931
	WL_TRACE(("%s: SIOCGIWAUTH\n", dev->name));
1955
	WL_TRACE(("%s: SIOCGIWAUTH\n", dev->name));
1932
1956
(-)a/src/wl/sys/wl_linux.c (+32 lines)
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);

Return to bug 248450