David Woodhouse [Wed, 12 Dec 2007 03:52:03 +0000 (22:52 -0500)]
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>
David Woodhouse [Wed, 12 Dec 2007 01:03:01 +0000 (20:03 -0500)]
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>
David Woodhouse [Wed, 12 Dec 2007 00:57:05 +0000 (19:57 -0500)]
libertas: add missing newline on debug message
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Woodhouse [Wed, 12 Dec 2007 00:56:28 +0000 (19:56 -0500)]
libertas: allow setting channel on mshX device
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Woodhouse [Wed, 12 Dec 2007 00:30:57 +0000 (19:30 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 23:53:20 +0000 (18:53 -0500)]
libertas: whitespace cleanup in host.h
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Woodhouse [Tue, 11 Dec 2007 23:36:35 +0000 (18:36 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 23:57:49 +0000 (18:57 -0500)]
libertas: kill references to mesh autostart
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Woodhouse [Tue, 11 Dec 2007 23:56:42 +0000 (18:56 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 22:54:36 +0000 (17:54 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 22:44:10 +0000 (17:44 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 22:35:51 +0000 (17:35 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 21:54:15 +0000 (16:54 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 20:50:59 +0000 (15:50 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 20:29:10 +0000 (15:29 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 20:28:18 +0000 (15:28 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 20:23:59 +0000 (15:23 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 20:22:27 +0000 (15:22 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 18:49:39 +0000 (13:49 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 18:15:25 +0000 (13:15 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 17:54:43 +0000 (12:54 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 17:53:43 +0000 (12:53 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 17:42:16 +0000 (12:42 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 17:40:35 +0000 (12:40 -0500)]
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>
Dan Williams [Tue, 11 Dec 2007 17:33:30 +0000 (12:33 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 16:55:37 +0000 (11:55 -0500)]
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>
David Woodhouse [Tue, 11 Dec 2007 05:07:58 +0000 (00:07 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 23:53:34 +0000 (18:53 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 21:38:18 +0000 (16:38 -0500)]
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>
Dan Williams [Mon, 10 Dec 2007 20:24:47 +0000 (15:24 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 20:25:42 +0000 (15:25 -0500)]
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>
Dan Williams [Mon, 10 Dec 2007 20:11:23 +0000 (15:11 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 19:58:37 +0000 (14:58 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 18:36:10 +0000 (13:36 -0500)]
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>
Holger Schurig [Mon, 10 Dec 2007 11:19:55 +0000 (12:19 +0100)]
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>
David Woodhouse [Mon, 10 Dec 2007 05:51:35 +0000 (00:51 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 05:49:26 +0000 (00:49 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 05:17:28 +0000 (00:17 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 05:05:37 +0000 (00:05 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 04:54:27 +0000 (23:54 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 04:44:43 +0000 (23:44 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 03:02:46 +0000 (22:02 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 03:00:55 +0000 (22:00 -0500)]
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>
David Woodhouse [Mon, 10 Dec 2007 00:54:11 +0000 (19:54 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 21:22:21 +0000 (16:22 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 20:04:19 +0000 (15:04 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 19:37:59 +0000 (14:37 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 17:57:14 +0000 (12:57 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 17:52:19 +0000 (12:52 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 17:48:10 +0000 (12:48 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 17:37:27 +0000 (12:37 -0500)]
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>
David Woodhouse [Sun, 9 Dec 2007 16:08:25 +0000 (11:08 -0500)]
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>
David Woodhouse [Sat, 8 Dec 2007 23:49:06 +0000 (23:49 +0000)]
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>
David Woodhouse [Sat, 8 Dec 2007 20:56:44 +0000 (20:56 +0000)]
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>
David Woodhouse [Sat, 8 Dec 2007 20:04:36 +0000 (20:04 +0000)]
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>
David Woodhouse [Sat, 8 Dec 2007 19:46:19 +0000 (19:46 +0000)]
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>
David Woodhouse [Sat, 8 Dec 2007 18:29:16 +0000 (18:29 +0000)]
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>
David Woodhouse [Sat, 8 Dec 2007 17:42:59 +0000 (17:42 +0000)]
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>
David Woodhouse [Sat, 8 Dec 2007 00:59:54 +0000 (00:59 +0000)]
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>
David Woodhouse [Sat, 8 Dec 2007 00:35:00 +0000 (00:35 +0000)]
libertas: kill adapter->nr_cmd_pending
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Woodhouse [Sat, 8 Dec 2007 00:23:55 +0000 (00:23 +0000)]
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>
David Woodhouse [Fri, 7 Dec 2007 19:32:12 +0000 (19:32 +0000)]
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>
Holger Schurig [Fri, 7 Dec 2007 15:30:44 +0000 (15:30 +0000)]
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>
David Woodhouse [Fri, 7 Dec 2007 15:13:05 +0000 (15:13 +0000)]
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>
David Woodhouse [Fri, 7 Dec 2007 15:12:26 +0000 (15:12 +0000)]
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>
Holger Schurig [Fri, 7 Dec 2007 15:52:10 +0000 (16:52 +0100)]
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>
David Woodhouse [Fri, 7 Dec 2007 12:56:45 +0000 (12:56 +0000)]
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>
David Woodhouse [Thu, 6 Dec 2007 14:44:21 +0000 (14:44 +0000)]
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>
David Woodhouse [Thu, 6 Dec 2007 12:51:00 +0000 (12:51 +0000)]
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>
Holger Schurig [Thu, 6 Dec 2007 12:50:30 +0000 (13:50 +0100)]
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>
Li Zefan [Thu, 6 Dec 2007 12:01:21 +0000 (13:01 +0100)]
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>
David Woodhouse [Thu, 6 Dec 2007 12:38:31 +0000 (12:38 +0000)]
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>
David Woodhouse [Thu, 6 Dec 2007 12:37:31 +0000 (12:37 +0000)]
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>
David Woodhouse [Thu, 6 Dec 2007 14:41:08 +0000 (14:41 +0000)]
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>
David Woodhouse [Thu, 6 Dec 2007 10:36:08 +0000 (10:36 +0000)]
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>
Holger Schurig [Wed, 5 Dec 2007 16:58:11 +0000 (17:58 +0100)]
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>
Holger Schurig [Wed, 5 Dec 2007 16:58:06 +0000 (17:58 +0100)]
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>
Holger Schurig [Wed, 5 Dec 2007 16:57:58 +0000 (17:57 +0100)]
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>
Holger Schurig [Wed, 5 Dec 2007 16:57:56 +0000 (17:57 +0100)]
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>
David Woodhouse [Thu, 6 Dec 2007 14:36:11 +0000 (14:36 +0000)]
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>
David Woodhouse [Sat, 1 Dec 2007 15:15:41 +0000 (15:15 +0000)]
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>
David Woodhouse [Wed, 28 Nov 2007 16:20:51 +0000 (16:20 +0000)]
libertas: Fix memory leak of RX skbs
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Wed, 12 Dec 2007 21:05:18 +0000 (22:05 +0100)]
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>
Michael Buesch [Sun, 9 Dec 2007 21:34:59 +0000 (22:34 +0100)]
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>
Tomas Winkler [Wed, 5 Dec 2007 18:59:59 +0000 (20:59 +0200)]
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>
Tomas Winkler [Wed, 5 Dec 2007 18:59:58 +0000 (20:59 +0200)]
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>
Reinette Chatre [Wed, 5 Dec 2007 18:59:57 +0000 (20:59 +0200)]
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>
Dan Williams [Wed, 5 Dec 2007 16:01:23 +0000 (11:01 -0500)]
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>
Adrian Bunk [Tue, 11 Dec 2007 22:20:30 +0000 (23:20 +0100)]
ipg: add __devexit annotation
ipg_remove() can become __devexit.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
John W. Linville [Tue, 4 Dec 2007 22:24:35 +0000 (17:24 -0500)]
rt2x00: correct "skb_buff" typo
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Pekka Enberg [Fri, 30 Nov 2007 07:55:43 +0000 (09:55 +0200)]
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>
Pekka Enberg [Thu, 24 Jan 2008 10:01:17 +0000 (02:01 -0800)]
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>
Pekka Enberg [Fri, 30 Nov 2007 07:54:51 +0000 (09:54 +0200)]
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>
Pekka Enberg [Fri, 30 Nov 2007 07:54:33 +0000 (09:54 +0200)]
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>
Pekka Enberg [Fri, 30 Nov 2007 07:54:06 +0000 (09:54 +0200)]
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>
Pekka Enberg [Fri, 30 Nov 2007 07:53:51 +0000 (09:53 +0200)]
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>
Pekka Enberg [Fri, 30 Nov 2007 07:53:33 +0000 (09:53 +0200)]
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>
Pekka Enberg [Fri, 30 Nov 2007 07:53:09 +0000 (09:53 +0200)]
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>
Grant Likely [Sun, 2 Dec 2007 05:12:45 +0000 (22:12 -0700)]
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>
Andrea Merello [Sun, 2 Dec 2007 22:17:51 +0000 (17:17 -0500)]
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>