Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 790ab10ed7a5c7c343f25b7478107604 > files > 4

dkms-rtl8187se-1016.20080716-1mdv2009.0.src.rpm

Fix for commit ccc580571cf0799d0460a085a7632b77753f083e on Linux 2.6.27

Already fixed also by Blino and others:
http://people.mandriva.com/~blino/rtl8187se_linux_26.1016.0716.2008-2.6.27.patch
http://geekshell.org/~madx/patch_rtl8187se_2.6.27

diff -p -up rtl8187se_linux_26.1016.0716.2008/ieee80211/ieee80211_wx.c.orig rtl8187se_linux_26.1016.0716.2008/ieee80211/ieee80211_wx.c
--- rtl8187se_linux_26.1016.0716.2008/ieee80211/ieee80211_wx.c.orig	2008-09-17 14:59:43.000000000 -0300
+++ rtl8187se_linux_26.1016.0716.2008/ieee80211/ieee80211_wx.c	2008-09-17 15:02:37.000000000 -0300
@@ -41,6 +41,7 @@ static const char *ieee80211_modes[] = {
 
 #define MAX_CUSTOM_LEN 64
 static inline char *ipw2100_translate_scan(struct ieee80211_device *ieee,
+					   struct iw_request_info *info,
  					   char *start, char *stop,
 					   struct ieee80211_network *network)
 {
@@ -54,7 +55,7 @@ static inline char *ipw2100_translate_sc
 	iwe.cmd = SIOCGIWAP;
 	iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
 	memcpy(iwe.u.ap_addr.sa_data, network->bssid, ETH_ALEN);
-	start = iwe_stream_add_event(start, stop, &iwe, IW_EV_ADDR_LEN);
+	start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_ADDR_LEN);
 
 	/* Remaining entries will be displayed in the order we provide them */
 
@@ -63,16 +64,16 @@ static inline char *ipw2100_translate_sc
 	iwe.u.data.flags = 1;
 	if (network->flags & NETWORK_EMPTY_ESSID) {
 		iwe.u.data.length = sizeof("<hidden>");
-		start = iwe_stream_add_point(start, stop, &iwe, "<hidden>");
+		start = iwe_stream_add_point(info, start, stop, &iwe, "<hidden>");
 	} else {
 		iwe.u.data.length = min(network->ssid_len, (u8)32);
-		start = iwe_stream_add_point(start, stop, &iwe, network->ssid);
+		start = iwe_stream_add_point(info, start, stop, &iwe, network->ssid);
 	}
 //	printk("ESSID: %s\n",network->ssid);
 	/* Add the protocol name */
 	iwe.cmd = SIOCGIWNAME;
 	snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11%s", ieee80211_modes[network->mode]);
-	start = iwe_stream_add_event(start, stop, &iwe, IW_EV_CHAR_LEN);
+	start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN);
 
         /* Add mode */
         iwe.cmd = SIOCGIWMODE;
@@ -83,7 +84,7 @@ static inline char *ipw2100_translate_sc
 		else
 			iwe.u.mode = IW_MODE_ADHOC;
 
-		start = iwe_stream_add_event(start, stop, &iwe,
+		start = iwe_stream_add_event(info, start, stop, &iwe,
 					     IW_EV_UINT_LEN);
 	}
 
@@ -94,7 +95,7 @@ static inline char *ipw2100_translate_sc
 	iwe.u.freq.m = network->channel;
 	iwe.u.freq.e = 0;
 	iwe.u.freq.i = 0;
-	start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
+	start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_FREQ_LEN);
 
 	/* Add encryption capability */
 	iwe.cmd = SIOCGIWENCODE;
@@ -103,7 +104,7 @@ static inline char *ipw2100_translate_sc
 	else
 		iwe.u.data.flags = IW_ENCODE_DISABLED;
 	iwe.u.data.length = 0;
-	start = iwe_stream_add_point(start, stop, &iwe, network->ssid);
+	start = iwe_stream_add_point(info, start, stop, &iwe, network->ssid);
 
 	/* Add basic and extended rates */
 	max_rate = 0;
@@ -132,13 +133,13 @@ static inline char *ipw2100_translate_sc
 	iwe.cmd = SIOCGIWRATE;
 	iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
 	iwe.u.bitrate.value = max_rate * 500000;
-	start = iwe_stream_add_event(start, stop, &iwe,
+	start = iwe_stream_add_event(info, start, stop, &iwe,
 				     IW_EV_PARAM_LEN);
 
 	iwe.cmd = IWEVCUSTOM;
 	iwe.u.data.length = p - custom;
 	if (iwe.u.data.length)
-		start = iwe_stream_add_point(start, stop, &iwe, custom);
+		start = iwe_stream_add_point(info, start, stop, &iwe, custom);
 
 	/* Add quality statistics */
 	/* TODO: Fix these values... */
@@ -157,14 +158,14 @@ static inline char *ipw2100_translate_sc
 	if (!(network->stats.mask & IEEE80211_STATMASK_SIGNAL))
 		iwe.u.qual.updated |= IW_QUAL_QUAL_INVALID;
 	iwe.u.qual.updated = 7;
-	start = iwe_stream_add_event(start, stop, &iwe, IW_EV_QUAL_LEN);
+	start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_QUAL_LEN);
 
 	iwe.cmd = IWEVCUSTOM;
 	p = custom;
 
 	iwe.u.data.length = p - custom;
 	if (iwe.u.data.length)
-		start = iwe_stream_add_point(start, stop, &iwe, custom);
+		start = iwe_stream_add_point(info, start, stop, &iwe, custom);
 
 #if 0
 	if (ieee->wpa_enabled && network->wpa_ie_len){
@@ -179,7 +180,7 @@ static inline char *ipw2100_translate_sc
 		memset(&iwe, 0, sizeof(iwe));
 		iwe.cmd = IWEVCUSTOM;
 		iwe.u.data.length = strlen(buf);
-		start = iwe_stream_add_point(start, stop, &iwe, buf);
+		start = iwe_stream_add_point(info, start, stop, &iwe, buf);
 	}
 
 	if (ieee->wpa_enabled && network->rsn_ie_len){
@@ -200,7 +201,7 @@ static inline char *ipw2100_translate_sc
                 memcpy(buf, network->wpa_ie, network->wpa_ie_len);
                 iwe.cmd = IWEVGENIE;
                 iwe.u.data.length = network->wpa_ie_len;
-                start = iwe_stream_add_point(start, stop, &iwe, buf);
+                start = iwe_stream_add_point(info, start, stop, &iwe, buf);
         }
 
         memset(&iwe, 0, sizeof(iwe));
@@ -218,7 +219,7 @@ static inline char *ipw2100_translate_sc
                 memcpy(buf, network->rsn_ie, network->rsn_ie_len);
                 iwe.cmd = IWEVGENIE;
                 iwe.u.data.length = network->rsn_ie_len;
-		start = iwe_stream_add_point(start, stop, &iwe, buf);
+		start = iwe_stream_add_point(info, start, stop, &iwe, buf);
 	}
 
 #endif
@@ -231,7 +232,7 @@ static inline char *ipw2100_translate_sc
 		      " Last beacon: %lums ago", (jiffies - network->last_scanned) / (HZ / 100));
 	iwe.u.data.length = p - custom;
 	if (iwe.u.data.length)
-		start = iwe_stream_add_point(start, stop, &iwe, custom);
+		start = iwe_stream_add_point(info, start, stop, &iwe, custom);
 
 
 	return start;
@@ -266,7 +267,7 @@ int ieee80211_wx_get_scan(struct ieee802
 			if (ieee->scan_age == 0 ||
 			    time_after(network->last_scanned + ieee->scan_age, jiffies))
 			{
-				ev = ipw2100_translate_scan(ieee, ev, stop, network);
+				ev = ipw2100_translate_scan(ieee, info, ev, stop, network);
 			}
 			else
 				IEEE80211_DEBUG_SCAN(