Commit graph

35159 commits

Author SHA1 Message Date
David Woodhouse 506e9025e0 libertas: add ethtool support for wake-on-lan configuration
Also, check that suspend is refused if HOST_SLEEP_CFG hasn't been done.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:05 -08:00
David Woodhouse d1f7a5b8cf libertas: implement suspend/resume for USB devices
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:04 -08:00
David Woodhouse ab25ecaea5 libertas: implement suspend and resume core methods
We (ab)use priv->fw_ready to stop the worker thread from sending more
commands or data after the response to the HOST_SLEEP_ACTIVATE command
comes in. And we set it from the callback function _directly_ to ensure
that the worker thread sees it immediately; if we did it in
lbs_suspend() after waking up, that might be too late.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:03 -08:00
David Woodhouse f3db2bb411 libertas: make worker thread not freezable
We want it to send the HOST_SLEEP_ACTIVATE command on the way down...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:03 -08:00
David Woodhouse 689442dca1 libertas: switch lbs_cmd() to take a _pointer_ to the command structure
This way, it looks more like a normal function.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:02 -08:00
David Woodhouse 6ce4fd2a3a libertas: add lbs_host_sleep_cfg() command function
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:01 -08:00
David Woodhouse a27b9f96f2 libertas: slight cleanup of netif queue stop/wake
In particular, we shouldn't be waking the queues in lbs_host_to_card_done()
any more.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:00 -08:00
David Woodhouse 23d36eec26 libertas: add missing newlines in debugging statements
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:00 -08:00
David Woodhouse e1258177e4 libertas: be more careful about command responses matching cur_cmd
Especially in the light of OLPC trac #5461, in which the firmware starts
sending us seemingly random command responses which bear little relation
to the command we sent it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:59 -08:00
David Woodhouse 06113c1c70 libertas: add debugging output to lbs_mesh_config()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:58 -08:00
David Woodhouse 8642f1f062 libertas: disable mesh temporarily while setting eth channel/assoc
Otherwise the device won't let us change channels.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:58 -08:00
David Woodhouse 88ae2915cc libertas: add missing newline on debug message
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:57 -08:00
David Woodhouse 823eaa2cc2 libertas: allow setting channel on mshX device
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:56 -08:00
David Woodhouse f5956bf1e4 libertas: allow get/set SSID on mshX device
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:56 -08:00
David Woodhouse 387a1f046f libertas: whitespace cleanup in host.h
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:55 -08:00
David Woodhouse 202f3f3ac9 libertas: kill rx_urb_recall and eth_dev members of struct usb_card_rec
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:54 -08:00
David Woodhouse 1f8a08342c libertas: kill references to mesh autostart
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:53 -08:00
David Woodhouse 23a397ac82 libertas: add lbs_mesh sysfs attribute for enabling mesh
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:53 -08:00
David Woodhouse e7240acae3 libertas: fix sparse endianness warnings in scan.c
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:52 -08:00
David Woodhouse 2fd6cfe307 libertas: make some more functions static
sparse was getting on my tits.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:51 -08:00
Dan Williams cb182a6028 libertas: endianness fixes for get_channel/set_channel
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:50 -08:00
Dan Williams 2dd4b26264 libertas: convert RF_CHANNEL to a direct command
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:50 -08:00
Dan Williams 8e3c91bb70 libertas: convert DATA_RATE to a direct command
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:49 -08:00
Dan Williams 79a9a37c1e libertas: fix case of FWT_ACCESS_LIST_ROUTE and FWT_ACCESS_LIST_NEIGHBOR commands
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:48 -08:00
David Woodhouse 0f1c8232e8 libertas: remove casts from lbs_cmd() and lbs_cmd_with_response() macros
If stupid people like me give it arguments with the wrong type (like a
pointer to the structure, for example, instead of the structure itself),
then we should probably notice that at compile time. Otherwise, much
confusion ensues.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:47 -08:00
David Woodhouse 301eacbf30 libertas: convert CMD_MESH_ACCESS to a direct command
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:46 -08:00
David Woodhouse ad9d7a7f3c libertas: fix debug output in lbs_cmd_copyback() function.
Bad dcbw. Always test on big-endian, or at least use sparse.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:46 -08:00
Dan Williams ddac452680 libertas: rename and re-type bufvirtualaddr to cmdbuf
Make it a struct cmd_header, since that's what it is, and clean up
the places that it's used.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:45 -08:00
David Woodhouse c9cd6f9d63 libertas: wait for 'firmware ready' event from firmware after loading
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:44 -08:00
David Woodhouse 10bca0d5f4 libertas: move removal of lbs_rtap file to lbs_stop_card()
This prevents us from trying to remove it when it didn't exist, in the
error case.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:44 -08:00
David Woodhouse 6bc822b516 libertas: switch USB cardp->priv to 'struct lbs_private *' and resulting fix
Amazing what interesting things the compiler will tell you if you let it
know what types you expect to be passing around.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:43 -08:00
Dan Williams 6e66f03ff7 libertas: convert GET_HW_SPEC to a direct command
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:42 -08:00
Dan Williams a8bdcd71fd libertas: add simple copyback command callback
A simple callback which copies the response back into the
command buffer that was used to send the command to the
card.  Will allow for direct command processing outside
the mega-switches in cmd.c and cmdresp.c.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:41 -08:00
Dan Williams 7ad994dec7 libertas: clean up direct command handling
Move direct command handling through __lbs_cmd() over to using the
header as the first member of the command structure, and only define
the __lbs_cmd() callback in one place rather than 3.  Convert boot2
version command to new usage.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:41 -08:00
David Woodhouse b15152a403 libertas: don't run thread while firmware not yet ready
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:40 -08:00
David Woodhouse 4f82f5c853 libertas: switch to a waitqueue and timer for handling USB firmware load
No need to busy-wait, even if we did have a 100ms delay in the loop.
This makes it easier to support the new 'firmware ready' event which is
in the new firmware, too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:39 -08:00
David Woodhouse c8ba39d060 libertas: improve reliability of firmware reloading on USB
Increase the delay between issuing the RESET command and the usb reset,
and be prepared to discard more than one 'normal' packet from it before
it resets.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:39 -08:00
David Woodhouse 8552855f98 libertas: make rtap and normal modes mutually exclusive, clean up open/stop
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:38 -08:00
Dan Williams 852e1f2a26 libertas: clean up is_command_allowed_in_ps()
Total overkill to have an array when there's only one command in it.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:37 -08:00
David Woodhouse b31d8b90dc libertas: remove pre_open_check()
The firmware is always initialised before we register the netdevices.
It's not possible for pre_open_check() to fail.

One day we might try loading firmware in ->open(), but still it won't be
just a _check_, like this.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:36 -08:00
Dan Williams 14e865ba5d libertas: make lbs_cmd() usage nicer
Define a macro that relieves the caller from having to use sizeof on
the command structure when calling lbs_cmd(), and move the prototype
of __lbs_cmd() to a new cmd.h file.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:36 -08:00
David Woodhouse 4f67949656 libertas: clean up lbs_interrupt()
Make it take struct lbs_private as argument; that's all it wants anyway,
and all callers were starting off from that. Don't wake the netif
queues, because those should be handled elsewhere. And sort out the
locking, with a big nasty warning for those who don't have the
driver_lock locked when they call it.

Oh, and fix if_cs.c to lock the driver_lock before calling it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:35 -08:00
David Woodhouse 1309b55b4d libertas: add opaque extra argument to cmd callback function
This will be useful for letting callbacks do stuff like copying the
response into a buffer provided by the caller of lbs_cmd()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:34 -08:00
Holger Schurig b6b8abe4dd libertas: fix use-after-free error
Previously, the display of subscribed events could be wrong.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:34 -08:00
David Woodhouse c3f949618d libertas: kill (IS,SET,UNSET)_MESH_FRAME.
No need for these any more. We've collapsed all the unneeded nests of
functions which needed to keep track of which device the skb belonged to.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:33 -08:00
David Woodhouse 6f93a8e7e4 libertas: kill lbs_upload_tx_packet()
It replaces two lines of code. And even for those it has to make
inferences about things (i.e. which device) which the caller would have
just known.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:32 -08:00
David Woodhouse 7bf02c2985 libertas: fix error cases in lbs_process_rxed_802_11_packet()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:32 -08:00
David Woodhouse 180be755ae libertas: remove unreachable code from process_rxed_802_11_packet()
The function is only ever called if we're in rtap mode. So the bit in it
which is conditional on rtap mode seems a little superfluous.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:31 -08:00
David Woodhouse 2eb188a1c5 libertas: Move actual transmission to main thread
The locking issues with TX, especially TX from multiple netdevs, get
_so_ much easier if you do it like this.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:30 -08:00
David Woodhouse b8d40bc9c9 libertas: refactor the 'should I sleep?' decision in lbs_thread()
This was making my brain hurt.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:30 -08:00
David Woodhouse 45c24903b7 libertas: free successfully transmitted skbs again
I was so busy cleaning up the failure modes that I accidentally forgot
to make sure we still free them in the success case. Oops.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:29 -08:00
David Woodhouse a97bcfed96 libertas: TX packet is radiotap iff it comes from rtap_dev
Fix one of the barriers to simultaneous radiotap and normal operation --
stop misinterpreting the TX packets on the normal devices. We're also
going to have to clone the incoming skbs and feed them into both
devices, and there seem to be firmware problems with staying associated
too. But this is a reasonable start...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:28 -08:00
David Woodhouse 121947c62a libertas: set dev_addr on rtap device
This lets us bring it up, because eth_validate_addr() succeeds instead
of returning -EINVAL. And finally monitor mode seems to (mostly) work.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:27 -08:00
David Woodhouse d9268fb9a1 libertas: stop using ieee80211 for radiotap device
There seems to be no point in doing it as an ieee80211 device instead of
a normal netdev, and when we override its ->priv and then call
free_ieee80211() it has a distressing tendency to crash horribly.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:27 -08:00
David Woodhouse 198cefb932 libertas: kill lbs_pre_start_xmit(), lib_mesh_pre_start_xmit()
These wrappers only do two things.

Firstly, they set the frame type, which isn't necessary since
lbs_hard_start_xmit() gets to see which device it belongs to anyway.

Secondly, they return -EOPNOTSUPP if the device is in monitor mode.
Which is a strange thing to do and will provide nasty warnings from
qdisc_restart(). And lbs_hard_start_xmit() seems to have code to cope
with monitor mode anyway.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:26 -08:00
David Woodhouse a2b62dc1f1 libertas: clean up lbs_hard_start_xmit()
Having merged the nest of functions into one, now we can clean it up and
fix the error handling, and the duplication -- and at least make a start
on the locking.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:25 -08:00
David Woodhouse 8af23b2f96 libertas: kill lbs_process_tx() by merging it into lbs_hard_start_xmit()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:25 -08:00
David Woodhouse a9bdce6564 libertas: move lbs_hard_start_xmit() into tx.c
... where it can shortly be merged with lbs_process_tx()...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:24 -08:00
David Woodhouse 6b4a7e0fbd libertas: kill SendSinglePacket() function.
Make a start on reducing the number of pointless nested functions,
starting with the StudlyCaps. No semantic changes (yet) -- we can sort
out the now-obvious discrepancy in the failure paths in a separate
commit.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:23 -08:00
David Woodhouse 2abdc0b775 libertas: kill internal tx queue for PS mode
It was buggy as hell anyway, since it was just spewing packets at the
device when it wasn't necessarily ready for them (in the USB case, while
the URB was still busy).

We could probably do with a better way of flushing packets to the device
_immediately_, before we stick it back into sleep mode. But we can no
longer just dequeue packets directly, it seems.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:22 -08:00
David Woodhouse 020bb19e2f libertas: stop debugfs code looking at cmdpendingq
It doesn't need to wait until no commands are pending anyway -- it only
needs to wait until the scan is finished.

We can hopefully find it something else to wait on too -- it's the only
user of the cmd_pending waitqueue.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:22 -08:00
David Woodhouse 6d35fdfced libertas: cope with device which already has firmware loaded
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:21 -08:00
David Woodhouse a63b22bb5b libertas: use lbs_host_to_card_done() in lbs_tx_timeout()
Also attempt some locking in lbs_host_to_card_done()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:20 -08:00
David Woodhouse aa21c004f8 libertas: kill struct lbs_adapter
There seems to be no reason for a separate structure; move it all
into struct lbs_private.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:19 -08:00
David Woodhouse f86a93e1b2 libertas: kill TxLockFlag
We don't need this. We can use adapter->currenttxskb instead.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:18 -08:00
David Woodhouse e7deced05f libertas: fix lbs_rtap attribute in sysfs
At least it doesn't oops when you attempt to read or write it now.
Only when you enable it and then later turn it off. And when it's
enabled I don't see how it actually works.

But one fewer oops is good, for now...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:18 -08:00
David Woodhouse 59f3e4bf1e libertas: clean up lbs_thread() to make it slightly more readable
No semantic changes.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:17 -08:00
David Woodhouse 448a51ae06 libertas: switch lbs_cmd() to take a callback function pointer
All existing code which sends commands is set up to have some function
called with the results, not to get data back. It's more versatile this
way, and providing it with a callback function which involves memcpy()
is hardly difficult.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:16 -08:00
David Woodhouse ac47246e24 libertas: kill adapter->nr_cmd_pending
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:15 -08:00
David Woodhouse 99c893f34a libertas: Fix up error handling in lbs_setuserscan()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:14 -08:00
David Woodhouse c12bdc45d9 libertas: Don't set IW_ENCODE_NOKEY when returning WEP keys.
Also clean up the double setting/clearing of IW_ENCODE_DISABLED.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:14 -08:00
Holger Schurig c2df2efe96 libertas: endianness fixes
Recently I found that that sparse by default doesn't endianness
checks. So I changed my compilation habit to be

make modules C=1 SUBDIRS=drivers/net/wireless/libertas
CHECKFLAGS="-D__CHECK_ENDIAN__"

so that I get the little-endian checks from sparse as well. That
showed up a good bunch of problems.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:13 -08:00
David Woodhouse 1723047d67 libertas: Switch to using a callback function pointer for commands
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:12 -08:00
David Woodhouse 0856e6816b libertas: when usb_submit_usb fails, include the error code in the printk
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:11 -08:00
Holger Schurig ffd074fc78 libertas: implement new scanning logic
This changes the code that is used for scanning and makes it hopefully
easier to understand:

* move function into logical blocks
* create a bunch of lbs_scan_add_XXXX_tlv() functions, that
  help to create the TLV parameter of CMD_802_11_SCAN
* all of them are now called from the much simpler lbs_do_scan()
* no **puserscancfg double-pointers :-)

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:11 -08:00
David Woodhouse 83eacf233e libertas: Fix endianness in boot2_version handling.
We read it from the card. We byte-swap it. We write it back to the card.
D'oh.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:10 -08:00
David Woodhouse f9f6890e41 libertas: Remove SET_BOOT2_VER support from the Big Switch Statement.
And the death of libertas_prepare_and_send_command() starts...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:09 -08:00
David Woodhouse 04c80f1ab1 libertas: Use lbs_cmd() for setting Boot2 version
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:09 -08:00
Holger Schurig 09d4fad6e8 libertas: fix data packet size errors
I wondered about junk bytes at the end when using "lbsdebug +hex +host"
until I noticed that firmware for the CF card sends my extranous bytes.
It says "I have 20 bytes", I take 20 bytes, but the last 8 bytes of this
are just data junk.

Also, in the new lbs_cmd() where was a size miscalulation
that made itself clear after fixing this bug.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:08 -08:00
Li Zefan abe3ed14d3 libertas: don't cast a pointer to pointer of
Don't cast struct foo * to struct list_head *, it's safe only when
the list member is the first member of struct foo.

Also don't cast struct list_head * to struct foo *.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:07 -08:00
David Woodhouse 6228c0aea5 libertas: Byteswap cmdptr->size in lbs_cmd()
Bad Holger. Always test on big-endian machines, if it's little-endian
you need to be swapping to/from.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:06 -08:00
David Woodhouse ad9de29130 libertas: Zero 'pdata_size' field in cmd_ctrl_node reliably.
Otherwise, lbs_process_rx_command() will take the new path for
lbs_cmd() responses, when it shouldn't.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:06 -08:00
David Woodhouse 2c94404c30 libertas: Move SET_BOOT2_VER command to if_usb where it belongs
This is meaningless for non-USB devices and unimplemented in their
firmware. It's somewhat dubious for USB devices too, but that's a
different story.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:05 -08:00
David Woodhouse 9088566176 libertas: Don't claim to have checksummed incoming packets.
This explains why we never noticed the corruption of checksums on
outgoing packets... we weren't actually checking them either.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:04 -08:00
Holger Schurig 675787e29f libertas: handy function to call firmware commands
Using an arbitrary firmware command was actually very painful. One
had to change big switch() statements in cmd.c, cmdresp.c, add
structs to the big union in "struct cmd_ds_command" and add the
define for the CMD_802_11_xxx to the proper place.

With this function, this is now much easier. For now, it implements
a blocking (a.k.a. CMD_OPTION_WAITFORRSP) way where one deals directly
with command requests and response buffers. You can do everything in
one place:

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:04 -08:00
Holger Schurig 0d61d04210 libertas: make more functions static
These functions were used in the old debugfs code for events, but
as this code is now gone, there's no need to export those functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:03 -08:00
Holger Schurig c68b3bbdb5 libertas: remove cmd_ctrl_node->status
There was no code that ever did set this variable.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:02 -08:00
Holger Schurig 891f32a1c4 libertas: remove cmd_ctrl_node->cmdflags
There was no code that ever did set this flag.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:01 -08:00
David Woodhouse e775ed7c67 libertas: Consolidate lbs_host_to_card_done() function.
As we move towards having this done by a state machine, start by having
a single 'stuff sent' function, which is called by if_usb/if_sdio/if_cs
after sending both data and commands.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:01 -08:00
David Woodhouse f5ece8fc8d libertas: Remove cmd_oid from struct cmd_ctrl_node
This is only needed for SNMP and key operations; it doesn't need to be
preserved outside that context.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:00 -08:00
David Woodhouse 77d8cf2c09 libertas: Fix memory leak of RX skbs
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:59 -08:00
Michael Buesch 38d1b4ce90 b43: Fix for broken transmission
This patch fixes the transmission problems introduced by
commit f04b3787bbce4567e28069a9ec97dcd804626ac7

I'm not sure if the dummy read is really required.
The old code does it. I think it can't hurt and can possibly
fix some write posting problems (hardware bugs or whatever. Who knows).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:59 -08:00
Michael Buesch 8ed7fc48eb b43: Fix ofdmtab write regression
commit f04b3787bbce4567e28069a9ec97dcd804626ac7 introduced
a regression for the ofdmtable writing.

It incorrectly removed the writing of the high 16bits for
a 32bit table write and initialized the direction identifier
too late.

This patch does also some cleanups to make the code much more
readable and adds a few comments, so non rocket scientists are
also able to understand what this address caching is all about.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:58 -08:00
Tomas Winkler bb54244be7 iwlwifi: add missing comments
This patch add comments that escaped from the previous merge

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:57 -08:00
Tomas Winkler 4fd1f84146 iwlwifi: fix compliation warnings
This patch fixes compilation warnings introduced by 'fix ucode assertion
for RX queue overrun' patch

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:56 -08:00
Reinette Chatre 0946687803 iwlwifi: remove HT code from iwl-3945.h
This pach removes HT code from iwl-3945.h - it is not needed here as 3945
does not support HT. The code ended up here during the header file split

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:56 -08:00
Dan Williams 2236761b8c orinoco: always use latest BSS info when caching scan results
Always copy the latest BSS information from the firmware's results to
the driver's BSS table to ensure that everything is up-to-date (IEs,
supported rates, encryption status, etc).

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:55 -08:00
Adrian Bunk ef3122463d ipg: add __devexit annotation
ipg_remove() can become __devexit.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-01-28 15:05:54 -08:00
John W. Linville 2b1ea591f6 rt2x00: correct "skb_buff" typo
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:05:54 -08:00
Pekka Enberg 8da5bb7a27 ipg: fix checkpatch reported errors
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28 15:05:53 -08:00
Pekka Enberg 9893ba16c8 ipg: naming convention fixes
This changes some camel-case names to follow proper kernel naming convention.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:05:52 -08:00
Pekka Enberg dea4a87cab ipg: remove some internal comments
This removes some now useless comments that were added when the driver was
developed out-of-tree.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28 15:05:51 -08:00
Pekka Enberg 6d3b2cb92b ipg: remove commented out code
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28 15:05:51 -08:00
Pekka Enberg 1662e4b7af ipg: remove driver version
The driver is in mainline now so there's no need to maintain a separate version
number.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28 15:05:50 -08:00
Pekka Enberg 85d68a5883 ipg: remove IPG_DEV_KFREE_SKB macro
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28 15:05:49 -08:00
Pekka Enberg 4602e665ff ipg: remove boolean macros
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28 15:05:49 -08:00
Pekka Enberg 9305a77521 ipg: remove old contact information
Remove old comment as up-to-date contact information is in MAINTAINERS.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28 15:05:48 -08:00
Grant Likely 35a84fdc89 gianfar driver: eliminate compiler warnings and unnecessary macros
This patch eliminates the warning of unused return values when the driver
registers it sysfs files.  Now the driver will print an error if it is
unable to register the sysfs files.

It also eliminates the macros used to wrap the DEVICE_ATTR macro and the
device_create_file function call.  The macros don't reduce the number of
lines of source code in the file and the name munging makes is so that
cscope and friends don't see the references to the functions.  It's better
to just call the kernel API directly.

While we're at it, the DEVICE_ATTR instances have been moved down to
be grouped with the functions they depend on.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:05:47 -08:00
Andrea Merello 43fd6c7ebd rtl8187: fix tx power reading
CCK and OFDM power levels are stored in adjacent bytes, not nibbles.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Andrea Merello <andreamrl@tiscali.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:46 -08:00
Ron Rindjunsky 9ee1ba474f iwlwifi: 802.11n add support to 8K A-MSDU Rx frames
This patch give the iwlwifi the ability to support A-MSDU up to 8K

Please notice - in order to work in 8K A-MSDU ucode support is needed,
version 4.44.1.19 (soon to be published). 4K A-MSDU works in current ucode
version as well.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:46 -08:00
Ron Rindjunsky 270243a505 iwlwifi: 802.11n comply HT rate scaling flows with mac80211 framework
This patch conforms the rate scaling flows according to the new mac80211's
HT framework

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:45 -08:00
Ron Rindjunsky 67d620357a iwlwifi: 802.11n comply HT add station flow with mac80211 framework
This patch conforms the addition of a new station to the iwlwifi station
table according to the new mac80211's HT framework

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:44 -08:00
Ron Rindjunsky fd105e79d1 iwlwifi: 802.11n comply HT self configuration flow with mac80211 framework
This patch conforms HW configuration changes according to new mac80211's
HT framework

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:43 -08:00
Ron Rindjunsky 8fb8803239 iwlwifi: 802.11n handling probe request HT IE
This patch conforms the probe request's HT IE with the
new structures used in iwlwifi HT.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:42 -08:00
Ron Rindjunsky 326eeee807 iwlwifi: 802.11n configuring hw_mode parameters to support HT in A/G
This patch fills the mac80211's ieee80211_hw_mode structures with the
needed 802.11n data needed for the new framework

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:42 -08:00
Ron Rindjunsky 9e0cc6de99 iwlwifi: 802.11n new framework structures preperation
This patch removes unnecessary or duplicate 802.11n data from structures
in the code, and prepares them for new mac80211's 802.11n framework

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:41 -08:00
Ron Rindjunsky 923effd8d2 iwlwifi: 802.11n remove unnecessary config dependency
This patch removes MAC80211_HT config dependency as it has been
eliminated in mac80211, and adds a needed QoS dependency

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:40 -08:00
Zhu Yi 76bb77e03f iwlwifi: cache mac80211 conf setting during a hardware scan
This patch caches mac80211 configuration setting during a hardware
scan for the iwlwifi drivers.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:39 -08:00
Miguel Botón a84fd3452d iwlwifi: remove redundant declaration of 'iwl3945_priv' and 'iwl4965_priv' structs
This patch removes a redundant declaration of 'iwl3945_priv' and 'iwl4965_priv' structs.

Signed-off-by: Miguel Boton <mboton@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:39 -08:00
Zhu Yi d128394894 iwlwifi: update version number to 1.2.22
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:38 -08:00
Mohamed Abbas fde3571fd8 iwlwifi: avoid firmware command sending if rfkill is enabled
This patch fixed a ucode timeout issue and worked code with suspend
to disk.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:37 -08:00
Mohamed Abbas 5c0eef960b iwlwifi: fix ucode assertion for RX queue overrun
This patch allows the driver to restock the RX queue early if the RX
queue is almost empty. This will help on avoiding any ucode assert
for the RX overrun problem.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:36 -08:00
Mohamed Abbas 7878a5a4fc iwlwifi: enhance WPA authenication stability
This patch enhanced WPA authenication stability by avoiding scan
immediately followed by association. We don't do any scanning right
after association in next several seconds. This will allow WPA
authentication to take place without any interruption.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:36 -08:00
Ben Cahill 2bdc7031f9 iwlwifi: document 4965 rate scaling
Document 4965 rate scaling

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:35 -08:00
Ben Cahill 529699815b iwlwifi: add comments to Tx commands
Add comments to Tx commands

Clean up unused definitions in iwl-3945-commands.h

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:34 -08:00
Ben Cahill 2054a00bb8 iwlwifi: add comments to QOS and ADD_STA commands
Add comments to QOS and ADD_STA commands

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:33 -08:00
Ben Cahill 80cc0c382d iwlwifi: add comments to RXON command and txpower formats
Add comments to RXON command and txpower formats

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:33 -08:00
Ben Cahill 075416cd18 iwlwifi: document command header and "alive" responses
Document command header and "alive" responses

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:32 -08:00
Ben Cahill e385144766 iwlwifi: document 4965 Tx scheduler
Document 4965 Tx scheduler

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:31 -08:00
Ben Cahill 5d5456fe50 iwlwifi: document shared Tx structures
Document shared Tx structures

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:30 -08:00
Ben Cahill 483fd7e5ff iwlwifi: document Tx registers
Document Tx registers

Clean up unused definitions

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:30 -08:00
Ben Cahill 4d3cf5f7c2 iwlwifi: document Rx registers
Document Rx registers

Document Tx circular buffer base registers

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:29 -08:00
Ben Cahill aad141433b iwlwifi: document keep-warm buffer
Document keep-warm buffer

Consolidate flow handler address definitions

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:28 -08:00
Ben Cahill 0c434c5a7f iwlwifi: document txpower calculations
Document txpower calculations

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:28 -08:00
Ben Cahill 5991b419f0 iwlwifi: document temperature calculation
Document temperature calculation

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:27 -08:00
Ben Cahill fcd427bbba iwlwifi: move HT_IE_EXT_CHANNEL_* driver definitions to iwl-4965.h
Move HT_IE_EXT_CHANNEL_* driver definitions to iwl-4965.h

Add comments to guide .h file usage (hw/api/driver definitions)

Minor comment cleanup

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:26 -08:00
Ben Cahill 14519a0b46 iwlwifi: move uCode API definitions to iwl-4965-commands.h
Move uCode API definitions to iwl-4965-commands.h

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:26 -08:00
Ben Cahill 2248d8d8bc iwlwifi: clean up unused definitions in iwl-4965-hw.h
Clean up unused definitions in iwl-4965-hw.h

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:25 -08:00
Ben Cahill 9948b54456 iwlwifi: Clean up unused definitions in iwl-3945-hw.h
Clean up unused definitions in iwl-3945-hw.h

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:24 -08:00
Cahill, Ben M 6440adb576 iwlwifi: add comments to iwl*-base.c
Add comments to iwlXXXX-base.c

Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:23 -08:00
Cahill, Ben M 8b6eaea8ec iwlwifi: add comments, mostly on Tx queues
Add comments, mostly on Tx queues

Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:22 -08:00
Ben Cahill 74093ddf4c iwlwifi: clean up some unused definitions in iwl-4965.h and iwl-3945.h
Clean up some unused definitions in iwl-4965.h and iwl-3945.h

Move STA_FLG_ definitions to iwl-4965-commands.h

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:22 -08:00
Ben Cahill 1fea8e8838 iwlwifi: Partially clean-up, add comments to iwl-*-hw.h
Partially clean-up, add comments to iwl-XXXX-hw.h

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:21 -08:00
Ben Cahill f7d09d7c45 iwlwifi: Document Rx calibration
Document Rx calibration

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:20 -08:00
Ben Cahill abceddb407 iwlwifi: Document 4965 rate_n_flags bits
Document 4965 rate_n_flags bits

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:19 -08:00
Ben Cahill bc47279f55 iwlwifi: Add comments to some driver data structures
Add comments to some driver data structures

Remove unused "sched_retry" member from struct iwl3945_tx_queue

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:19 -08:00
Ben Cahill 81cd110d81 iwlwifi: Move is_legacy() macro family from iwl-4965-hw.h to iwl-4965-rs.h
Move is_legacy() macro family from iwl-4965-hw.h to iwl-4965-rs.h

These macros are for driver's rate scaling implementation, and are not
related to hardware or uCode API values (moved from iwl-4965-hw.h).

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:18 -08:00
Ben Cahill 9fbab5163a iwlwifi: clean up and clarify some comments after 3945/4965 split
Clean up and clarify some comments after 3945/4965 split.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:17 -08:00
Ben Cahill 40ac81a35c iwl-4965-hw.h: clean up unused eeprom structures and definitions
Clean up unused eeprom structures and definitions in iwl-4965-hw.h.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:16 -08:00
Ben Cahill 796083cb1d iwlwifi: add comments to EEPROM stuff
Add comments to EEPROM stuff.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:15 -08:00
Ben Cahill 7762635547 iwl4965: add comments to rate scaling code
Add comments to rate scaling code.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:15 -08:00
Ben Cahill f58177b9c3 iwl3945: re-align 3945 event log data
Re-align 3945 event log data.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:14 -08:00
Reinette Chatre 0054b34d29 iwlwifi: continue namespace changes - fix CONFIG variables
- Remove HT code from iwl-3945.h - it is not needed here as 3945
  does not support HT. The code ended up here during the header file
  split.
- Modify a few places where the CONFIG variables were named
  incorrectly: all changes are to comments only.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:13 -08:00
Tomas Winkler 90e759d14c iwlwifi: Support for uCode without init and bsm section
This patch enables loading fw w/o init and bsm section. It also provides
general cleanup of the rutine.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:12 -08:00
Ivo van Doorn 5a6012e105 rt2x00: Release rt2x00 2.0.13
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:11 -08:00
Ivo van Doorn b3a78b4e2a rt2x00: Cleanup rfkill
The label exit_free_polldev is no longer used and can be removed.
input_free_polled_device() also calls input_free_device(), so
don't call it seperatly.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:11 -08:00
Larry Finger 6f8a4da17e rt2x00: Remove redundant code in rfkill setup
In rt2x00rfkill.c, routine input_allocate_device() is called even though
input_allocate_polled_device(), which was just called, includes a call to
that routine. This patch, which has not been tested, removes the redundant code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:10 -08:00
Mattias Nissler 61af43c56b rt2x00: Only update rssi average approximation on receiving beacon frames.
Restrict rssi average updating to beacon frames of the bssid the
interface is
associated with. Without this restriction, strong signals belonging to other
BSS, e.g. beacon frames coming from a nearby AP, would cause incorrectly high
rssi approximation values. This would then cause the link tuner to reduce
sensitivity, resulting in transmissions from the BSS associated to to be
missed.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:09 -08:00
Ivo van Doorn d28c2561fb rt2x00: Use IEEE80211_IF_TYPE_INVALID directly
No need to use a seperate define INVALID_INTERFACE while
we can use IEEE80211_IF_TYPE_INVALID directly.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:09 -08:00
Ivo van Doorn 4d8dd66c16 rt2x00: Add TX/RX frame dumping facility
This adds TX/RX frame dumping capabilities through debugfs.
The intention is that with this approach debugging of rt2x00 is
simplified since _all_ frames going in and out of the device
are send to debugfs as well along with additional information
like the hardware descriptor.

Based on the patch by Mattias Nissler.
Mattias also has some tools that will make the dumped frames
available to wireshark: http://www-user.rhrk.uni-kl.de/~nissler/rt2x00/

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:08 -08:00
Ivo van Doorn 08992f7fb1 rt2x00: Add skb descriptor
Use the skb->cb field to add a frame description that can be used
to transfer information passed each rt2x00 layer. This reduces the
required arguments for rt2x00lib_write_tx_desc().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:05:07 -08:00
Ivo van Doorn 22c96c28b4 rt2x00: Add chipset version to chipset debugfs entry
The chipset debugfs entry already indicates it is about the chipset,
it only makes sense to also display the chipset version in there.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:06 -08:00
Ivo van Doorn 91921a4e9b rt2x00: Move register value/offset files into new folder
Cleanup debugfs interface by moving the csr/bbp/rf/eeprom value/offset
entries into the "register" folder.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:06 -08:00
Ivo van Doorn 49da2605e2 rt2x00: Extend PLCP descriptor definition for rt2400pci
Extend word field definitions for the PLCP words
in the TX descriptor to contain the BBP fields as well.
This will remove rt2400pci_write_tx_desc() from the
checkstack script.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:05 -08:00
Ivo van Doorn 2360157c41 rt2x00: Replace DRV_NAME with KBUILD_MODNAME
DRV_NAME was always set to the KBUILD_MODNAME value,
lets clean everything up by removing DRV_NAME and just
use KBUILD_MODNAME directly.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:04 -08:00
Stefano Brivio a293ee990d b43legacy: reinit on too many PHY TX errors
Restart the hardware on too many PHY TX errors. A thousand PHY TX errors
per 15 seconds means we won't be able to recover for sure.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:04 -08:00
Johannes Berg 5be3bda898 b43legacy: include full 64-bit timestamp in monitor mode
When monitor mode is enabled, this will make b43legacy read out
the full 64-bit MAC time from the chip for each received packet.

This patch has been ported from b43.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:03 -08:00
Frank Lichtenheld 125c5cc2c8 b43legacy: properly fix a bogus gcc warning
Use initialized_var() to properly fix a bogus gcc warning.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:02 -08:00
Larry Finger 013978b688 b43: Changes to enable BCM4311 rev 02 with wireless core revision 13
The BCM94311MCG rev 02 chip has an 802.11 core with revision 13 and
has not been supported until now. The changes include the following:

(1) Add the 802.11 rev 13 device to the ssb_device_id table to load b43.
(2) Add PHY revision 9 to the supported list.
(3) Change the 2-bit routing code for address extensions to 0b10 rather
    than the 0b01 used for the 32-bit case.
(4) Remove some magic numbers in the DMA setup.

The DMA implementation for this chip supports full 64-bit addressing with
one exception. Whenever the Descriptor Ring Buffer is in high memory, a
fatal DMA error occurs. This problem was not present in 2.6.24-rc2 due
to code to "Bias the placement of kernel pages at lower PFNs". When
commit 44048d70 reverted that code, the DMA error appeared. As a "fix",
use the GFP_DMA flag when allocating the buffer for 64-bit DMA. At present,
this problem is thought to arise from a hardware error.

This patch has been tested on my system and by Cédric Caumont
<icare40@hotmail.com>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:01 -08:00
Stefano Brivio 00e0b8cb74 b43: reinit on too many PHY TX errors
Restart the hardware on too many PHY TX errors. A thousand PHY TX errors
per 15 seconds means we won't be able to recover for sure.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:01 -08:00
Johannes Berg d8be11ee95 b43: include FCS in frames handed to mac80211
Sometimes it can be useful to see the FCS, especially when
bad-FCS frames are shown. Pass the FCS to mac80211 and let
it worry about snipping it off when required.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:05:00 -08:00
Johannes Berg d42ce84a05 b43: include full 64-bit timestamp in monitor mode
When monitor mode is enabled, this will make b43 read out the
full 64-bit MAC time from the chip for each received packet.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:59 -08:00
Holger Schurig 0b3c07ff64 libertas: less eventcause shifts
* only shift eventcause once

* convert mac events to decimal, as this is what the firmware
  manual uses in section 6.1, too

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:58 -08:00
Holger Schurig a7d0adae40 libertas: remove user-specified channel list
Remove the ability to specify channels to scan via debugfs

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:58 -08:00
Holger Schurig dd1d12dabf libertas: remove numprobes
Remove the ability to specify number of probes via debugfs

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:57 -08:00
Holger Schurig 01affb6530 libertas: tweak tx path debugging
Make two functions in the TX packet path emit
their debug messages with LBS_DEB_TX, not LBS_DEB_MAIN.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:56 -08:00
Holger Schurig 91843463bc libertas: tweak association debug output
Change debug output codes from LBS_DEB_JOIN to LBS_DEB_ASSOC

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:55 -08:00
Holger Schurig 3a18864917 libertas: rework event subscription
This patch moves re-works the implementation of event subscription
via debugfs. For this:

* it tells cmd.c and cmdresp.c about CMD_802_11_SUBSCRIBE_EVENT
* removes lots of low-level cmd stuff from debugfs.c
* create unified functions to read/write snr, rssi, bcnmiss and
  failcount
* introduces #define's for subscription event bitmask values
* add a function to search for a specific element in an IE
  (a.k.a. TLV)
* add a function to find out the size of the TLV. This is needed
  because lbs_prepare_and_send_command() has an argument for a
  data buffer, but not for it's lengths and TLVs can be, by
  definition, vary in size.
* fix a bug where it was not possible to disable an event

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:55 -08:00
Holger Schurig 69f9032d9d libertas: remove arbitrary typedefs
New typedefs are usually frowned upon. This patch changes
libertas_adapter -> struct libertas_adapter
libertas_priv -> struct libertas_priv

While passing, make everything checkpatch.pl-clean that gets touches.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:54 -08:00
Brajesh Dave 96287ac4f7 libertas: configurable beacon interval
Requires firmware version 5.110.19.p0 or newer, available here:
http://dev.laptop.org/pub/firmware/libertas/

Signed-off-by: Ashish Shukla <ashishs@marvell.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:53 -08:00
Brajesh Dave 01d77d8d47 libertas: separate mesh connectivity from that of the main interface
The transmit and receive traffic as soon as the mesh interface is
brought up.

Test case 1:  Bring up only the mesh interface and ping.  No need for
any iwconfig commands on the main interface.

$ ifconfig msh0 192.168.5.3
$ iwconfig msh0 channel X
$ ping 192.168.5.2
If ping succeeds, PASS

Test case 2:  Associate with the main interface, and turn off AP.  Mesh
interface should not lose connectivity.

$ iwconfig eth0 mode managed essid "my_ssid"
$ ifconfig msh0 192.168.5.3
$ ping 192.168.5.2
<turn off access point>
If ping continues uninterrupted, PASS

This feature requires firmware version 5.110.19.p0 or newer, available
here: http://dev.laptop.org/pub/firmware/libertas/

Signed-off-by: Ashish Shukla <ashishs@marvell.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:52 -08:00
Andres Salomon 798fbfec9c libertas: nuke useless variable usbdriver_name and useless comments
I think it was pretty obvious what fields in if_usb_driver are...

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:51 -08:00
Andres Salomon be13f1897f libertas: reset devices upon disconnect rather than module unloading
1) Do not reset libertas devices upon module unload.  We're unloading
the module, we're not killing off devices.
2) Instead, reset libertas devices inside if_usb_disconnect, as we're
killing off interfaces and so on.
3) Resetting via disconnect callback means we no longer need to keep
track of probed libertas devices; kill off that list (and its wonderful
lack of locking..), as well.

Drop a useless comment as well.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:51 -08:00
Andres Salomon 4fb910fd3a libertas: mark module_init/exit functions as __init/__exit
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:50 -08:00
Andres Salomon 82209adcb1 libertas: drop useless default_fw_name variable
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:49 -08:00
Daniel Drake 66bb42fd47 zd1211rw: add copyright notices
Requested by Michael Wu.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:49 -08:00
Daniel Drake 269fca0edd zd1211rw: Add ID for Trendnet TEW-429UB A
Tested by chloubs on IRC
zd1211 chip 157e:300a v4810 high 00-11-e0 AL7230B_RF pa0 g----

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:48 -08:00
Daniel Drake 459c51ad6e zd1211rw: port to mac80211
This seems to be working smoothly now. Let's not hold back the mac80211
transition any further. This patch ports the existing driver from softmac
to mac80211.

Many thanks to everyone who helped out with the porting efforts.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:47 -08:00
Holger Schurig 0765af4493 libertas: clean up association debug messages
This makes the debug output of all association stuff clearer by:

* adding some lbs_deb_enter()/lbs_deb_leave() calls
* printing the return level in one place
* lower-casing some string

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:46 -08:00
Holger Schurig 1007832103 libertas: move to uniform lbs_/LBS_ namespace
This patch unifies the namespace of variables, functions defines
and structures. It does:

- rename libertas_XXX to lbs_XXX
- rename LIBERTAS_XXX to lbs_XXX
- rename wlan_XXX to lbs_XXX
- rename WLAN_XXX to LBS_XXX (but only those that were
  defined in libertas-local *.h files, e.g. not defines
  from net/ieee80211.h)

While passing, I fixed some checkpatch.pl errors too.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:46 -08:00
John W. Linville 9a62f73b1a iwlwifi: remove redundant initialization of final_mode
Problem identified by Miguel Botón <mboton.lkml@gmail.com>, alternate
solution suggested by Zhu Yi <yi.zhu@intel.com>, patch by me. :-)

Cc: Miguel Botón <mboton.lkml@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:45 -08:00
Larry Finger d3c319f9c8 ssb: Remove the old, now unused, data structures
The old, now unused, data structures and SPROM extraction routines
are removed.

Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:44 -08:00
Larry Finger 7797aa3848 b43legacy: Convert to use of the new SPROM structure
The b43legacy driver is modified to use the new SPROM structure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:43 -08:00
Larry Finger 95de2841aa b43: Convert to use of the new SPROM structure
The b43 driver is modified to use the new SPROM structure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:42 -08:00
Larry Finger 458414b2e3 b44: Convert to use of the new SPROM structure
The b44 driver is changed to use the new SPROM data structure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:42 -08:00
Larry Finger c272ef4403 ssb: Convert to use of the new SPROM structure
In disagreement with the SPROM specs, revision 3 devices appear to have
moved the MAC address.

Change ssb to handle the revision 4 SPROM, which is a different size.
This change in size is handled by adding a new variable to the ssb_sprom
struct and using it whenever possible. For those routines that do not
have access to this structure, a 'u16 size' argument is added.

The new PCI_ID for the BCM4328 is also added.

Testing of the Revision 4 SPROM, which is used on the BCM4328, was done
by Michael Gerdau <mgerdau@tiscali.de>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:41 -08:00
Larry Finger ac82fab44f ssb: Add new SPROM structure while keeping the old
The SPROM's for various devices utilizing the Sonics Silicon Backplane come
with various revisions. The Revision 2 SPROM inherited the data layout of 1, and
Revision 3 inherited the layout of 2. The first instance of Revision 4 has
now been found in a BCM4328 wireless LAN card. This device does not inherit any
layout from previous versions. Although it was possible to create a data
structure that kept all the old layouts, we decided to start fresh, keep only
those SPROM variables that are used by the drivers that utilize ssb, and to
do the conversion in such a manner that neither compilation or execution will
be affected if a bisection lands in the middle of these changes, while keeping
the patches as small as possible.

In this patch, the sprom structures are changed while maintaining the old ones.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:40 -08:00
Ivo van Doorn 3957ccb56e rt2x00: Move duplicate code into rt2x00pci_txdone()
rt2400pci, rt2500pci and rt61 require different
txdone handling, but the code that pushes the frame
upstream and cleans up the entry is identical to
all of them.
This will create the function rt2x00pci_txdone()
to remove the duplicate code.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:40 -08:00
Zhu Yi 797a54c68e iwl4965: fix rxon flags set to wrong value for A mode in .erp_ie_changed
The patch fixes a bug that enables RXON_FLG_TGG_PROTECT_MSK erroneously
for A mode in the erp_ie_changed mac80211 callback.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:39 -08:00
Frank Lichtenheld 7223e8d900 b43: silence a bogus gcc warning
use uninitialized_var() to avoid the following bogus warning:
  CC [M]  drivers/net/wireless/b43/debugfs.o
drivers/net/wireless/b43/debugfs.c: In function ‘b43_debugfs_read’:
drivers/net/wireless/b43/debugfs.c:355: warning: ‘ret’ may be used uninitialized in this function

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:38 -08:00
Stefano Brivio 59f1b15465 b43legacy: fix kconfig dependecies for rfkill and leds
Fix dependencies for built-in b43legacy.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:37 -08:00
Zhu Yi 4900d6daad remove unused iwl4965_init_hw_rates function
The patch removes the unused function to fix a recursive bug caused
by namespace change.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:35 -08:00
Christoph Hellwig bb8c093bde iwlwifi: cleanup namespace
Prefix all symbols with iwl3945_ or iwl4965_ and thus allow building
the driver into the kernel. Also remove all the useless default
statements in Kconfig while we're at it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:04:35 -08:00
Mohamed Abbas 403ab56b1c iwl4965: fix cannot find a suitable rate issue
This patch fixes the iwl4965 problem for "Can not find a suitable rate
issues." by making rs_switch_to_mimo and rs_switch_to_siso functions
return -1 when CONFIG_IWL4965_HT is not selected. They used to return 0,
which means we can switch to HT rate causing the rate scale problem and
the error message.

The patch also fix another bug reported by Ben Cahill that it uses wrong
value for max_success_limit.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:33 -08:00
Zhu Yi 3567c11d72 iwlwifi: replace 0x8086 with PCI_VENDOR_ID_INTEL
Replace 0x8086 with PCI_VENDOR_ID_INTEL for PCI_DEVICE declaration.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:32 -08:00
Stefano Brivio 1f21ad2a4f b43/b43legacy: fix my copyright notices
Fix my copyright notices in b43 and b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:31 -08:00
Stefano Brivio 61bca6eb85 b43: rewrite A PHY initialization
Rewrite and sync A PHY initialization with specs, thus allowing for further
work to be done on 802.11a support. Note that A PHY initialization involves
G PHYs as well.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:31 -08:00
Stefano Brivio db9683fb19 b43legacy: rewrite and fix rfkill initialization
The rfkill subsystem doesn't like code like that
rfkill_allocate();
rfkill_register();
rfkill_unregister();
rfkill_register(); /* <- This will crash */

This sequence happens with
modprobe b43
ifconfig wlanX up
ifconfig wlanX down
ifconfig wlanX up

Fix this by always re-allocating the rfkill stuff before register.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:30 -08:00
Stefano Brivio 33a3dc9328 b43legacy: use a consistent naming scheme for the ops
Use a consistent naming scheme for the ops.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:29 -08:00
Stefano Brivio 0a6e1bee57 b43legacy: use the retry limits provided by mac80211
Use the retry limits provided by mac80211.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:28 -08:00
Thomas Bogendoerfer 43831b1581 SGISEEQ: use cached memory access to make driver work on IP28
SGI IP28 machines would need special treatment (enable adding addtional
wait states) when accessing memory uncached. To avoid this pain I changed
the driver to use only cached access to memory.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:28 -08:00
Olof Johansson b0cd2f9016 pasemi_mac: Don't enable RX/TX without a link (if possible)
pasemi_mac: Don't enable RX/TX without a link (if possible)

Don't enable RX/TX of packets until we have a link, since there's a chance
we'll just get RX frame errors, etc.

The case where we don't have a PHY we can't do much about: Just enable
it and deal with errors as they come in.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:27 -08:00
Olof Johansson 8304b633c5 pasemi_mac: Print warning when not attaching to a PHY
pasemi_mac: Print warning when not attaching to a PHY

Print a warning on the console when not connecting to a phy for an interface.
It turns out to be a pretty common problem when someone gets the MDIO info
wrong in their device tree, resulting in the macs running at a fixed 1Gbit FD.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:26 -08:00
Olof Johansson 5d8949448b pasemi_mac: Remove SKB copy/recycle logic
pasemi_mac: Remove SKB copy/recycle logic

It doesn't really buy us much, since copying is about as expensive
as the allocation in the first place. Just remove it for now.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:26 -08:00
Olof Johansson 7e9916e9dd pasemi_mac: SKB unmap optimization
pasemi_mac: SKB unmap optimization

Avoid touching skb_shinfo() in the unmap path, since it turns out to
normally cause cache misses and delays. instead, save number of fragments
in the TX_RING_INFO structures since that's all that's needed anyway.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:25 -08:00
Olof Johansson 28ae79f531 pasemi_mac: Software-based LRO support
pasemi_mac: Software-based LRO support

Implement LRO for pasemi_mac. Pretty straightforward.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:24 -08:00
Olof Johansson 906674abab pasemi_mac: Improve RX interrupt mitigation
pasemi_mac: Improve RX interrupt mitigation

Currently the receive side interrupts will go off on the reception of
a packet, NAPI will poll the ring and keep polling as long as there's
a decent amount of packets to receive.

This is less than optimal, especially for LRO where it's better if we
have a more substantial amount of packets to process at once, to get
the real LRO benefits.

So, set the count threshold to a higher value and use the timeout feature
that will give us an interrupt even if not enough packets have come in
to set off the count threshold.

FIXME: It'd be real nice to have ethtool support for users to tune this
at runtime.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:24 -08:00
Olof Johansson 61cec3bddc pasemi_mac: Fix TX cleaning
pasemi_mac: Fix TX cleaning

This is a bit awkward. We don't have a timer-delayed interrupt on TX
complete, but we have a count threshold. So set that reasonably high
(32 packets), and schedule the NAPI poll when it goes off. Also bump a
regular timer that will take care of rotting packets for the last 1..31
ones in case we don't trigger a TX interrupt (and there's no RX activity
that would otherwise trigger the poll).

The longer-term fix is to separate TX from RX NAPI and do two separate
poll loops.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:23 -08:00
Olof Johansson 5c15332bed pasemi_mac: performance tweaks
pasemi_mac: performance tweaks

* Seems like we do better with a smaller RX ring, probably because chances of
  still having the SKB cached are better
* Const-ify variables to get better code generation and fewer reloads
* Move prefetching around a little, and try to prefetch the whole SKB
* Set NETIF_F_HIGHDMA
* Misc other minor tweaks

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:22 -08:00
Olof Johansson 34c20624ce pasemi_mac: Convert to new dma library
pasemi_mac: Convert to new dma library

Convert the pasemi_mac driver to the new platform global DMA manaagement
library. This also does a couple of other minor cleanups w.r.t. channel
management.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:21 -08:00
Olof Johansson 40afa53158 pasemi_mac: Move register definitions to include/asm-powerpc
pasemi_mac: Move register definitions to include/asm-powerpc

Move the common register formats and descriptor layouts from
drivers/net/pasemi_mac.h to include/asm-poewrpc/pasemi_dma.h

Previously only the ethernet driver was using them, but other drivers
are coming up that will also use them, so it makes sense to share the
constants.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:20 -08:00
Olof Johansson 72b05b9940 pasemi_mac: RX/TX ring management cleanup
pasemi_mac: RX/TX ring management cleanup

Prepare a bit for supporting multiple TX queues by cleaning up some
of the ring management and shuffle things around a bit.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:19 -08:00
Stephen Hemminger 5f06eba4dc sky2: rx allocation threshold change
When using larger MTU's sky2 driver changes from allocating one
data area, to using multiple pages. The threshold for this was based on
a heuristic where the cost of a single allocation is bigger than one
page.  Since the allocator has changed, this heuristic is now incorrect;
instead just make the threshold be when the total size of the allocation
is greater than one page.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:19 -08:00
Stephen Hemminger f03b865491 sky2: align IP header on Rx if possible
The sky2 driver was not aligning the IP header on receive buffers.
This workaround is only needed on hardware with broken FIFO, newer chips
without FIFO can just DMA to unaligned address.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:18 -08:00
Francois Romieu 5ac5d61632 r6040: cleanups
- whitespaces vs tabs
- use 80 cols
- use if_mii
- use netdev_priv
- remove useless cast to void *
- PCI device id does not need to be globally available

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-28 15:04:16 -08:00
Francois Romieu e6a9ea1052 r6040: erroneous dev->priv
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-28 15:04:16 -08:00
Francois Romieu 6c3231035d r6040: remove virt_to_bus
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-28 15:04:15 -08:00
Francois Romieu 5125a78668 r6040: compile error
drivers/net/r6040.c: In function 'rx_buf_alloc':
drivers/net/r6040.c:262: warning: passing argument 2 of 'pci_map_single' makes pointer from integer without a cast

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-28 15:04:14 -08:00
Komuro bd5a934620 axnet_cs: use spin_lock_irqsave instead of spin_lock + disable_irq
Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:14 -08:00
Jeff Garzik 2eab17ab88 drivers/net/cxgb3: trim trailing whitespace
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:13 -08:00
Divy Le Ray afefce66a5 cxgb3 - Fix I/O synchronization
Synchronize memory access before ringing
the Tx door bell.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:12 -08:00
Divy Le Ray a2604be548 cxgb3 - HW set up updates
Disable PEX errors. The HW generates false positives.
Update RSS hash function to a symmetric algorithm.
Update T3C HW support

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:11 -08:00
Divy Le Ray 3e5192eec8 cxgb3 - sysfs methods clean up
Remove unused argument in sysfs methods

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:10 -08:00
Divy Le Ray 23561c9447 cxgb3 - fix interaction with pktgen
Do not use skb->cb to stash unmap info,
save the info to the descriptor state.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:09 -08:00
Divy Le Ray 273fa9042c cxgb3 - FW upgrade
Bump up FW version to 5.0.
Do not downgrade FW within the same major version range.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:09 -08:00
Divy Le Ray 91a6b50cf6 cxgb3 - Add EEH support
Add PCI recovery support

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:08 -08:00
Divy Le Ray 67d92ab765 cxgb3 - Fix resources release.
Remove sysfs entries before unregistering the net devices.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:07 -08:00
Divy Le Ray 678771d6f5 cxgb3 - Use wild card for PCI subdevice ID match
Subdevice ID is not necessarily set to 1.
Use wild card for PCI device matching

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:07 -08:00
Divy Le Ray 42256f57d8 cxgb3 - fix MSI-X failure path
Return error code when msi-x settings fail.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:06 -08:00
Jeff Garzik cba0516ddb [netdrvr] checkpatch cleanups
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:05 -08:00
Jeff Garzik 93a3b607e6 wireless: checkpatch cleanups
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:04 -08:00
Jeff Garzik 092427be8c drivers/net/r6040: fix obvious problems (but more remain)
- checkpatch fixes

- fix bogus and uninitialized return codes in r6040_start_xmit()

- netdev_get_settings() fix obvious locking bug flagged by compiler warning

- set DMA consistent mask

- remove unnecessary setting of dev->base_addr

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:03 -08:00
Jeff Garzik 4790654c71 [netdrvr] netxen: checkpatch fixes (98% trim trailing whitespace)
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:04:02 -08:00
Peter Korsgaard ba734f349d dm9601: Consolidate common parts of dm_write_*_async
dm_write_async and dm_write_reg_async are almost identical.
Move common functionality to dm_write_async_helper (saves ~256b).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:01 -08:00
Alan Cox 9ce6cf2553 slip: Drag kicking and screaming into coding style compliance
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:01 -08:00
Alan Cox a35f5de776 3c501: Bring into compliance with the coding style
3c501 leads the way... 8)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:00 -08:00
Adrian Bunk 68d579fb93 drivers/net/chelsio/: #if 0 unused functions
This patch #if 0's the following unused functions:
- espi.c:t1_espi_set_misc_ctrl()
- sge.c:t1_sched_set_max_avail_bytes()
- sge.c:t1_sched_set_drain_bits_per_us()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:59 -08:00
Joe Perches 2450022afa drivers/net: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:59 -08:00
Joe Perches 60403fdada drivers/net/sk98lin: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:58 -08:00
Joe Perches 93ab8e84de drivers/net/wan: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:57 -08:00