ndiswrapper 1.53 patch, fedora 9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi listers
fedora 9 on a laptop.

not sure if i am the only silly fool having this problem. but i managed to solve it, and in case there are more of you facing this prob this may be helpful.

unfortunately i had bought a D-LINK DWL-650+ wlan card. this card is equipped with the TNETW1100B chip (it least the one i bought). to make wlan run you must either install

the acx100 project
ndiswrapper

both with approp firmware from windoof.

i could not compile the acx100 module in my environment, the help from the acx100 mailing list lead me nowhere, i.e. acx100 did not work, because i could not compile the module.

then i installed the f9 ndiswrapper package, but when i wanted to compile the module i got similar compilation errors like with acx100.

then i downloaded the source tarball of ndiswrapper from sourceforge, and also compiled package. and - sure enough - i got similar compilation errors to those above. all googling and looking into mailing lists did not help. i was on my own. i took a deeper look into the error list and then created the following patch (see also attached file):


[myuser@mylap ~/software/ndiswrapper-1.53/driver]$ cat iw_ndis.c.patch
*** iw_ndis.c.orig	2008-08-02 10:30:34.000000000 +0200
--- iw_ndis.c	2008-08-02 10:44:28.000000000 +0200
***************
*** 1025,1028 ****
--- 1025,1029 ----
  	struct ndis_wlan_bssid *bssid;
  	struct ndis_wlan_bssid_ex *bssid_ex;
+ 	struct iw_request_info *info;

  	ENTER2("%p, %p", event, item);
***************
*** 1035,1039 ****
  	iwe.len = IW_EV_ADDR_LEN;
  	memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN);
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_ADDR_LEN);

  	/* add essid */
--- 1036,1040 ----
  	iwe.len = IW_EV_ADDR_LEN;
  	memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN);
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_ADDR_LEN);

  	/* add essid */
***************
*** 1045,1049 ****
  	iwe.u.data.flags = 1;
  	iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
! 	event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);

  	/* add protocol name */
--- 1046,1050 ----
  	iwe.u.data.flags = 1;
  	iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
! event = iwe_stream_add_point(info, event, end_buf, &iwe, bssid->ssid.essid);

  	/* add protocol name */
***************
*** 1051,1055 ****
  	iwe.cmd = SIOCGIWNAME;
  	strncpy(iwe.u.name, network_type_to_name(bssid->net_type), IFNAMSIZ);
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_CHAR_LEN);

  	/* add mode */
--- 1052,1056 ----
  	iwe.cmd = SIOCGIWNAME;
  	strncpy(iwe.u.name, network_type_to_name(bssid->net_type), IFNAMSIZ);
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_CHAR_LEN);

  	/* add mode */
***************
*** 1062,1066 ****
  	else // if (bssid->mode == Ndis802_11AutoUnknown)
  		iwe.u.mode = IW_MODE_AUTO;
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_UINT_LEN);

  	/* add freq */
--- 1063,1067 ----
  	else // if (bssid->mode == Ndis802_11AutoUnknown)
  		iwe.u.mode = IW_MODE_AUTO;
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_UINT_LEN);

  	/* add freq */
***************
*** 1077,1081 ****
  	iwe.u.freq.e += 3;
  	iwe.len = IW_EV_FREQ_LEN;
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_FREQ_LEN);

  	/* add qual */
--- 1078,1082 ----
  	iwe.u.freq.e += 3;
  	iwe.len = IW_EV_FREQ_LEN;
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_FREQ_LEN);

  	/* add qual */
***************
*** 1091,1095 ****
  	iwe.u.qual.qual  = i;
  	iwe.len = IW_EV_QUAL_LEN;
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_QUAL_LEN);

  	/* add key info */
--- 1092,1096 ----
  	iwe.u.qual.qual  = i;
  	iwe.len = IW_EV_QUAL_LEN;
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_QUAL_LEN);

  	/* add key info */
***************
*** 1102,1106 ****
  	iwe.u.data.length = 0;
  	iwe.len = IW_EV_POINT_LEN;
! 	event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);

  	/* add rate */
--- 1103,1107 ----
  	iwe.u.data.length = 0;
  	iwe.len = IW_EV_POINT_LEN;
! event = iwe_stream_add_point(info, event, end_buf, &iwe, bssid->ssid.essid);

  	/* add rate */
***************
*** 1116,1120 ****
  			iwe.u.bitrate.value = ((bssid->rates[i] & 0x7f) *
  					       500000);
! 			current_val = iwe_stream_add_value(event, current_val,
  							   end_buf, &iwe,
  							   IW_EV_PARAM_LEN);
--- 1117,1121 ----
  			iwe.u.bitrate.value = ((bssid->rates[i] & 0x7f) *
  					       500000);
! 			current_val = iwe_stream_add_value(info, event, current_val,
  							   end_buf, &iwe,
  							   IW_EV_PARAM_LEN);
***************
*** 1129,1133 ****
  	sprintf(buf, "bcn_int=%d", bssid->config.beacon_period);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(event, end_buf, &iwe, buf);

  	memset(&iwe, 0, sizeof(iwe));
--- 1130,1134 ----
  	sprintf(buf, "bcn_int=%d", bssid->config.beacon_period);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);

  	memset(&iwe, 0, sizeof(iwe));
***************
*** 1135,1139 ****
  	sprintf(buf, "atim=%u", bssid->config.atim_window);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(event, end_buf, &iwe, buf);

  	TRACE2("%d, %u", bssid->length, (unsigned int)sizeof(*bssid));
--- 1136,1140 ----
  	sprintf(buf, "atim=%u", bssid->config.atim_window);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);

  	TRACE2("%d, %u", bssid->length, (unsigned int)sizeof(*bssid));
***************
*** 1156,1160 ****
  				iwe.cmd = IWEVGENIE;
  				iwe.u.data.length = ielen;
! 				event = iwe_stream_add_point(event, end_buf,
  							     &iwe, iep);
  			}
--- 1157,1161 ----
  				iwe.cmd = IWEVGENIE;
  				iwe.u.data.length = ielen;
! 				event = iwe_stream_add_point(info, event, end_buf,
  							     &iwe, iep);
  			}
[myuser@mylap ~/software/ndiswrapper-1.53/driver]$


with this patch i compiled ndiswrapper including its module. and now wlan works on my laptop.

probably, a similar patch might also have helped to compile acx100 or ndiswrapper from f9.

in order to make ndiswrapper work across pm-hibernate i installed the following patch:

[root@mylap ~]# diff -C2 /tmp/50modules /usr/lib/pm-utils/sleep.d/50modules
*** /tmp/50modules	2008-08-03 10:34:23.000000000 +0200
--- /usr/lib/pm-utils/sleep.d/50modules	2008-08-03 09:20:39.000000000 +0200
***************
*** 3,6 ****
--- 3,7 ----

  . "${PM_FUNCTIONS}"
+ SUSPEND_MODULES="$SUSPEND_MODULES ndiswrapper"

  suspend_modules()
[root@mylap ~]#


and now ndiswrapper works even across pm-hibernates.

good luck

suomi
*** iw_ndis.c.orig	2008-08-02 10:30:34.000000000 +0200
--- iw_ndis.c	2008-08-02 10:44:28.000000000 +0200
***************
*** 1025,1028 ****
--- 1025,1029 ----
  	struct ndis_wlan_bssid *bssid;
  	struct ndis_wlan_bssid_ex *bssid_ex;
+ 	struct iw_request_info *info;
  
  	ENTER2("%p, %p", event, item);
***************
*** 1035,1039 ****
  	iwe.len = IW_EV_ADDR_LEN;
  	memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN);
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_ADDR_LEN);
  
  	/* add essid */
--- 1036,1040 ----
  	iwe.len = IW_EV_ADDR_LEN;
  	memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN);
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_ADDR_LEN);
  
  	/* add essid */
***************
*** 1045,1049 ****
  	iwe.u.data.flags = 1;
  	iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
! 	event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);
  
  	/* add protocol name */
--- 1046,1050 ----
  	iwe.u.data.flags = 1;
  	iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
! 	event = iwe_stream_add_point(info, event, end_buf, &iwe, bssid->ssid.essid);
  
  	/* add protocol name */
***************
*** 1051,1055 ****
  	iwe.cmd = SIOCGIWNAME;
  	strncpy(iwe.u.name, network_type_to_name(bssid->net_type), IFNAMSIZ);
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_CHAR_LEN);
  
  	/* add mode */
--- 1052,1056 ----
  	iwe.cmd = SIOCGIWNAME;
  	strncpy(iwe.u.name, network_type_to_name(bssid->net_type), IFNAMSIZ);
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_CHAR_LEN);
  
  	/* add mode */
***************
*** 1062,1066 ****
  	else // if (bssid->mode == Ndis802_11AutoUnknown)
  		iwe.u.mode = IW_MODE_AUTO;
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_UINT_LEN);
  
  	/* add freq */
--- 1063,1067 ----
  	else // if (bssid->mode == Ndis802_11AutoUnknown)
  		iwe.u.mode = IW_MODE_AUTO;
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_UINT_LEN);
  
  	/* add freq */
***************
*** 1077,1081 ****
  	iwe.u.freq.e += 3;
  	iwe.len = IW_EV_FREQ_LEN;
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_FREQ_LEN);
  
  	/* add qual */
--- 1078,1082 ----
  	iwe.u.freq.e += 3;
  	iwe.len = IW_EV_FREQ_LEN;
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_FREQ_LEN);
  
  	/* add qual */
***************
*** 1091,1095 ****
  	iwe.u.qual.qual  = i;
  	iwe.len = IW_EV_QUAL_LEN;
! 	event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_QUAL_LEN);
  
  	/* add key info */
--- 1092,1096 ----
  	iwe.u.qual.qual  = i;
  	iwe.len = IW_EV_QUAL_LEN;
! 	event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_QUAL_LEN);
  
  	/* add key info */
***************
*** 1102,1106 ****
  	iwe.u.data.length = 0;
  	iwe.len = IW_EV_POINT_LEN;
! 	event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);
  
  	/* add rate */
--- 1103,1107 ----
  	iwe.u.data.length = 0;
  	iwe.len = IW_EV_POINT_LEN;
! 	event = iwe_stream_add_point(info, event, end_buf, &iwe, bssid->ssid.essid);
  
  	/* add rate */
***************
*** 1116,1120 ****
  			iwe.u.bitrate.value = ((bssid->rates[i] & 0x7f) *
  					       500000);
! 			current_val = iwe_stream_add_value(event, current_val,
  							   end_buf, &iwe,
  							   IW_EV_PARAM_LEN);
--- 1117,1121 ----
  			iwe.u.bitrate.value = ((bssid->rates[i] & 0x7f) *
  					       500000);
! 			current_val = iwe_stream_add_value(info, event, current_val,
  							   end_buf, &iwe,
  							   IW_EV_PARAM_LEN);
***************
*** 1129,1133 ****
  	sprintf(buf, "bcn_int=%d", bssid->config.beacon_period);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(event, end_buf, &iwe, buf);
  
  	memset(&iwe, 0, sizeof(iwe));
--- 1130,1134 ----
  	sprintf(buf, "bcn_int=%d", bssid->config.beacon_period);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);
  
  	memset(&iwe, 0, sizeof(iwe));
***************
*** 1135,1139 ****
  	sprintf(buf, "atim=%u", bssid->config.atim_window);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(event, end_buf, &iwe, buf);
  
  	TRACE2("%d, %u", bssid->length, (unsigned int)sizeof(*bssid));
--- 1136,1140 ----
  	sprintf(buf, "atim=%u", bssid->config.atim_window);
  	iwe.u.data.length = strlen(buf);
! 	event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);
  
  	TRACE2("%d, %u", bssid->length, (unsigned int)sizeof(*bssid));
***************
*** 1156,1160 ****
  				iwe.cmd = IWEVGENIE;
  				iwe.u.data.length = ielen;
! 				event = iwe_stream_add_point(event, end_buf,
  							     &iwe, iep);
  			}
--- 1157,1161 ----
  				iwe.cmd = IWEVGENIE;
  				iwe.u.data.length = ielen;
! 				event = iwe_stream_add_point(info, event, end_buf,
  							     &iwe, iep);
  			}
-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux