View Full Version : [Solved] ndis0 properly configured, but it cannot set the SSID and scan WiFi signals
aurora72
May 30th, 2009, 19:11
I've finished compiling and loading the NDIS driver to my US Robotics Wireless MAXg PCI Adapter USR5417 (Broadcom Chipset)
and it loads itself to under the name ndis0 perfectly.
I have configured everything that are outlined at the 31.3 Wireless Networking section of FreeBSD manual, i.e.
/boot/loader.conf:
BCMWL5_SYS_load="YES"
ndis0_load="YES"
if_ndis0_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
and, /etc/rc.conf:
ifconfig_ndis0="ssid MySSiD inet 192.168.1.198 netmask 255.255.255.0 bssid 00:11:92:da:da:da channel 11"
ifconfig command list all of the settings of the ndis0 properly except ssid and bssid and channel.
It shows ssid simply as "",
It shows no bssid and,
It shows channel as "1", instead of "11"
and consequently it doesn't respond to
ifconfig ndis0 up scan
while it should as there's an Access Point with ssid "MySSiD" with no encryption.
In another forum, I've seen this suggested (as a way to set ssid)
# ifconfig ndis0 down
# ifconfig ndis0 ssid "yourssid"
# ifconfig ndis0 up
This also has been of no use.
So, what sould I do? Could the configuration contain an error?
Thanks!
richardpl
May 30th, 2009, 20:46
You are using 6.4?
what is displayed on console once module is loaded? This is extremly important!
what gives
ifconfig ndis0 list scan ?
rocky
May 30th, 2009, 23:54
@aurora72 I experienced a similiar problem on a Compaq Presario CQ40-401au.
I suddenly found an stupid way to fix it: after changing my ssid by using `ifconfig` I press the wireless button (the light color of button did not change... and no message showed in `dmesg`), the things worked.
Try to press the button to get it to work...
aurora72
May 31st, 2009, 00:43
Yes, exactly. I'm using the 6.4 version.
While the module is being loaded (here I assume the information on ndis0 appearing at the startup)
Info taken from: cat /var/log/messages | more :
kernel: ndis0: <Dell TrueMobile 1300 WLAN Mini-PCI Card> mem 0xf3ffe000-0xf3ffffff irq 11 at device 16.0 on pci0
kernel: ndis0: NDIS API version: 5.1
kernel: ndis0: Ethernet address: 00:14:c1:0c:b9:4f
# ifconfig ndis0 list scan returns nothing.
# ifconfig ndis0 scan also returns nothing but waits a second or two, as if its trying to retrieve the WiFi signals (maybe)
I have two comments on these:
1- In statement <Dell TrueMobile 1300 WLAN Mini-PCI Card> PCI card is declared as a Mini-PCI card. Considering this statement has originated from the bcmwl5.inf file, could it have been mistaken by the ndisgen process while forming the BCMWL5_SYS.ko file?
2- At he 11.8 Setting up the NICs section of the manual, example dmesg output has two additional lines compared to my systems output:
ndis0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps
In my system, dmesg output lacks these two lines.
Could this mean anything about the driver files/modules lacking in my system?
Thanks
aurora72
May 31st, 2009, 00:52
... after changing my ssid by using `ifconfig` I press the wireless button (the light color of button did not change... and no message showed in `dmesg`), the things worked...
I wish I could solve it by doing that, however my system 's got no such button as it's no Laptop computer. I have just rearranged my signature, take a look at it.
richardpl
May 31st, 2009, 10:46
1- In statement <Dell TrueMobile 1300 WLAN Mini-PCI Card> PCI card is declared as a Mini-PCI card. Considering this statement has originated from the bcmwl5.inf file, could it have been mistaken by the ndisgen process while forming the BCMWL5_SYS.ko file?
Depends, what's output of pciconf -lv for such device before BCMWL5_SYS.ko module is loaded?
You could use sysctl debug.ndis=1 to get more information on console.
Could you please post output of ifconfig ndis0 and sysctl dev.ndis.0.
aurora72
May 31st, 2009, 13:57
I don't know how to get % pciconf -lv before BCMWL5_SYS.ko module is loaded, for the time being on the console I can only get:
# pciconf -lv
ndis0@pci0:16:0 class=0x028000 card=0x011a16ec chip=0x431814e4 rev=0x02 hdr=0x00
vendor = 'Broadcom Corporation'
device = 'BCM43XX Broadcom 802.11b/g'
class = network
Also # sysctl debug.ndis=1 gives unknown OID debug.ndis error.
ifconfig ndis0
ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether: 00:14:c1:0c:b9:4f
media: IEEE 802.11 Wireless Ethernet autoselect
status: no carrier
ssid "" channel 1
authmode OPEN privacy OFF txpowmax 100 bmiss 7 protmode CTS
And finally (written by hand)
sysctl dev.ndis.0
dev.ndis.0.%descr: Dell TrueMobile 1300WLAN Mini-PCI card
dev.ndis.0.%driver: ndis
dev.ndis.0.%location: slot=16 function=0
dev.ndis.0.%pnpinfo: vendor=0x14e4 device=0x4318 subvendor=0x011a class=0x028000
dev.ndis.0.%parent: pci0
dev.ndis.0.RoamDelte: 1
dev.ndis.0.LOM: 0
dev.ndis.0.IBSSAllowed: 1
dev.ndis.0.ssid_auto_promote: 0
dev.ndis.0.MPC: 1
dev.ndis.0.RadioState: 0
dev.ndis.0.PowerStateMode: 2
dev.ndis.0.PLCPHeader: 0
dev.ndis.0.frag: 2346
dev.ndis.0.rts: 2347
dev.ndis.0.NetworkAddress:
dev.ndis.0.antdiv: -1
dev.ndis.0.FrameBursting: 0
dev.ndis.0.AfterBurner: 0
dev.ndis.0.gpio0: -1
dev.ndis.0.gpio1: -1
dev.ndis.0.gpio2: -1
dev.ndis.0.gpio3: -1
dev.ndis.0.gpiotimeinterval: 0xa005A
dev.ndis.0.EnableLEAP: 1
dev.ndis.0.Interference_Mode: -1
dev.ndis.0.ccx_rm: 1
dev.ndis.0.ccx_rm_limit: 300
dev.ndis.0.country: JP
dev.ndis.0.channel: 11
dev.ndis.0.WME: 0
dev.ndis.0.WVCCoexist: 0
dev.ndis.0.Managed: 1
dev.ndis.0.BTCOExist: 1
dev.ndis.0.abcap: 1
dev.ndis.0.RoamTrigger: -70
dev.ndis.0.IBSSSGMode: 0
dev.ndis.0.IBSSGProtection: 2
dev.ndis.0.LegacyMode: 0
dev.ndis.0.Rate: 0
dev.ndis.0.AbcompatMode: 0
dev.ndis.0.10280001: Dell TrueMobile 1300 WLAN Mini-PCI Card
dev.ndis.0.Environment: 1
dev.ndis.0.NDisVersion: 0x00050001
dev.ndis.0.BusTyoe: 5
dev.ndis.0.InterruptNumber: 11
dev.ndis.0.ForcePIO: UNSET
dev.ndis.0.NoRadio: UNSET
dev.ndis.0.AdaptorDesc: UNSET
dev.ndis.0.DriverDesc: UNSET
dev.ndis.0.Brand: UNSET
dev.ndis.0.WPA: UNSET
dev.ndis.0.band: UNSET
dev.ndis.0.RateA: UNSET
dev.ndis.0.AssocRoamPref: UNSET
dev.ndis.0.IBSSLink: UNSET
dev.ndis.0.PwrOut: UNSET
dev.ndis.0.BandPref: UNSET
dev.ndis.0.BadFramePreempt: UNSET
dev.ndis.0.11HNetworks: UNSET
dev.ndis.0.scan_channel_time: UNSET
dev.ndis.0.scan_unassoc_time: UNSET
dev.ndis.0.scan_home_time: UNSET
dev.ndis.0.scan_passive_time: UNSET
dev.ndis.0.scan_passes: UNSET
dev.ndis.0.EnableAutoConnect: UNSET
richardpl
May 31st, 2009, 15:20
Try to change dev.ndis.0.RadioState to 1 and
bring ndis0 up/down and see it if improve anything.
aurora72
May 31st, 2009, 15:58
% sysctl dev.ndis.0.RadioState=1
ifconfig ndis0 down
ifconfig ndis0 up
ifconfig ndis0 scan
Again, after the ifconfig ndis0 up, it waited one or two seconds as if it's setting the ndis0 up. But still, ifconfig ndis0 scan yielded no results.
I'm also still worried about the absence of lines such as these in my dmesg
ndis0: 11b rates: ... 11Mbps
ndis0: 11g rates: ... 54Mbps
In lists.freebsd.org, in this (http://lists.freebsd.org/pipermail/freebsd-mobile/2004-June/004232.html) thread "802.11b works, 11g not, Dell TrueMobile 1300", those two lines are present. I guess my wifi card will not start scanning unless those lines appear at dmesg..
paradox
May 31st, 2009, 19:57
>aurora72
is your wifi turn ON on the notebook?
also
you can upgrate to freebsd 7.x
or freebsd current
and use the bwi for your wifi
if ndis dosn't work
aurora72
May 31st, 2009, 20:21
>aurora72
is your wifi turn ON on the notebook?
I wish I had such a problem, so that it could be easily solved by turning the WiFi switch on. However, my system is a classical desktop with Pentium II and a PCI WiFi card, that is, no wifi button is present.
you can upgrate to freebsd 7.x
or freebsd current
and use the bwi for your wifi
if ndis dosn't work
Is there so much difference between 6.x & 7.x so as to cause this problem?
WiFi technology was already established enough by the time version 6.x was released, wasn't it?
And lastly, how do you use bwi? are you sure you've spelled it correctly, btw?
Thanks
paradox
June 1st, 2009, 00:12
i mean
bwi - broadcom wireless driver for freebsd
http://forums.freebsd.org/showthread.php?t=2477&page=2
aurora72
June 1st, 2009, 01:01
i mean
bwi - broadcom wireless driver for freebsd
http://forums.freebsd.org/showthread.php?t=2477&page=2
That's fine, i.e. a Unix-native driver for BCM43XX Broadcom chipset is all very fine and I might as well get it and integrate into my system in the future. Actually, I might start integrating it right now, just to start using the wifi card ASAP.
But at this point I have to say that I still would like to make the NDISulated driver work. It's because I'm in it also for learning purposes, i.e. I would like to see how it will operate the "NDIS way" and what kind of configurations should be done, and so on.
So I'm still working on the NDISulated driver, trying to make it work and waiting for your further suggestions all the while.
Thanks,
richardpl
June 1st, 2009, 10:56
Upgrading to 7.2 RELEASE is your best bet.
There may be conflict betwen NDISulator and net80211.
7.2 have usefull debug tools too.
aurora72
June 4th, 2009, 13:11
I have just upgraded to 7.2-RELEASE and things have improved a bit. ndis0 now allows ssid string to be recorded in ifconfig. But the status is still "no carrier" Here's the output of ifconfig ndis0 (shortened and the changes printed on green)
....
media: IEEE 802.11 Wireless Ethernet autoselect
status: no carrier
ssid LOVE channel 1 (2412 Mhz 11g)
authmode OPEN privacy OFF bmiss 7 scanvalid 60 bintval 0 txpowmax 100 bmiss 7 protmode CTS
ifconfig ndis0 scan doesn't return anything, it just hangs and only ctrl-c can stop it.
Furthermore, I've tried
# sysctl dev.ndis.0.RadioState=1
ifconfig ndis0 down
ifconfig ndis0 up
ifconfig ndis0 scan
and the result is the same; it just hangs in scan mode.
So, what should I do now, am I still missing something?
Thanks.
richardpl
June 4th, 2009, 15:36
try debug.ndis sysctl again.
First we need to know that scanning works at all.
aurora72
June 4th, 2009, 18:36
# sysctl debug.ndis=1
returns
ndis_scan_results: 0 results
ndis_scan_results: 0 results
ndis_scan_results: 0 results
ndis_scan_results: 0 results
.....
until I have to press ctrl-c and even then it keeps on printing.
I had to ctrl-alt-del to stop it. Why doesn't ctrl-c stop it, have no idea.
ok anyway,does the output "ndis_scan_results: 0 results" mean that
scanning works?
Thanks.
richardpl
June 4th, 2009, 21:41
# sysctl debug.ndis=1
returns
ndis_scan_results: 0 results
ndis_scan_results: 0 results
ndis_scan_results: 0 results
ndis_scan_results: 0 results
.....
until I have to press ctrl-c and even then it keeps on printing.
I had to ctrl-alt-del to stop it. Why doesn't ctrl-c stop it, have no idea.
That's kernel printfs, you disable it permanently typing sysctl debug.ndis=0
or bringing ndis0 down.
ok anyway,does the output "ndis_scan_results: 0 results" mean that scanning works?
Yes, either there is nothing out there of RF is turned off.
Probably device comes with CD for Windows and utility that controls device.
The last idea I have is to start ndisgen(8) again but this time, before
pressing last enter; eg. before compiling kernel module; in another terminal and in same directory where ndisgen is
started(the same one where SYS and INF files are located) open and edit windrv.h
Locate RadioState string and replace value "0" with "1" for every reoccurrence of RadioState in windrv.h
Here is example how it may look like:
{ "RadioState",
"Radio On/Off [1=Disable] [0=Enable]",
{ "0" }, 1 },
What's output of ifconfig -m ndis0
aurora72
June 10th, 2009, 00:43
hello,
It took me a while to get back to this thread, as I have, among other things, reinstalled the 7.2-RELEASE 3 (!) times.
Now, at ndisgen before the last step (ie compiling the kernel module) I have edited the windrv.h. and in it there were about 20 entries containing the term RadioState
which looked like
{ "RadioState",
"Radio On/Off [1=Disable] [0=Enable]",
{ "0" }, 2 },
In all of those entries, I've replaced the value "0" with "1" so that the resulting codes were like
{ "RadioState",
"Radio On/Off [1=Disable] [0=Enable]",
{ "1" }, 2 },
But, unfortunately ndis0 still didn't work, i.e. it hung up at the ifconfig ndis0 scan option.
The output of ifconfig -m ndis0 is now: (manually written, might contain typos)
media IEEE 802.11 Wireless Ethernet autoselect
status no carrier
supported media
media fDM/54Mbps mode autoselect mediaoptadhoc
media fDM/54Mbps mode autoselect
media fDM/48Mbps mode autoselect mediaoptadhoc
media fDM/48Mbps mode autoselect
....
media fDM/6Mbps mode autoselect mediaoptadhoc
media fDM/6Mbps mode autoselect
....
media DS/11Mbps mode autoselect mediaoptadhoc
media DS/11Mbps mode autoselect
.....
media DS/1Mbps mode autoselect mediaoptadhoc
media DS/1Mbps mode autoselect
....
media 0FDM/54Mbps mode autoselect mediaoptadhoc
media 0FDM/54Mbps mode autoselect
....
media autoselect mode 11g mediaopt adhoc
media autoselect mode 11g
.....
ssid MySSID channel 1 (2412 MHz 11g)
authmode OPEN privacy OFF bmiss 7 scanvalid 60 protmodeCTS bintval 0
So I think of what else I can do about it. In particular, I wonder if I misinterpreted the parts of the windrv.h file where 0 is changed into 1...
Thanks.
richardpl
June 11th, 2009, 23:11
Argh, I finally got it, look this PR:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/118370
It is not MFC-ed to 7.2 RELEASE, only available on 8.0 CURRENT.
But you could patch it on your own and reinstall if_ndis.ko module.
aurora72
June 13th, 2009, 00:55
Thank you fofr the latest info.
I've found the patch-1.diff file and successfully made the patch upon /usr/src/sys/dev/if_ndis/if_ndis.c. But, after that I guess I have to recompile the kernel, right? If I have to recompile the kernel, how do I make it only compile the part relating to if_ndis? That is,
which name should I put for "MODULES_OVERRIDE =" before doing
# make buildkernel & # make installkernel?
Thanks.
richardpl
June 13th, 2009, 10:04
If you are using GENERIC kernel:
cd /sys/modules/if_ndis && make && make install && make clean
aurora72
June 16th, 2009, 01:09
Hello,
Having applied the patch to the if_ndis, at first I have failed again to make ndis0 scan the wifi networks. But I kept on trying because the same card on the same computer using windows 2000 was working and finally I have managed to make it scan.
I came across this old article (http://dannyman.toldme.com/2005/01/05/freebsd-howto-ndisulate-windows-drivers/)
and noticed something minor but significant:
# ls *.inf *.sys
bcmwl5.inf bcmwl5.sys bcmwl5a.inf bcmwlntp.sys
# cp bcmwl5.* /sys/modules/if_ndis
# ls /sys/modules/if_ndis
Makefile bcmwl5.inf bcmwl5.sys
# cd /sys/modules/if_ndis
Here the ndisgen operation takes place in the /sys/modules/if_ndis. I have been on the other hand, running ndisgen in an arbitrary directory which contained only the *.inf & *.sys.
Only after I run the ndisgen in /sys/modules/if_ndis directory and using the newly formed bcmwl5_sys.ko file, have I seen ndis0 actually working and scanning. So it's alright now.
But now I have another problem: Though I 've set up all of necessary TCP/IP settings such as "inet 192.168.1.198 netmask 255.255.255.0" and "route add default 192.168.1.1" ndis0 just cannot ping the IP of its associated AP, which is 192.168.1.1
If I ping the same AP using the rl0 ethernet device (and using of course an ethernet cable) it pings perfectly. In case of ndis0 the ping simply returns "no route to host"
What may I be missing here?
Thanks!
richardpl
June 16th, 2009, 09:56
Hello,
Having applied the patch to the if_ndis, at first I have failed again to make ndis0 scan the wifi networks. But I kept on trying because the same card on the same computer using windows 2000 was working and finally I have managed to make it scan.
I came across this old article (http://dannyman.toldme.com/2005/01/05/freebsd-howto-ndisulate-windows-drivers/)
and noticed something minor but significant:
# ls *.inf *.sys
bcmwl5.inf bcmwl5.sys bcmwl5a.inf bcmwlntp.sys
# cp bcmwl5.* /sys/modules/if_ndis
# ls /sys/modules/if_ndis
Makefile bcmwl5.inf bcmwl5.sys
# cd /sys/modules/if_ndis
Do not use obsolete information. There is no need to copy files to /sys/modules.
You need to patch /sys/dev/if_ndis/if_ndis.c, patch is in link I already gave to you. You also need FreeBSD source installed.
Then after you compiled if_ndis.ko module:
cd /sys/modules/if_ndis && make && make install && make clean
you must install it to /boot/kernel with make install,
after that reboot because you probably have old if_ndis.ko already loaded.
You will also need to recompile bcmwl5_sys.ko too.
But now I have another problem: Though I 've set up all of necessary TCP/IP settings such as "inet 192.168.1.198 netmask 255.255.255.0" and "route add default 192.168.1.1" ndis0 just cannot ping the IP of its associated AP, which is 192.168.1.1
If I ping the same AP using the rl0 ethernet device (and using of course an ethernet cable) it pings perfectly. In case of ndis0 the ping simply returns "no route to host"
You need to edit /etc/resolv.conf
Please give ifconfig output again, it should be something like this:
ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 0e:e0:ec:df:8d:1f
inet 192.168.2.13 netmask 0xffffff00 broadcast 192.168.2.255
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
status: associated
ssid FreeBSD channel 6 (2412 Mhz 11g) bssid 0a:bb:90:0a:ff:ec
country US authmode OPEN privacy ON deftxkey 1 wepkey 1:104-bit
txpower 30 bmiss 7 mcastrate 6 mgmtrate 6 scanvalid 60 protmode CTS
status must be associated
aurora72
June 17th, 2009, 16:21
....
you must install it to /boot/kernel with make install,
...
Looks like I was initially missing the installation to /boot/kernel
with make install and that was why it didn't scan at first. Now it works.
By the way, after reinstalling the if_ndis module on a GENERIC kernel, is the kernel still counted as GENERIC?
#ifconfig ndis0 is almost the same as yours:
ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:1e:83:20:57:83
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
status: associated
ssid FreeBSD channel 6 (2412 Mhz 11g) bssid 0a:bb:90:0a:ff:ec
country US authmode OPEN privacy WPA deftxkey 1 wepkey 1:104-bit
txpower 30 bmiss 7 mcastrate 6 mgmtrate 6 scanvalid 60 protmode CTS
except the line which starts with "inet". That line was missing in mine. But after a search on this forum, I guess I found out why it was missing: One had to write the ifconfig_ndis0 according to some convention in rc.conf I guess
ifconfig_ndis0="WPA"
ifconfig_ndis0_alias0="inet 192.168.1.100 netmask 255.255.255.0"
After rearranging the rc.conf as the above the inet line has showed up at the #ifconfig ndis0" and then it finally started to ping arbitrary hosts in the LAN and WAN, using either IP or hostname. I have even downloaded Firefox from the Internet using ndis0 at full speed.
I'm thankful for helping me make all this stuff possible. But though everything is now ok, there's just one more thing small but causing a little discomfort: The activity led on the Wifi PCI card just doesn't blink (or light) during wireless data transfer. I know it used to blink while using it in windows 2000. What can be done to make its led work again?
Thanks!
richardpl
June 17th, 2009, 18:02
kernel is kernel and module is module; if_ndis.ko is LKM module.
And GENERIC kernel doesn't have device if_ndis so you must kldload if_ndis.ko
Dunno about leds but you can compare syscyl dev.ndis.0|grep led with one from Windows registry.
Also note that bwi driver from 8.0 CURRENT may and may not be better option; if you need some advanced features which are not possible via ndis
Seeker
September 14th, 2009, 03:28
I have exactly a same issue and I can't scan using ndis.
This (http://www.mavetju.org/mail/view_message.php?list=freebsd-rc&id=2695243) is also an issue.
I use 7.2
Please give me a link to most recent patch for ndis and directions
Thanks in advance.
aurora72
September 14th, 2009, 14:44
...
Please give me a link to most recent patch for ndis and directions
..
As far as I remember, I have solved the NDIS problem by applying the patch as described by richardpl. But, all the while I had to go through a trial-and-error phase until I got ndis0 working. It's working perfectly now.
Seeker
September 14th, 2009, 22:49
# cd /usr/src
# patch < /root/patch-1.diff
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: if_ndis.c
|================================================= ==================
|RCS file: /data/ndis/if_ndis/if_ndis.c,v
|retrieving revision 1.1.1.1
|diff -u -r1.1.1.1 if_ndis.c
|--- if_ndis.c 1 Dec 2007 06:23:58 -0000 1.1.1.1
|+++ if_ndis.c 1 Dec 2007 07:34:01 -0000
--------------------------
File to patch: /sys/dev/if_ndis/if_ndis.c
Patching file /sys/dev/if_ndis/if_ndis.c using Plan A...
Hunk #1 failed at 2629.
Hunk #2 failed at 3073.
Hunk #3 failed at 3580.
3 out of 3 hunks failed--saving rejects to /sys/dev/if_ndis/if_ndis.c.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|
|
|Patch attached with submission follows:
|
|Index: if_ndis.c
|================================================= ==================
|RCS file: /data/ndis/if_ndis/if_ndis.c,v
|retrieving revision 1.1.1.1
|diff -u -r1.1.1.1 if_ndis.c
|--- if_ndis.c 1 Dec 2007 06:23:58 -0000 1.1.1.1
|+++ if_ndis.c 1 Dec 2007 07:34:01 -0000
--------------------------
File to patch: /sys/dev/if_ndis/if_ndis.c
Patching file /sys/dev/if_ndis/if_ndis.c using Plan A...
Hunk #1 failed at 2629.
Hunk #2 failed at 3073.
Hunk #3 failed at 3580.
3 out of 3 hunks failed--saving rejects to /sys/dev/if_ndis/if_ndis.c.rej
Hmm... Ignoring the trailing garbage.
done
#
How come?
How do I patch it?
PS: I am using custom kernel and ndis is already in kernel, so I never need to load ndis as a module.
aurora72
September 15th, 2009, 08:29
How come?
How do I patch it?
PS: I am using custom kernel and ndis is already in kernel, so I never need to load ndis as a module.
2 good tutorial, which have helped me correctly apply the patches:
http://stephenjungels.com/jungels.net/articles/diff-patch-ten-minutes.html
http://www.linuxforums.org/articles/using-diff-and-patch_80.html
Hint: Try patching a sample file (e.g. the one given in the tutorial), until you're ready to patch real files (e.g. if_ndis)
Good luck.
Seeker
September 15th, 2009, 12:54
Thanks!
I'll go and learn it! ;)
richardpl
September 15th, 2009, 14:49
What revision of if_ndis.c is on your comp?
Seeker
September 15th, 2009, 20:49
What revision of if_ndis.c is on your comp?
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.124.2.4.2.1 2009/04/15 03:14:26 kensmith Exp $
");
Is this revision?
# md5 /sys/dev/if_ndis/if_ndis.c
MD5 (/sys/dev/if_ndis/if_ndis.c) = 79a7a035888cf5a61f3f3de00a4d0d5d
Patch do not work for me!
I've applied it correctly.
In attachment is uploaded .rej file
richardpl
September 15th, 2009, 22:44
It worked for me(using sources from CVS). Remove first part of patch, second part is actually useful. But anyway second(above) part did not worked for you. So something is wrong on your side.
You could patch it manually - it is not big problem, just find correct line number ...
Last solution is to send you complete file but that is not really always good idea.
Make sure that your sources are from stable, eg. do not use release for security reasons ....
Seeker
September 15th, 2009, 23:04
I use 7.2 RELEASE with latest patches applied
Is MD5 any indication to you?
Same as yours?
richardpl
September 16th, 2009, 07:48
# cd /usr/src
Use:
cd /sys/dev/if_ndis/
Seeker
September 16th, 2009, 13:42
Use:
cd /sys/dev/if_ndis/
That has been corrected already.
md5 and patching has been done against if_ndis.c in: cd /sys/dev/if_ndis/
Anyway, I've done it manually and after reboot now it can scan.
Now I'll create my own patch, for 7.2 RELEASE and post it here.
Seeker
September 16th, 2009, 15:40
This is a patch for ndis at FreeBSD 7.2 RELENG
To apply it:
cd /sys/dev/if_ndis/
patch < /path/to/ndis_7_2_release.patch.diff
Original if_ndis.c will be copied to if_ndis.c.orig
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.