summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/cmd.c
AgeCommit message (Collapse)Author
2008-03-25libertas: convert CMD_MAC_CONTROL to a direct commandHolger Schurig
convert CMD_MAC_CONTROL to a direct command 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-03-06libertas: convert 802_11_SCAN to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06libertas: convert KEY_MATERIAL to a direct commandDavid Woodhouse
The struct enc_key probably wants to die too, but that can come later. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29libertas: trim overly long debug statementHolger Schurig
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28libertas: Remove unused exportsRoland Dreier
The libertas driver exports a number of symbols with no in-tree users; remove these unused exports. lbs_reset_device() is completely unused, with no callers at all, so remove the function completely. A couple of these unused exported symbols are static, which causes the following build error on ia64 with gcc 4.2.3: drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-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-28libertas: always show firmware releaseHolger Schurig
Always shows the firmware release. Also converts the firmware release into something that is easily comparable. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: convert SUBSCRIBE_EVENT to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: convert ENABLE_RSN to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: convert SET_WEP to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: convert SLEEP_PARAMS to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: convert INACTIVITY_TIMEOUT to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: convert RADIO_CONTROL to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: make lbs_submit_command always 'succeed' and set command timerDavid Woodhouse
Even if it fails, we want to wait a while and try again, with an ultimate timeout if it the condition persists. So again, just use the standard command timeout behaviour. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: don't clear priv->dnld_sent after sending sleep confirmDavid Woodhouse
DNLD_RES_RECEIVED is a bit of a misnomer -- we never wait for the result to be received; it's purely representing the state of the TX path, and in this case the TX path is definitely busy. Of course, that means that we don't actually care about DATA_SENT vs. CMD_SENT either, but that's a can of worms for another day... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: fix buffer handling of PS_MODE commands and responsesDavid Woodhouse
Commit 5b8845345e7385d2eb37fac22ba9ab6905988be5 (or, in case the git workflow is broken and patches get recommitted, the commit entitled 'libertas: rename and re-type bufvirtualaddr to cmdbuf' by dcbw), introduced a number of bugs where we once had a pointer to a command _payload_, but now we use the pointer to the command header instead. The fix isn't wonderfully pretty for now, but it'll get better when we finish converting all commands so the structures include the header. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: kill 'addtail' argument to lbs_queue_cmd() and make it staticDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: ensure response buffer size is always set for lbs_cmd_with_responseDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: add __lbs_cmd_async() for asynchronous command submissionDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: store command result in cmdnode instead of priv->cur_cmd_retcodeDavid Woodhouse
... at least for users of __lbs_cmd(). Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: kill pdata_buf member of struct cmd_ctrl_nodeDavid Woodhouse
We can use the callback_arg for it; that's the way we're heading anyway... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: let __lbs_cmd() free its own cmdnodeDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: kill cleanup_cmdnode()David Woodhouse
Move the wakeup into lbs_complete_command(), and leave the other bits in __lbs_cleanup_and_insert_cmd() which was the only caller now anyway. There are two remaining direct callers of lbs_cleanup_and_insert_cmd(), and they are both fine without the wakeup. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: don't re-initialise cmdnode when taking it off the free queueDavid Woodhouse
We initialise it when we add it to the queue. No need to do it again. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: introduce and use lbs_complete_command() for command completionDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: remove some pointless checks for cmdnode buffer being presentDavid Woodhouse
We allocate them all at the same time, at startup. If they go missing, we have more serious things to worry about, and the resulting oops will be a perfectly acceptable result. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: rename and clean up DownloadcommandToStationDavid Woodhouse
Call it lbs_submit_command(), remove a bunch of things which can be (or, in the case of zeroing ->cmdwaitqwoken, already are) done elsewhere. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: kill unused wait_option field in struct cmd_ctrl_nodeDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: kill whitespace at end of linesDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: pass channel argument directly to lbs_mesh_config()David Woodhouse
There is weirdness here; the firmware seems to refuse to change channels at will. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: cope with both old and new mesh TLV valuesDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: add ethtool support for wake-on-lan configurationDavid Woodhouse
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-28libertas: switch lbs_cmd() to take a _pointer_ to the command structureDavid Woodhouse
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-28libertas: add lbs_host_sleep_cfg() command functionDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: add missing newlines in debugging statementsDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: be more careful about command responses matching cur_cmdDavid Woodhouse
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-28libertas: add debugging output to lbs_mesh_config()David Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: add lbs_mesh sysfs attribute for enabling meshDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: make some more functions staticDavid Woodhouse
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-28libertas: endianness fixes for get_channel/set_channelDan Williams
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-28libertas: convert RF_CHANNEL to a direct commandDan Williams
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-28libertas: convert DATA_RATE to a direct commandDan Williams
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-28libertas: convert CMD_MESH_ACCESS to a direct commandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28libertas: fix debug output in lbs_cmd_copyback() function.David Woodhouse
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-28libertas: rename and re-type bufvirtualaddr to cmdbufDan Williams
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-28libertas: convert GET_HW_SPEC to a direct commandDan Williams
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-28libertas: add simple copyback command callbackDan Williams
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-28libertas: clean up direct command handlingDan Williams
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-28libertas: clean up is_command_allowed_in_ps()Dan Williams
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-28libertas: make lbs_cmd() usage nicerDan Williams
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-28libertas: add opaque extra argument to cmd callback functionDavid Woodhouse
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>