aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/cmd.c
AgeCommit message (Collapse)AuthorFilesLines
2009-10-27libertas: get current channel out of priv->curbssparamsHolger Schurig1-4/+4
... as priv->curbssparams won't exist once libertas+cfg80211 lands. Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-27libertas: move scan/assoc related stuffHolger Schurig1-0/+1
Another cfg80211-preparation patch: removes some code/definitions from main.c and dev.h and put's it into assoc.c/.h, scan.c/.h. No function change. Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-27libertas: change IW_ESSID_MAX_SIZE -> IEEE80211_MAX_SSID_LENHolger Schurig1-1/+1
Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-27libertas: remove unused 11d codeHolger Schurig1-10/+0
Most of the 11d code was protected with an "if (priv->enable11d)" clause. But there was no code that anywhere that was able to set this variable to true. So all 11d code was dead for almost a year and no one complained. That's enought incentive to remove this code. Besides removing old cruft, we gain back the 11d capability in a common way when we merge the cfg80211 functionality. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-27libertas: remove unused lbs_cmd_802_11_inactivity_timeout()Holger Schurig1-27/+0
Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-27libertas: make lbs_get_channel() staticHolger Schurig1-1/+1
Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-27libertas: cleanup host.h and hostcmd.hHolger Schurig1-1/+0
Also remove some unused definitions and make tab usage consistent. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-27libertas: make __lbs_cmd_async() non-staticHolger Schurig1-1/+1
This function will be needed for the cfg80211-enabled libertas driver. Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-07libertas: Use lbs_is_cmd_allowed() check in command handling routines.Amitkumar Karwar1-0/+34
lbs_is_cmd_allowed() check is added in __lbs_cmd_async() and lbs_prepare_and_send_command(). The check is removed from other places. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-10-07libertas: Add auto deep sleep support for SD8385/SD8686/SD8688Amitkumar Karwar1-3/+69
Add timer based auto deep sleep feature in libertas driver which can be configured using iwconfig command. This is tested on SD8688, SD8686 cards with firmware versions 10.38.1.p25, 9.70.4.p0 respectively on 32-bit and 64-bit platforms. Tests have been done for USB/CS cards to make sure that the patch won't break USB/CS code. We didn't test the if_spi driver. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-07-21libertas: Fix problem with broken V4 firmware on CF8381Marek Vasut1-1/+7
Firmware V4 on CF8381 reports region code shifted by 1 byte to left. The following patch checks for this and handles it properly. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-06-03libertas: convert CMD_802_11_ASSOCIATE to a direct commandDan Williams1-5/+0
Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-06-03libertas: convert CMD_802_11_AUTHENTICATE to a direct commandDan Williams1-6/+1
And fix up setting authentication suite for v9+ firmware too. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-06-03libertas: restyle Marvell & IEEE TLV structure namesDan Williams1-2/+2
Easier to read and more conformant with kernel style. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-04-22libertas: support mesh for various firmware versionsBing Zhao1-2/+24
CMD_MESH_CONFIG command ID and a couple of structure members in TxPD, RxPD have been changed in firmware version 10.x.y.z and newer. Signed-off-by: Kiran Divekar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-03-30trivial: Fix misspelling of firmwareNick Andrew1-1/+1
Fix misspelling of firmware. Signed-off-by: Nick Andrew <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2008-11-21libertas: Fine grained configuration of wake-on-lan.Anna Neal1-3/+15
Based on a patch from Shailendra Govardhan <[email protected]>. This patch allows implementation of more specific wake-on-lan rules than those of ethtool. Please note that only firmware 5.110.22.p20 and above supports this feature. This patch only implements the driver/firmware interface, not the userspace/driver interface. Signed-off-by: Anna Neal <[email protected]> Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-11-10don't use net/ieee80211.hJohannes Berg1-3/+2
Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h. Contains a bugfix in libertas where the SSID parsing could overrun the buffer when the AP sends invalid information. Signed-off-by: Johannes Berg <[email protected]> Acked-by: Dan Williams <[email protected]> [airo, libertas] Acked-by: Pavel Roskin <[email protected]> [orinoco] Acked-by: David Kilroy <[email protected]> [orinoco] Signed-off-by: John W. Linville <[email protected]>
2008-10-31wireless: use individual buffers for printing ssid valuesJohn W. Linville1-1/+2
Also change escape_ssid to print_ssid to match print_mac semantics. Signed-off-by: John W. Linville <[email protected]>
2008-10-31wireless: consolidate on a single escape_essid implementationJohn W. Linville1-1/+2
Signed-off-by: John W. Linville <[email protected]>
2008-10-31Merge branch 'master' of ↵David S. Miller1-2/+2
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/p54/p54common.c
2008-10-29libertas: remove two libertas sparse warningHolger Schurig1-2/+2
Johannes Berg detected this two sparse warnings: drivers/net/wireless/libertas/cmd.c:609:16: warning: cast to restricted __le16 drivers/net/wireless/libertas/cmd.c:611:16: warning: cast to restricted __le16 ... but cmd.minlevel is "s8", so we can access it directly and hope for the sign-extension-code in the compiler to convert that to the "s16" type. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-10-27net: convert print_mac to %pMJohannes Berg1-3/+2
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-10-14libertas : Remove unused variable warning for "old_channel" from cmd.cManish Katiyar1-0/+2
Below patch removes the following warning during compilation. drivers/net/wireless/libertas/cmd.c:826: warning: unused variable 'old_channel' Signed-off-by : Manish Katiyar <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-09-30libertas: Improvements on automatic tx power control via SIOCSIWTXPOW (fixups)Anna Neal1-1/+1
This patch addresses comments from Dan Williams about the patch committed as "libertas: Improvements on automatic tx power control via SIOCSIWTXPOW." Signed-off-by: Anna Neal <[email protected]> Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-09-15libertas: convert SNMP_MIB to a direct commandDan Williams1-103/+77
And support setting both long and short retries independently. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-09-15libertas: remove unused generic RESET commandDan Williams1-18/+0
The generic reset command is unused. Each interface type needs to handle the reset command differently since after reset, the firmware is dead and interface-specific mechanisms must be used to reinitialize the card. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-09-11libertas: Improvements on automatic tx power control via SIOCSIWTXPOW.Anna Neal1-0/+64
iwconfig txpower can now be used to set tx power to fixed or auto. If set to auto the default firmware settings are used. The command CMD_802_11_PA_CFG is only sent to older firmware, as Dan Williams noted the command was no longer supported in firmware V9+. Signed-off-by: Anna Neal <[email protected]> Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-29libertas: convert adhoc operations to direct commandsDan Williams1-12/+0
with fixes for v9 and later firmware too. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-29libertas: convert CMD_802_11_RADIO_CONTROL to a direct commandDan Williams1-20/+26
and return errors for operations like join & scan that aren't possible when the radio is turned off. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-29libertas: convert CMD_802_11_DEAUTHENTICATE to a direct commandDan Williams1-4/+0
and remove DISASSOCIATE because it's not in any of the specs and has never been used. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-29libertas: convert CMD_802_11_RF_TX_POWER to a direct commandDan Williams1-35/+50
And while we're at it, grab min/max TX power from the firmware and use that to validate incoming TX power requests from WEXT. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-22libertas: support boot commands to write persistent firmware and bootloaderBrian Cavagnolo1-4/+17
Add locking and non-locking versions of if_usb_prog_firmware to support programming firmware after and before driver bring-up respectively. Add more suitable error codes for firmware programming process. Add capability checks for persistent features before attempting to use them. Based on patches from Brajesh Dave and Priyank Singh. Signed-off-by: Brian Cavagnolo <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-06-10Merge branch 'master' of ↵David S. Miller1-1/+4
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h
2008-06-09libertas: fix sleep confirmationHolger Schurig1-1/+4
This fixes an issus that made "iwconfig eth1 power on" non-working. When we get a "PS sleep" event, we have to confirm this to the firmware. The confirm happens with a command, but this command is special: the firmware won't send us a response. if_cs_host_to_card() is setting priv->dnld_sent anyway, so this variable stayed at DNLD_DATA_SENT and was never cleared back. Now I put the special knowledge that the CMD_802_11_PS_MODE with CMD_SUBCMD_SLEEP_CONFIRMED doesn't need to need a response by directly clearing the dnld_sent state in lbs_send_confirmsleep(). Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-06-03libertas: rate adaptation configuration via iwconfig.Javier Cardona1-19/+48
Implemented rate adaptation support via 'iwconfig rate' API. It is now possible to specify a bit-rate value and append 'auto'. That will configure rate adaptation to use all bit-rates equal or lower than than selected value. Made lbs_cmd_802_11_rate_adapt_rateset a direct command. Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-06-03libertas: use lbs_pr_XX instead of printkHolger Schurig1-1/+1
... because lbs_pr_XXX prefixes all messages with "libertas: " Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-05-21libertas: reduce command retry timeHolger Schurig1-3/+3
[PATCH, take 2] libertas: reduce command retry time In the normal case, an unsuccessful command would be retried for 10*5 seconds, or 10*10 seconds in the worst case. This patch reduces this to 3*3 seconds, or 3*10 seconds in the worst case. I also reduced the time it takes to start a new command downloaded. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-05-21libertas: Extend MESH_CONFIG command to access non-volatile configurationJavier Cardona1-11/+57
This patch is based on a patch from Shailendra Govardhan and Brian Cavagnolo. It extends the MESH_CONFIG command to configure non-volatile parameters on libertas devices that support them (e.g. OLPC Active Antenna). This patch only implements the driver/firmware interface. See http://dev.laptop.org/ticket/6823 for minimal testing results and known issues. Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-05-21libertas: fix multicast filtering on eth and msh interfacesDavid Woodhouse1-28/+1
We weren't properly handling multicast on the mesh interface. Fix that, which involves setting up the hardware to use the union of dev->mc_list for both eth%d and msh%d devices. This means we can't do it directly from ->set_multicast_list() because we'd need to lock the other device to read its list, and we can't do that because it might deadlock. So punt the actual work to keventd. Also, invoke the same when taking an interface down; for some reason the core calls ->set_multicast_list while IFF_UP is still set in dev->flags when we're taking it down, so its addresses don't get removed then. We also convert MAC_MULTICAST_ADR to a direct command while we're at it, removing one more entry from the big switch statement in the deprecated lbs_prepare_and_send_command() function. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-05-21libertas: Increase priority of 'unknown command' warningsDavid Woodhouse1-1/+1
Using the deprecated lbs_prepare_and_send_command() function for a command which it doesn't understand is an error; complain loudly about it even when we're not debugging. The mesh stats bug, where we converted MESH_ACCESS to a direct command but accidentally missed one user which was still trying to do it through lbs_prepare_and_send_command(), would have been caught a lot quicker if we'd done this sooner. Such bugs aren't entirely unlikely in future too, as we convert more code to stop using this function. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-05-14libertas: remove lbs_get_data_rate()Holger Schurig1-32/+0
lbs_get_data_rate() gets called, but no-one uses it's result. Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-04-16libertas: un-garbage various command structsHolger Schurig1-1/+6
Some command structs contain reserved or unused fields, which the driver send uninitialized down to the card. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-04-16libertas: convert libertas driver to use an event/cmdresp queueHolger Schurig1-8/+17
This patch (co-developed by Dan Williams and Holger Schurig) uses a kfifo object for events and a swapping buffer scheme for the command response to preserve the zero-copy semantics of the CF driver and keep memory usage low. The main thread should only ever touch the buffer indexed by priv->resp_idx, while the interface code is free to write to the second buffer, then swap priv->resp_idx under the driver spinlock. The firmware specs only permit one in-flight command, so there will only ever be one command response to process at a time. Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-04-08libertas: move lbs_update_channel out of assoc.cHolger Schurig1-0/+16
... as it has nothing to do with pure association Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-04-08libertas: move association code from join.c into scan.cHolger Schurig1-1/+1
Besides code moving, I did the following changes: * made some functions static * removed some unneeded #include's * made patch checkpatch.pl clean Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-04-01libertas: convert sleep/wake config direct commandsHolger Schurig1-22/+10
Confirm sleep event: they come very regularly, eventually several times per second. Therefore we want to send the config command as fast as possible. The old code pre-set the command in priv->lbs_ps_confirm_sleep. However, the byte sequence to be sent to the hardware is the same for all interfaces. So this patch make this an extern structure, initialized at module load time. Config wake event: normal conversion to a direct command. However, I don't know how to trigger a "HOST AWAKE" event from the firmware, so this part is untested. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-04-01libertas: convert CMD_802_11_EEPROM_ACCESS to a direct commandHolger Schurig1-25/+0
Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-04-01libertas: convert CMD_802_11_MAC_ADDRESS to a direct commandHolger Schurig1-27/+0
* directly call lbs_cmd_with_response() * only overwrite priv->current_addr once the firmware call succeeded Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-03-27libertas: reduce debug outputHolger Schurig1-2/+2
This patch tries to make dmesg logs between different runs easier to compare by * removing the jiffies (use CONFIG_PRINTK_TIME if you need timing) * remove the line numbers, they change with each applied patch It also changes the deprecated __FUNCTION__ to __func__ to make checkpatch.pl happy. Signed-off-by: Holger Schurig <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>