summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/packages/rt2860/rt2860-1.7.0.0/01_dev_get_by_name.patch24
-rw-r--r--meta/packages/rt2860/rt2860-1.7.0.0/02_wpa-fix.patch30
-rw-r--r--meta/packages/rt2860/rt2860-1.7.0.0/03-iwe_stream_add.patch118
-rw-r--r--meta/packages/rt2860/rt2860-1.7.0.0/04-pci_name.patch17
-rw-r--r--meta/packages/rt2860/rt2860_1.7.0.0.bb26
5 files changed, 215 insertions, 0 deletions
diff --git a/meta/packages/rt2860/rt2860-1.7.0.0/01_dev_get_by_name.patch b/meta/packages/rt2860/rt2860-1.7.0.0/01_dev_get_by_name.patch
new file mode 100644
index 0000000000..2f9d2ad501
--- /dev/null
+++ b/meta/packages/rt2860/rt2860-1.7.0.0/01_dev_get_by_name.patch
@@ -0,0 +1,24 @@
1---
2 src/rt_main_dev.c | 9 ++++++++-
3 1 file changed, 8 insertions(+), 1 deletion(-)
4
5Index: rt2860-clean/src/rt_main_dev.c
6===================================================================
7--- rt2860-clean.orig/src/rt_main_dev.c 2008-09-11 15:05:14.000000000 +0200
8+++ rt2860-clean/src/rt_main_dev.c 2008-09-11 15:05:17.000000000 +0200
9@@ -800,7 +800,14 @@ static NDIS_STATUS rt_ieee80211_if_setup
10 sprintf(slot_name, "ra%d", i);
11
12 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
13- device = dev_get_by_name(dev->nd_net, slot_name);
14+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
15+
16+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
17+ device = dev_get_by_name(dev_net(dev), slot_name);
18+#else
19+ device = dev_get_by_name(dev->nd_net, slot_name);
20+#endif
21+
22 #else
23 device = dev_get_by_name(slot_name);
24 #endif
diff --git a/meta/packages/rt2860/rt2860-1.7.0.0/02_wpa-fix.patch b/meta/packages/rt2860/rt2860-1.7.0.0/02_wpa-fix.patch
new file mode 100644
index 0000000000..c55093d719
--- /dev/null
+++ b/meta/packages/rt2860/rt2860-1.7.0.0/02_wpa-fix.patch
@@ -0,0 +1,30 @@
1---
2 src/mlme.c | 15 +++++++++++++++
3 1 file changed, 15 insertions(+)
4
5Index: rt2860-clean/src/mlme.c
6===================================================================
7--- rt2860-clean.orig/src/mlme.c 2008-09-11 15:06:10.000000000 +0200
8+++ rt2860-clean/src/mlme.c 2008-09-11 15:06:14.000000000 +0200
9@@ -772,6 +772,21 @@ VOID MlmePeriodicExec(
10 ULONG TxTotalCnt;
11 PRTMP_ADAPTER pAd = (RTMP_ADAPTER *)FunctionContext;
12
13+#ifdef EEEPC_SPECIAL_SETTING
14+ //Baron 2008/07/10
15+ //printk("Baron_Test:\t%s", RTMPGetRalinkEncryModeStr(pAd->StaCfg.WepStatus));
16+ //If the STA security setting is OPEN or WEP, pAd->StaCfg.WpaSupplicantUP = 0.
17+ //If the STA security setting is WPAPSK or WPA2PSK, pAd->StaCfg.WpaSupplicantUP = 1.
18+ if(pAd->StaCfg.WepStatus<2)
19+ {
20+ pAd->StaCfg.WpaSupplicantUP = 0;
21+ }
22+ else
23+ {
24+ pAd->StaCfg.WpaSupplicantUP = 1;
25+ }
26+#endif
27+
28 #ifdef CONFIG_STA_SUPPORT
29 #ifdef RT2860
30 IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
diff --git a/meta/packages/rt2860/rt2860-1.7.0.0/03-iwe_stream_add.patch b/meta/packages/rt2860/rt2860-1.7.0.0/03-iwe_stream_add.patch
new file mode 100644
index 0000000000..c47d561dc4
--- /dev/null
+++ b/meta/packages/rt2860/rt2860-1.7.0.0/03-iwe_stream_add.patch
@@ -0,0 +1,118 @@
1---
2 src/sta_ioctl.c | 26 +++++++++++++-------------
3 1 file changed, 13 insertions(+), 13 deletions(-)
4
5Index: rt2860-clean/src/sta_ioctl.c
6===================================================================
7--- rt2860-clean.orig/src/sta_ioctl.c 2008-09-11 15:14:44.000000000 +0200
8+++ rt2860-clean/src/sta_ioctl.c 2008-09-11 15:44:27.000000000 +0200
9@@ -1010,8 +1010,8 @@ int rt_ioctl_siwscan(struct net_device *
10 }
11
12 int rt_ioctl_giwscan(struct net_device *dev,
13- struct iw_request_info *info,
14- struct iw_point *data, char *extra)
15+ struct iw_request_info *info,
16+ struct iw_point *data, char *extra)
17 {
18
19 PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
20@@ -1073,7 +1073,7 @@ int rt_ioctl_giwscan(struct net_device *
21 memcpy(iwe.u.ap_addr.sa_data, &pAdapter->ScanTab.BssEntry[i].Bssid, ETH_ALEN);
22
23 previous_ev = current_ev;
24- current_ev = iwe_stream_add_event(current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
25+ current_ev = iwe_stream_add_event(info, current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
26 if (current_ev == previous_ev)
27 #if WIRELESS_EXT >= 17
28 return -E2BIG;
29@@ -1089,7 +1089,7 @@ int rt_ioctl_giwscan(struct net_device *
30 iwe.u.data.flags = 1;
31
32 previous_ev = current_ev;
33- current_ev = iwe_stream_add_point(current_ev,end_buf, &iwe, pAdapter->ScanTab.BssEntry[i].Ssid);
34+ current_ev = iwe_stream_add_point(info, current_ev,end_buf, &iwe, pAdapter->ScanTab.BssEntry[i].Ssid);
35 if (current_ev == previous_ev)
36 #if WIRELESS_EXT >= 17
37 return -E2BIG;
38@@ -1116,7 +1116,7 @@ int rt_ioctl_giwscan(struct net_device *
39 iwe.len = IW_EV_UINT_LEN;
40
41 previous_ev = current_ev;
42- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
43+ current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
44 if (current_ev == previous_ev)
45 #if WIRELESS_EXT >= 17
46 return -E2BIG;
47@@ -1136,7 +1136,7 @@ int rt_ioctl_giwscan(struct net_device *
48 iwe.u.freq.i = 0;
49
50 previous_ev = current_ev;
51- current_ev = iwe_stream_add_event(current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
52+ current_ev = iwe_stream_add_event(info, current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
53 if (current_ev == previous_ev)
54 #if WIRELESS_EXT >= 17
55 return -E2BIG;
56@@ -1151,7 +1151,7 @@ int rt_ioctl_giwscan(struct net_device *
57 iwe.u.qual.level = 0;
58 iwe.u.qual.noise = 0;
59 set_quality(pAdapter, &iwe.u.qual, pAdapter->ScanTab.BssEntry[i].Rssi);
60- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
61+ current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
62 if (current_ev == previous_ev)
63 #if WIRELESS_EXT >= 17
64 return -E2BIG;
65@@ -1169,7 +1169,7 @@ int rt_ioctl_giwscan(struct net_device *
66 iwe.u.data.flags = IW_ENCODE_DISABLED;
67
68 previous_ev = current_ev;
69- current_ev = iwe_stream_add_point(current_ev, end_buf,&iwe, (char *)pAdapter->SharedKey[BSS0][(iwe.u.data.flags & IW_ENCODE_INDEX)-1].Key);
70+ current_ev = iwe_stream_add_point(info, current_ev, end_buf,&iwe, (char *)pAdapter->SharedKey[BSS0][(iwe.u.data.flags & IW_ENCODE_INDEX)-1].Key);
71 if (current_ev == previous_ev)
72 #if WIRELESS_EXT >= 17
73 return -E2BIG;
74@@ -1197,7 +1197,7 @@ int rt_ioctl_giwscan(struct net_device *
75 iwe.u.bitrate.value = (tmpRate/2) * 1000000;
76
77 iwe.u.bitrate.disabled = 0;
78- current_val = iwe_stream_add_value(current_ev,
79+ current_val = iwe_stream_add_value(info, current_ev,
80 current_val, end_buf, &iwe,
81 IW_EV_PARAM_LEN);
82
83@@ -1221,7 +1221,7 @@ int rt_ioctl_giwscan(struct net_device *
84 pAdapter->ScanTab.BssEntry[i].WpaIE.IELen);
85 iwe.cmd = IWEVGENIE;
86 iwe.u.data.length = pAdapter->ScanTab.BssEntry[i].WpaIE.IELen;
87- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom);
88+ current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom);
89 if (current_ev == previous_ev)
90 #if WIRELESS_EXT >= 17
91 return -E2BIG;
92@@ -1239,7 +1239,7 @@ int rt_ioctl_giwscan(struct net_device *
93 pAdapter->ScanTab.BssEntry[i].RsnIE.IELen);
94 iwe.cmd = IWEVGENIE;
95 iwe.u.data.length = pAdapter->ScanTab.BssEntry[i].RsnIE.IELen;
96- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom);
97+ current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom);
98 if (current_ev == previous_ev)
99 #if WIRELESS_EXT >= 17
100 return -E2BIG;
101@@ -1260,7 +1260,7 @@ int rt_ioctl_giwscan(struct net_device *
102 for (idx = 0; idx < pAdapter->ScanTab.BssEntry[i].WpaIE.IELen; idx++)
103 sprintf(custom, "%s%02x", custom, pAdapter->ScanTab.BssEntry[i].WpaIE.IE[idx]);
104 previous_ev = current_ev;
105- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom);
106+ current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom);
107 if (current_ev == previous_ev)
108 #if WIRELESS_EXT >= 17
109 return -E2BIG;
110@@ -1280,7 +1280,7 @@ int rt_ioctl_giwscan(struct net_device *
111 for (idx = 0; idx < pAdapter->ScanTab.BssEntry[i].RsnIE.IELen; idx++)
112 sprintf(custom, "%s%02x", custom, pAdapter->ScanTab.BssEntry[i].RsnIE.IE[idx]);
113 previous_ev = current_ev;
114- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom);
115+ current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom);
116 if (current_ev == previous_ev)
117 #if WIRELESS_EXT >= 17
118 return -E2BIG;
diff --git a/meta/packages/rt2860/rt2860-1.7.0.0/04-pci_name.patch b/meta/packages/rt2860/rt2860-1.7.0.0/04-pci_name.patch
new file mode 100644
index 0000000000..ded935054d
--- /dev/null
+++ b/meta/packages/rt2860/rt2860-1.7.0.0/04-pci_name.patch
@@ -0,0 +1,17 @@
1---
2 src/2860_main_dev.c | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5Index: rt2860-clean/src/2860_main_dev.c
6===================================================================
7--- rt2860-clean.orig/src/2860_main_dev.c 2008-09-11 16:29:27.000000000 +0200
8+++ rt2860-clean/src/2860_main_dev.c 2008-09-11 16:29:32.000000000 +0200
9@@ -1074,7 +1074,7 @@ BOOLEAN RT28XXNetDevInit(
10 IN RTMP_ADAPTER *pAd)
11 {
12 struct pci_dev *pci_dev = (struct pci_dev *)_dev_p;
13- CHAR *print_name;
14+ const char *print_name;
15 ULONG csr_addr;
16
17
diff --git a/meta/packages/rt2860/rt2860_1.7.0.0.bb b/meta/packages/rt2860/rt2860_1.7.0.0.bb
new file mode 100644
index 0000000000..fb11efd91c
--- /dev/null
+++ b/meta/packages/rt2860/rt2860_1.7.0.0.bb
@@ -0,0 +1,26 @@
1DESCRIPTION = "Driver for the 802.11n RaLink rt2860 chipset"
2PRIORITY = "optional"
3SECTION = "kernel/modules"
4LICENSE = "GPL"
5PR = "r0"
6
7SRC_URI = "http://folks.o-hand.com/sameo/rt2860/rt2860-1.7.0.0.tar.bz2 \
8 file://01_dev_get_by_name.patch;patch=1 \
9 file://02_wpa-fix.patch;patch=1" \
10 file://03-iwe_stream_add.patch;patch=1" \
11 file://04-pci_name.patch;patch=1"
12
13S = "${WORKDIR}/rt2860-1.7.0.0"
14
15inherit module
16
17EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \
18 'LD=${KERNEL_LD}' \
19 'KDIR=${STAGING_KERNEL_DIR}'"
20
21MODULES = "rt2860"
22
23do_install() {
24 install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
25 install -m 0644 *${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
26}