aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/cmd.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-27libertas: remove CMD_802_11_PWR_CFGHolger Schurig1-10/+0
This has nowhere been used. Note: in the firmware manual this was documented as CMD_802_11_PA_CFG. If we ever need it, we can/should re-implement it as a direct command. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: remove lots of unused stuffHolger Schurig1-78/+21
This removes many unused function parameters as well as some not-implemented functions, e.g. CMD_802_11_GET_STATS. The silly lbs_set_cmd_ctrl_node() function is now also gone. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: misc power saving adjustsHolger Schurig1-8/+2
* firmware for the CF card supports power saving * the driver currenly only accept "iwconfig ethX power on|off", so I fixed what the range wext ioctl reports. * initialize value/flags in lbs_get_power() * get rid of unused parameter psmode in lbs_ps_confirm_sleep() * some minor debug output tweaks Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: convert GET_LOG to a direct commandHolger Schurig1-16/+0
Now uses __lbs_cmd() to get the "log" (it's actually more a snapshot of various counters, not a sequential log). Besides the "mechanical" convertion the patch add the following logical changes: * Removes the priv->logmsg variable, it was only used in one place anyway, also don't blindly get the counters when associating. Getting the counters then the user asks via WEXT for them is good enought. * don't set wstats.discard.fragment with log.rxfrag, because the latter is a counter for successfully received packets, not for fragmented packets. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: fix scheduling while atomic bug in CMD_MAC_CONTROLHolger Schurig1-5/+4
The old code incorrectly used lbs_cmd_with_response() and now uses lbs_cmd_async(). While there I noticed that there is no real useful return values for asynchronous command functions, so I made the function "void". Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: make a handy lbs_cmd_async() commandHolger Schurig1-30/+54
This uses a static lbs_cmd_async_callback function, which is a noop. Just setting the callback argument to __lbs_cmd_async() to NULL won't work, because then the cmdnode wouldn't be released. This also makes __lbs_cmd_async() a static method, which is now only used by lbs_cmd() and lbs_cmd_async(). Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: remove some unused commandsHolger Schurig1-7/+0
Neither CMD_802_11_PAIRWISE_TSC nor CMD_802_11_GROUP_TSC is used or documented. It might have something to do with TKIP sequence counters, but that's just an educated guess. Remove all occurences of them. CMD_CODE_DNLD is also neither used nor documented. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: rename packetfilter to mac_controlHolger Schurig1-2/+2
The CMD_MAC_CONTROL can be used for other things than just filtering packets, e.g. to enable and disable WMM. This uses the same term mac_control for the define, the function and the shadow value in struct lbs_private. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-25libertas: convert CMD_MAC_CONTROL to a direct commandHolger Schurig1-25/+6
convert CMD_MAC_CONTROL to a direct command Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-06libertas: convert 802_11_SCAN to a direct commandDavid Woodhouse1-4/+0
Signed-off-by: David Woodhouse <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-06libertas: convert KEY_MATERIAL to a direct commandDavid Woodhouse1-52/+75
The struct enc_key probably wants to die too, but that can come later. Signed-off-by: David Woodhouse <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-02-29libertas: trim overly long debug statementHolger Schurig1-16/+7
Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-02-28libertas: Remove unused exportsRoland Dreier1-2/+0
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 <[email protected]> Acked-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: always show firmware releaseHolger Schurig1-6/+17
Always shows the firmware release. Also converts the firmware release into something that is easily comparable. Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert SUBSCRIBE_EVENT to a direct commandDavid Woodhouse1-51/+1
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert ENABLE_RSN to a direct commandDavid Woodhouse1-18/+14
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert SET_WEP to a direct commandDavid Woodhouse1-37/+20
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert SLEEP_PARAMS to a direct commandDavid Woodhouse1-24/+32
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert INACTIVITY_TIMEOUT to a direct commandDavid Woodhouse1-18/+16
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert RADIO_CONTROL to a direct commandDavid Woodhouse1-49/+27
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: make lbs_submit_command always 'succeed' and set command timerDavid Woodhouse1-22/+20
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: don't clear priv->dnld_sent after sending sleep confirmDavid Woodhouse1-1/+0
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: fix buffer handling of PS_MODE commands and responsesDavid Woodhouse1-2/+2
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: kill 'addtail' argument to lbs_queue_cmd() and make it staticDavid Woodhouse1-9/+5
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: ensure response buffer size is always set for lbs_cmd_with_responseDavid Woodhouse1-1/+3
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: add __lbs_cmd_async() for asynchronous command submissionDavid Woodhouse1-30/+30
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: store command result in cmdnode instead of priv->cur_cmd_retcodeDavid Woodhouse1-6/+6
... at least for users of __lbs_cmd(). Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: kill pdata_buf member of struct cmd_ctrl_nodeDavid Woodhouse1-3/+1
We can use the callback_arg for it; that's the way we're heading anyway... Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: let __lbs_cmd() free its own cmdnodeDavid Woodhouse1-1/+3
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: kill cleanup_cmdnode()David Woodhouse1-22/+17
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: don't re-initialise cmdnode when taking it off the free queueDavid Woodhouse1-3/+0
We initialise it when we add it to the queue. No need to do it again. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: introduce and use lbs_complete_command() for command completionDavid Woodhouse1-7/+18
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: remove some pointless checks for cmdnode buffer being presentDavid Woodhouse1-12/+4
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: rename and clean up DownloadcommandToStationDavid Woodhouse1-27/+9
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: kill unused wait_option field in struct cmd_ctrl_nodeDavid Woodhouse1-8/+4
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: kill whitespace at end of linesDavid Woodhouse1-1/+1
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: pass channel argument directly to lbs_mesh_config()David Woodhouse1-3/+3
There is weirdness here; the firmware seems to refuse to change channels at will. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: cope with both old and new mesh TLV valuesDavid Woodhouse1-3/+3
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: add ethtool support for wake-on-lan configurationDavid Woodhouse1-6/+8
Also, check that suspend is refused if HOST_SLEEP_CFG hasn't been done. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: switch lbs_cmd() to take a _pointer_ to the command structureDavid Woodhouse1-8/+9
This way, it looks more like a normal function. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: add lbs_host_sleep_cfg() command functionDavid Woodhouse1-0/+19
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: add missing newlines in debugging statementsDavid Woodhouse1-4/+4
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: be more careful about command responses matching cur_cmdDavid Woodhouse1-2/+2
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: add debugging output to lbs_mesh_config()David Woodhouse1-1/+3
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: add lbs_mesh sysfs attribute for enabling meshDavid Woodhouse1-0/+17
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: make some more functions staticDavid Woodhouse1-6/+6
sparse was getting on my tits. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: endianness fixes for get_channel/set_channelDan Williams1-4/+5
Signed-off-by: Dan Williams <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert RF_CHANNEL to a direct commandDan Williams1-18/+53
Signed-off-by: Dan Williams <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert DATA_RATE to a direct commandDan Williams1-20/+73
Signed-off-by: Dan Williams <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-01-28libertas: convert CMD_MESH_ACCESS to a direct commandDavid Woodhouse1-17/+11
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>