Re: iwn driver on 7.1

2009-01-19 Thread Eriam Schaffter
2009/1/18 Brandon Gooch jamesbrandongo...@gmail.com

 I have a working driver for the Intel 4965, aka iwn(4), loaded on my
 Lenovo X300 running FreeBSD 7.1-RELEASE (amd64).


Wonderfull to say the least !

Seeing that you run successfully 7.1 on a X300 is excellent ! Did you manage
to get suspend/resume aka hibernation working somehow ?

Thanks

Eriam
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1 [no vaps in RELENG_7]

2009-01-19 Thread Sam Leffler

Jan Henrik Sylvester wrote:

Torfinn Ingolfsen wrote:

On Sun, 18 Jan 2009 14:17:39 -0600
Brandon Gooch jamesbrandongooch at gmail.com wrote:


I have a working driver for the Intel 4965, aka iwn(4), loaded on my
Lenovo X300 running FreeBSD 7.1-RELEASE (amd64).


FWIW, I am using the latest perforce version of the iwn driver as
documented here[1] on a ThinkPad T61 running FreeBSD 7.1-stable / i386 -
no modifications necessary. It works great.
I just use the p4fetch.rb script to get the driver.

HTH

References:
1) http://clearchain.com/wiki/iwn


Since from that address, you are using the latest version of the 
benjsc perforce branch, you are probably using the same as I, since I 
took the initial version from the sam_vap branch (before vap got 
introduced).


I do not know how far it is, but there is vap_releng7 in the sam 
perforce and projects/vap7 in svn on which Sam Leffler is actively 
working: 
http://lists.freebsd.org/pipermail/svn-src-projects/2009-January/thread.html 



I would like to have if_iwn working on a otherwise unmodified 
7.1-RELEASE-pX and help to test it, but maybe waiting on sam to bring 
vap to 7 would be a better way to go.


vaps will never be committed to RELENG_7 due to API/ABI constraints.  
However that svn branch is operational and being maintained as it's used 
by multiple people.  I considered bringing back iwn (it's just copying 
the bits); will add it to my TODO list.


OTOH iwn is now out of date and someone needs to update it.  There's 
newer firmware that is supposed to fix many of the bugs I hit when I 
worked on the driver (and Intel refused to acknowledge) and obsd has 
added support for newer parts that people want.  It'd be great if 
someone wanted to take over this driver.


   Sam

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1 [no vaps in RELENG_7]

2009-01-19 Thread Damian Gerow
Sam Leffler wrote:
: OTOH iwn is now out of date and someone needs to update it.  There's 
: newer firmware that is supposed to fix many of the bugs I hit when I 
: worked on the driver (and Intel refused to acknowledge) and obsd has 
: added support for newer parts that people want.  It'd be great if 
: someone wanted to take over this driver.

I've been working on this driver for the past few weeks (Christmas provided
a healthy distraction), but it's a steep learning curve for a novice C
coder.  If anyone wants to work on this, let me know, as I have a small
portion of the work already done.

  - Damian
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1 [no vaps in RELENG_7]

2009-01-19 Thread Brandon Gooch
On Mon, Jan 19, 2009 at 7:38 PM, Damian Gerow dge...@afflictions.org wrote:
 Sam Leffler wrote:
 : OTOH iwn is now out of date and someone needs to update it.  There's
 : newer firmware that is supposed to fix many of the bugs I hit when I
 : worked on the driver (and Intel refused to acknowledge) and obsd has
 : added support for newer parts that people want.  It'd be great if
 : someone wanted to take over this driver.

 I've been working on this driver for the past few weeks (Christmas provided
 a healthy distraction), but it's a steep learning curve for a novice C
 coder.  If anyone wants to work on this, let me know, as I have a small
 portion of the work already done.

  - Damian
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


I'd like to work on this as well. I just pulled down the iwn code from
OpenBSD current a little while ago and started hacking on it. I
haven't made a lot of progress, so I'll gladly work with you on it.

I'm a decent C programmer, but my lack of knowledge of kernel
internals, functions, and data structures is my stumbling block.
That's one of the main reasons I'm all about getting this driver
working -- it gives me yet another chance to get into the kernel
source and learn something new.

Where do we begin?
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1 [no vaps in RELENG_7]

2009-01-19 Thread Da Rock
On Mon, 2009-01-19 at 20:38 -0500, Damian Gerow wrote:
 Sam Leffler wrote:
 : OTOH iwn is now out of date and someone needs to update it.  There's 
 : newer firmware that is supposed to fix many of the bugs I hit when I 
 : worked on the driver (and Intel refused to acknowledge) and obsd has 
 : added support for newer parts that people want.  It'd be great if 
 : someone wanted to take over this driver.
 
 I've been working on this driver for the past few weeks (Christmas provided
 a healthy distraction), but it's a steep learning curve for a novice C
 coder.  If anyone wants to work on this, let me know, as I have a small
 portion of the work already done.
 
   - Damian

I'm willing to work on it (doing so now), but from what you have said
here it sounds like you're in the same boat as myself as I'm very new to
this too :)

What about collaboration between us with a Freebsd core team mentor? Is
this possible? Code, test, then send the new code through the core team
member for approval as well as hints to get the job done?

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1 [no vaps in RELENG_7]

2009-01-19 Thread Brandon Gooch
On Mon, Jan 19, 2009 at 8:48 PM, Da Rock rock_on_the_...@comcen.com.au wrote:
 On Mon, 2009-01-19 at 20:38 -0500, Damian Gerow wrote:
 Sam Leffler wrote:
 : OTOH iwn is now out of date and someone needs to update it.  There's
 : newer firmware that is supposed to fix many of the bugs I hit when I
 : worked on the driver (and Intel refused to acknowledge) and obsd has
 : added support for newer parts that people want.  It'd be great if
 : someone wanted to take over this driver.

 I've been working on this driver for the past few weeks (Christmas provided
 a healthy distraction), but it's a steep learning curve for a novice C
 coder.  If anyone wants to work on this, let me know, as I have a small
 portion of the work already done.

   - Damian

 I'm willing to work on it (doing so now), but from what you have said
 here it sounds like you're in the same boat as myself as I'm very new to
 this too :)

 What about collaboration between us with a Freebsd core team mentor? Is
 this possible? Code, test, then send the new code through the core team
 member for approval as well as hints to get the job done?

 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


I don't know how mentoring works in the FreeBSD world or if a
canonical process of mentoring even exists, but I would definitely be
willing to participate. I know it would be a heck of a lot better than
hacking around on this stuff by myself.

-Brandon
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1 [no vaps in RELENG_7]

2009-01-19 Thread Da Rock
On Mon, 2009-01-19 at 21:24 -0600, Brandon Gooch wrote:
 On Mon, Jan 19, 2009 at 8:48 PM, Da Rock rock_on_the_...@comcen.com.au 
 wrote:
  On Mon, 2009-01-19 at 20:38 -0500, Damian Gerow wrote:
  Sam Leffler wrote:
  : OTOH iwn is now out of date and someone needs to update it.  There's
  : newer firmware that is supposed to fix many of the bugs I hit when I
  : worked on the driver (and Intel refused to acknowledge) and obsd has
  : added support for newer parts that people want.  It'd be great if
  : someone wanted to take over this driver.
 
  I've been working on this driver for the past few weeks (Christmas provided
  a healthy distraction), but it's a steep learning curve for a novice C
  coder.  If anyone wants to work on this, let me know, as I have a small
  portion of the work already done.
 
- Damian
 
  I'm willing to work on it (doing so now), but from what you have said
  here it sounds like you're in the same boat as myself as I'm very new to
  this too :)
 
  What about collaboration between us with a Freebsd core team mentor? Is
  this possible? Code, test, then send the new code through the core team
  member for approval as well as hints to get the job done?
 
  ___
  freebsd-stable@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-stable
  To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
 
 
 I don't know how mentoring works in the FreeBSD world or if a
 canonical process of mentoring even exists, but I would definitely be
 willing to participate. I know it would be a heck of a lot better than
 hacking around on this stuff by myself.
 
 -Brandon

Ok then, as you said- where do we start? From what I can see in the
running of the card currently is its having trouble scanning- but they
maybe a ruse, I'm trying to find a way to definitively determine what is
going on here.

Also, once the card has started scanning it locks up and appears to
'reset' or something, so that when I run wpa_supplicant the next time
round it works again- but still won't scan. I'll just run through what I
did yesterday again and post the results, but I believe those results
from yesterday are already there on the -questions@ list if you wish to
jump the gun.

I'm currently looking along the lines of what people are running atm- it
just clicked with me that my card is 4965AGN, but most reference this
card as BGN, so I'm wondering if thats making a difference.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


iwn driver on 7.1

2009-01-18 Thread Brandon Gooch
I have a working driver for the Intel 4965, aka iwn(4), loaded on my
Lenovo X300 running FreeBSD 7.1-RELEASE (amd64).

This driver is a slightly-modified version of the iwn(4) driver
backported from 8.0-CURRENT by Gavin Atkinson:

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=221758+0+/usr/local/www/db/text/2008/freebsd-stable/20080928.freebsd-stable

I was seeing the same symptoms described in these threads (among others):

http://lists.freebsd.org/pipermail/freebsd-stable/2008-September/045264.html

http://www.freebsd.org/cgi/getmsg.cgi?fetch=1334322+1338147+/usr/local/www/db/text/2009/freebsd-questions/20090118.freebsd-questions

http://www.freebsd.org/cgi/getmsg.cgi?fetch=1418632+1421765+/usr/local/www/db/text/2009/freebsd-questions/20090118.freebsd-questions

...so I debugged and modified Gavin's driver for my system.

The driver and the source tree diff can be downloaded here for any
brave souls wanting to test it out:

http://sites.google.com/site/bsdgooch/files

I'm using the driver now to send this e-mail over a link to my TP-LINK
TL-WR941ND access point (with WPA2). Feedback and bug reports would be
useful.

-brandon
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1

2009-01-18 Thread Torfinn Ingolfsen
On Sun, 18 Jan 2009 14:17:39 -0600
Brandon Gooch jamesbrandongo...@gmail.com wrote:

 I have a working driver for the Intel 4965, aka iwn(4), loaded on my
 Lenovo X300 running FreeBSD 7.1-RELEASE (amd64).

FWIW, I am using the latest perforce version of the iwn driver as
documented here[1] on a ThinkPad T61 running FreeBSD 7.1-stable / i386 -
no modifications necessary. It works great.
I just use the p4fetch.rb script to get the driver.

HTH

References:
1) http://clearchain.com/wiki/iwn
-- 
Regards,
Torfinn Ingolfsen

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1

2009-01-18 Thread Jan Henrik Sylvester

Da Rock wrote:

On Sun, 2009-01-18 at 14:17 -0600, Brandon Gooch wrote:

I have a working driver for the Intel 4965, aka iwn(4), loaded on my
Lenovo X300 running FreeBSD 7.1-RELEASE (amd64).

This driver is a slightly-modified version of the iwn(4) driver
backported from 8.0-CURRENT by Gavin Atkinson:

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=221758+0+/usr/local/www/db/text/2008/freebsd-stable/20080928.freebsd-stable

I was seeing the same symptoms described in these threads (among others):

http://lists.freebsd.org/pipermail/freebsd-stable/2008-September/045264.html

http://www.freebsd.org/cgi/getmsg.cgi?fetch=1334322+1338147+/usr/local/www/db/text/2009/freebsd-questions/20090118.freebsd-questions

http://www.freebsd.org/cgi/getmsg.cgi?fetch=1418632+1421765+/usr/local/www/db/text/2009/freebsd-questions/20090118.freebsd-questions

...so I debugged and modified Gavin's driver for my system.

The driver and the source tree diff can be downloaded here for any
brave souls wanting to test it out:

http://sites.google.com/site/bsdgooch/files

I'm using the driver now to send this e-mail over a link to my TP-LINK
TL-WR941ND access point (with WPA2). Feedback and bug reports would be
useful.

-brandon


Sounds like you got to it before I did- thank god! :)

Question though: have you got it figured for a channels yet?

I'll test it for you and keep you updated with my results.


Thanks for working on the driver!

The only difference to the version of gavin that I could see is that the 
bands in iwn_bands that got commented out were brought back. Or did I 
miss something? Do you know why they were commented out and it was 
unnecessary? Or was it just to fix the crash?


I did a few test runs: It does not crash immediately as the version from 
gavin, but the error I had with the perforce version

  iwn0: error, INTR=8200SW_ERROR,RX_INTR STATUS=0x1
  iwn0: iwn_config: could not set power mode, error 35
is there -- in 3 out of 3 tries. So nothing improved there. (I hit that 
error on first use in about 50% of the cases before.)


Moreover, at 3 out of 4 tries to 'kldunload if_iwn' after hitting the 
error (after '/etc/rc.d/netif stop iwn0' and 'ifconfig iwn0 down'), 
there was a crash: 2 page faults and 1 freeze. I have not had that with 
the perforce version. (Maybe once long ago, but I think I forgot to stop 
iwn0 at that time.)


The one time I actually got the (WPA2) connection up, I was able to 
transfer with a similar speed as with the perforce version.


Thus, for me, there are no improvement over the (old) perforce version. 
Probably by chance, but I had more crashes.


I think the thread on stable@ should rather be continued than the one on 
questions@, but since Da Rock answered on questions@, I reinclude both.


Cheers,
Jan Henrik
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1

2009-01-18 Thread Jan Henrik Sylvester

Torfinn Ingolfsen wrote:

On Sun, 18 Jan 2009 14:17:39 -0600
Brandon Gooch jamesbrandongooch at gmail.com wrote:


I have a working driver for the Intel 4965, aka iwn(4), loaded on my
Lenovo X300 running FreeBSD 7.1-RELEASE (amd64).


FWIW, I am using the latest perforce version of the iwn driver as
documented here[1] on a ThinkPad T61 running FreeBSD 7.1-stable / i386 -
no modifications necessary. It works great.
I just use the p4fetch.rb script to get the driver.

HTH

References:
1) http://clearchain.com/wiki/iwn


Since from that address, you are using the latest version of the benjsc 
perforce branch, you are probably using the same as I, since I took the 
initial version from the sam_vap branch (before vap got introduced).


I do not know how far it is, but there is vap_releng7 in the sam 
perforce and projects/vap7 in svn on which Sam Leffler is actively 
working: 
http://lists.freebsd.org/pipermail/svn-src-projects/2009-January/thread.html


I would like to have if_iwn working on a otherwise unmodified 
7.1-RELEASE-pX and help to test it, but maybe waiting on sam to bring 
vap to 7 would be a better way to go.


Cheers,
Jan Henrik
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: iwn driver on 7.1

2009-01-18 Thread Brandon Gooch
The kernel panic was due to a NULL pointer dereference in the module.
The code that was commented out created a situation in which the array
of structs (line 2412):

static const struct iwn_chan_band iwn_bands[]

contained only 2 items. The code following the struct array that
obtained the list of authorized channels:

/* read the list of authorized channels */
for (i = 0; i  N(iwn_bands)-2; i++)
iwn_read_eeprom_band(sc, iwn_bands[i]);

didn't actually get a list of anything, since N(iwn_bands)-2 evaluates
to zero in this case.

The NULL pointer part comes in when the call to
ieee80211_sort_channels() on line 2436 sends a list of no items with a
value of 0 for ic-ic_nchans. The backported insertion sort code from
8.0-CURRENT's 802.11 stack fails somewhere because of this value, due
to access of some memory address in the chancompar() or swap(?) -- I
didn't really dig that far into it.

I guess the purpose of commenting out the A channels in the
iwn_bands[] was to keep the driver from potentially using them, but
honestly, I'm not sure if that's the appropriate way to do that (I'm
just getting into this stuff). I'm sure the MFC'd VAP stuff that Sam
Leffler is working on will alleviate all of this, but I wanted a
working iwn(4) for now ;)

On Sun, Jan 18, 2009 at 4:10 PM, Jan Henrik Sylvester m...@janh.de wrote:
 Da Rock wrote:

 On Sun, 2009-01-18 at 14:17 -0600, Brandon Gooch wrote:

 I have a working driver for the Intel 4965, aka iwn(4), loaded on my
 Lenovo X300 running FreeBSD 7.1-RELEASE (amd64).

 This driver is a slightly-modified version of the iwn(4) driver
 backported from 8.0-CURRENT by Gavin Atkinson:


 http://docs.freebsd.org/cgi/getmsg.cgi?fetch=221758+0+/usr/local/www/db/text/2008/freebsd-stable/20080928.freebsd-stable

 I was seeing the same symptoms described in these threads (among others):


 http://lists.freebsd.org/pipermail/freebsd-stable/2008-September/045264.html


 http://www.freebsd.org/cgi/getmsg.cgi?fetch=1334322+1338147+/usr/local/www/db/text/2009/freebsd-questions/20090118.freebsd-questions


 http://www.freebsd.org/cgi/getmsg.cgi?fetch=1418632+1421765+/usr/local/www/db/text/2009/freebsd-questions/20090118.freebsd-questions

 ...so I debugged and modified Gavin's driver for my system.

 The driver and the source tree diff can be downloaded here for any
 brave souls wanting to test it out:

 http://sites.google.com/site/bsdgooch/files

 I'm using the driver now to send this e-mail over a link to my TP-LINK
 TL-WR941ND access point (with WPA2). Feedback and bug reports would be
 useful.

 -brandon

 Sounds like you got to it before I did- thank god! :)

 Question though: have you got it figured for a channels yet?

 I'll test it for you and keep you updated with my results.

 Thanks for working on the driver!

 The only difference to the version of gavin that I could see is that the
 bands in iwn_bands that got commented out were brought back. Or did I miss
 something? Do you know why they were commented out and it was unnecessary?
 Or was it just to fix the crash?

 I did a few test runs: It does not crash immediately as the version from
 gavin, but the error I had with the perforce version
  iwn0: error, INTR=8200SW_ERROR,RX_INTR STATUS=0x1
  iwn0: iwn_config: could not set power mode, error 35
 is there -- in 3 out of 3 tries. So nothing improved there. (I hit that
 error on first use in about 50% of the cases before.)

 Moreover, at 3 out of 4 tries to 'kldunload if_iwn' after hitting the error
 (after '/etc/rc.d/netif stop iwn0' and 'ifconfig iwn0 down'), there was a
 crash: 2 page faults and 1 freeze. I have not had that with the perforce
 version. (Maybe once long ago, but I think I forgot to stop iwn0 at that
 time.)

 The one time I actually got the (WPA2) connection up, I was able to transfer
 with a similar speed as with the perforce version.

 Thus, for me, there are no improvement over the (old) perforce version.
 Probably by chance, but I had more crashes.

 I think the thread on stable@ should rather be continued than the one on
 questions@, but since Da Rock answered on questions@, I reinclude both.

 Cheers,
 Jan Henrik

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org