summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/wext.c
Commit message (Collapse)AuthorAgeFilesLines
* libertas: convert to internal net_device_statsStephen Hemminger2009-03-211-1/+1
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* libertas: fix misuse of netdev_priv() and dev->ml_privKiran Divekar2009-02-261-36/+36
| | | | | | | | | | | | | | | | | The mesh and radiotap interfaces need to use the same private data as the main wifi interface. If the main wifi interface uses netdev_priv(), but the other interfaces ->ml_priv, there's no way to figure out where the private data actually is in the WEXT handlers and netdevice callbacks. So make everything use ->ml_priv. Fixes botched netdev_priv() conversion introduced by "netdevice libertas: Fix directly reference of netdev->priv", though admittedly libertas' use of ->priv was somewhat "special". Signed-off-by: Kiran Divekar <dkiran@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Tested-by: Chris Ball <cjb@laptop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* netdevice: safe convert to netdev_priv() #part-4Wang Chen2008-11-121-36/+36
| | | | | | | | | | | | | | | | | | We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* don't use net/ieee80211.hJohannes Berg2008-11-101-1/+0
| | | | | | | | | | | | 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 <johannes@sipsolutions.net> Acked-by: Dan Williams <dcbw@redhat.com> [airo, libertas] Acked-by: Pavel Roskin <proski@gnu.org> [orinoco] Acked-by: David Kilroy <kilroyd@googlemail.com> [orinoco] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: use individual buffers for printing ssid valuesJohn W. Linville2008-10-311-1/+2
| | | | | | Also change escape_ssid to print_ssid to match print_mac semantics. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: consolidate on a single escape_essid implementationJohn W. Linville2008-10-311-1/+2
| | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net: convert print_mac to %pMJohannes Berg2008-10-271-2/+1
| | | | | | | | | | | | 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 <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* libertas: Improvements on automatic tx power control via SIOCSIWTXPOW (fixups)Anna Neal2008-09-301-0/+12
| | | | | | | | | | | 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 <anna@cozybit.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>
* libertas: Reduce the WPA key installation time (fixups)Javier Cardona2008-09-241-3/+23
| | | | | | | | | This patch addresses comments from Dan Williams about the patch committed as "libertas: Reduce the WPA key installation time." Signed-off-by: Javier Cardona <javier@cozybit.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: correct "limited range of data type" warningJohn W. Linville2008-09-151-3/+2
| | | | | | | | | CC [M] drivers/net/wireless/libertas/wext.o drivers/net/wireless/libertas/wext.c: In function ‘lbs_get_rts’: drivers/net/wireless/libertas/wext.c:307: warning: comparison is always false due to limited range of data type Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: Reduce the WPA key installation time.Javier Cardona2008-09-151-3/+13
| | | | | | | | | | | | | | | | | WPA requires that the PTK is installed immediately after the 4-way handshake in order to properly decrypt the subsequent incoming EAPOL-GTK frame. If the PTK is not enabled by the time the EAPOL-GTK frame arrives, the frame is dropped and the supplicant does not receive the group key. This will happen with fast Access Points that send the EAPOL-GTK frame before the suplicant has successfully installed and enabled the PTK. To mitigate this situation, this patch simplifies and accelerates the SIOCSIWENCODEEXT execution. This patch resolves OLPC ticket 7825 (http://dev.laptop.org/ticket/7825) Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert SNMP_MIB to a direct commandDan Williams2008-09-151-67/+74
| | | | | | | And support setting both long and short retries independently. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: Improvements on automatic tx power control via SIOCSIWTXPOW.Anna Neal2008-09-111-2/+29
| | | | | | | | | | | | 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 <anna@cozybit.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert adhoc operations to direct commandsDan Williams2008-08-291-1/+1
| | | | | | | with fixes for v9 and later firmware too. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert CMD_802_11_RADIO_CONTROL to a direct commandDan Williams2008-08-291-38/+31
| | | | | | | | and return errors for operations like join & scan that aren't possible when the radio is turned off. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert CMD_802_11_DEAUTHENTICATE to a direct commandDan Williams2008-08-291-1/+3
| | | | | | | | and remove DISASSOCIATE because it's not in any of the specs and has never been used. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert CMD_802_11_RF_TX_POWER to a direct commandDan Williams2008-08-291-44/+39
| | | | | | | | 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 <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: rate adaptation configuration via iwconfig.Javier Cardona2008-06-031-9/+18
| | | | | | | | | | | | | 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 <javier@cozybit.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: Extend MESH_CONFIG command to access non-volatile configurationJavier Cardona2008-05-211-2/+3
| | | | | | | | | | | | | | | 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 <javier@cozybit.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove lbs_get_fwversion()Holger Schurig2008-04-081-17/+0
| | | | | | | | It was used only at one place anyway. 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>
* libertas: move association code from scan.c into assoc.cHolger Schurig2008-04-081-0/+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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: move association code from join.c into scan.cHolger Schurig2008-04-081-1/+0
| | | | | | | | | | | | 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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove lots of unused stuffHolger Schurig2008-03-251-1/+1
| | | | | | | | | | 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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: misc power saving adjustsHolger Schurig2008-03-251-17/+7
| | | | | | | | | | | | | * 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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert GET_LOG to a direct commandHolger Schurig2008-03-251-6/+8
| | | | | | | | | | | | | | | | 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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: implement SSID scanning for SIOCSIWSCANHolger Schurig2008-03-131-0/+3
| | | | | | | | | | | | | | | After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported scanning for a specific SSID. However, wpa_supplicant is a possible user of this ioctl, so here is code that add's this. While passing, removed even more of the debugfs-based scanning. You can (and should) the SIOCSIWSCAN to ask for scans, so there is no need for proprietary interfaces for scanning. And, besides, the scan result couldn't be used further, e.g. not for associating. 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>
* libertas: always show firmware releaseHolger Schurig2008-01-281-11/+5
| | | | | | | | | 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>
* libertas: allow for PS mode to be disabled when firmware doesn't support itDavid Woodhouse2008-01-281-0/+7
| | | | | | | | | | Otherwise, we go into an endless busy loop trying to enable PS mode when the command queue is empty, dealing with the error response, and then trying to enable PS mode again because the command queue is empty.... it doesn't really save much power. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: pass channel argument directly to lbs_mesh_config()David Woodhouse2008-01-281-4/+3
| | | | | | | | 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>
* libertas: allow setting channel on mshX deviceDavid Woodhouse2008-01-281-1/+52
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: allow get/set SSID on mshX deviceDavid Woodhouse2008-01-281-2/+50
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert DATA_RATE to a direct commandDan Williams2008-01-281-6/+3
| | | | | | 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>
* libertas: kill struct lbs_adapterDavid Woodhouse2008-01-281-203/+169
| | | | | | | | 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>
* libertas: Don't set IW_ENCODE_NOKEY when returning WEP keys.David Woodhouse2008-01-281-10/+1
| | | | | | | 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>
* libertas: remove arbitrary typedefsHolger Schurig2008-01-281-80/+84
| | | | | | | | | | | | 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>
* libertas: separate mesh connectivity from that of the main interfaceBrajesh Dave2008-01-281-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libertas: move to uniform lbs_/LBS_ namespaceHolger Schurig2008-01-281-238/+238
| | | | | | | | | | | | | | | | | | 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>
* wireless: checkpatch cleanupsJeff Garzik2008-01-281-4/+2
| | | | Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* netdev: ARRAY_SIZE() cleanupsAlejandro Martinez Ruiz2008-01-281-8/+3
| | | | | | | Convert array size calculations to use ARRAY_SIZE(). Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* wireless: fix '!x & y' typo'sRoel Kluin2008-01-281-1/+1
| | | | | | | Fix priority mistakes similar to '!x & y' Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: move wlan_*_association_work from header to c fileHolger Schurig2008-01-281-16/+34
| | | | | | | | | | | Move wlan_postpone_association_work() and wlan_cancel_association_work() from a assoc.h file to the sole user, into wext.c. Renamed those two functions to to libertas_XXX as well. 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>
* drivers/net/wireless: Add missing "space"Joe Perches2007-11-291-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: let get nick return what set nick has setHolger Schurig2007-10-101-27/+7
| | | | | | | | | | | Make the get-nickname wireless extension actually work. Before this patch, I could do "iwconfig eth1 nick BLAH" but "iwconfig eth1" would have still showed "MRVL-USB8388" to me. Hey, and that was wrong anyway, I'm on a CF card, not on USB :-) 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>
* [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches2007-10-101-2/+3
| | | | | | | This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/: all drivers/net/ cleanup with ARRAY_SIZEDenis Cheng2007-10-101-2/+2
| | | | | Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libertas: fix sparse-reported problemsDan Williams2007-10-101-4/+4
| | | | | | | | A few fields being converted to the wrong sized type, and a few missed endian conversions. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: fix a few wext abuses...Jean Tourrilhes2007-10-101-93/+27
| | | | | | | | | | | | | | | o SIOCGIWNAME is not designed to return the version number of the driver. On the other hand, you are free to abuse SIOCGIWNICKN for that purpose. o Don't attempt to fix the WE19/WE20 transition in the driver, because your fixes are bogus, and redundant with the code in the kernel (you may endup with +2, you can't read 32 char ESSID...). o In SIOCSIWTXPOW, if you specified in iwrange that you want dBm, you should only get dBm, which allow to reduce code bloat. Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: remove adapter->txrateHolger Schurig2007-10-101-1/+1
| | | | | | | | The value of txrate was only set by a CMD_802_11_TX_RATE_QUERY command, but there was no code in the driver that ever issued this command. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: fix WEXT quality reportingDan Williams2007-10-101-1/+1
| | | | | | | Found by Ronak and others at Marvell. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: make more functions static & remove unused functionsHolger Schurig2007-10-101-1/+1
| | | | | | | | | | | Some functions where declared in header files, but used only once. They are now static functions. After doing this, I found out that some functions weren't used at all. I removed this dead code. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>