aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas
AgeCommit message (Collapse)Author
2008-08-22wireless: replace __FUNCTION__ with __func__Harvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-22libertas: add sysfs hooks to update boot2 and persistent firmwareBrian Cavagnolo
To use these features, copy the boot2 and firmware images to /lib/firmware and: echo <boot2_image_name> > /sys/class/net/ethX/lbs_flash_boot2 echo <firmware_image_name> > /sys/class/net/ethX/lbs_flash_fw Signed-off-by: Brian Cavagnolo <brian@cozybit.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-22libertas: support boot commands to write persistent firmware and bootloaderBrian Cavagnolo
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 <brian@cozybit.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-01libertas: only enable rtap with mesh firmwareDan Williams
Since only mesh-enabled firmware has the CMD_802_11_MONITOR_MODE on which the rtap functionality depends, only expose the rtap functionality when mesh is also available. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-29libertas: check bounds and only use decimal for sysfs persistent features.Brian Cavagnolo
Some persistent settings were using hex and others decimal. In some cases, values were set in hex but reported in decimal. Confusing. Signed-off-by: Brian Cavagnolo <brian@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: Documentation/powerpc/booting-without-of.txt drivers/atm/Makefile drivers/net/fs_enet/fs_enet-main.c drivers/pci/pci-acpi.c net/8021q/vlan.c net/iucv/iucv.c
2008-07-15mmc,sdio: helper function for transfer paddingPierre Ossman
There are a lot of crappy controllers out there that cannot handle all the request sizes that the MMC/SD/SDIO specifications require. In case the card driver can pad the data to overcome the problems, this commit adds a helper that calculates how much that padding should be. A corresponding helper is also added for SDIO, but it can also deal with all the complexities of splitting up a large transfer efficiently. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15netdev: Do not use TX lock to protect address lists.David S. Miller
Now that we have a specific lock to protect the network device unicast and multicast lists, remove extraneous grabs of the TX lock in cases where the code only needs address list protection. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-15netdev: Add netdev->addr_list_lock protection.David S. Miller
Add netif_addr_{lock,unlock}{,_bh}() helpers. Use them to protect operations that operate on or read the network device unicast and multicast address lists. Also use them in cases where the code simply wants to block calls into the driver's ->set_rx_mode() and ->set_multicast_list() methods. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-14Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/netfilter/nf_conntrack_proto_tcp.c
2008-07-14Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitDavid Woodhouse
Conflicts: sound/pci/Kconfig
2008-07-10libertas: treat firmware data as constDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-09libertas: fix memory alignment problems on the blackfinIhar Hrachyshka
Fixing unaligned memory access on the blackfin architecture. Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@promwad.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-05Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wan/hdlc_fr.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl3945-base.c
2008-07-02libertas: support USB persistence on suspend/resume (resend)andrey@cozybit.com
Handle .reset_resume() so that libertas can survive suspend/resume without reloading the firmware. Signed-off-by: Andrey Yurovsky <andrey@cozybit.com> Acked-by: Deepak Saxena <dsaxena@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-16wext: Emit event stream entries correctly when compat.David S. Miller
Three major portions to this change: 1) Add IW_EV_COMPAT_LCP_LEN, IW_EV_COMPAT_POINT_OFF, and IW_EV_COMPAT_POINT_LEN helper defines. 2) Delete iw_stream_check_add_*(), they are unused. 3) Add iw_request_info argument to iwe_stream_add_*(), and use it to size the event and pointer lengths correctly depending upon whether IW_REQUEST_FLAG_COMPAT is set or not. 4) The mechanical transformations to the drivers and wireless stack bits to get the iw_request_info passed down into the routines modified in #3. Also, explicit references to IW_EV_LCP_LEN are replaced with iwe_stream_lcp_len(info). With a lot of help and bug fixes from Masakazu Mokuno. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-14libertas: rename some registers to clarify their meaningHolger Schurig
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-06-14libertas: check for old, unsupported hardwareHolger Schurig
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-06-14libertas: document register meaningsHolger Schurig
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-06-14libertas: fix interrupt issueHolger Schurig
This helps against lost interrupts and aids in debugging this. 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-06-10Merge branch 'master' of ↵David S. Miller
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-10Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/ps3_gelic_wireless.c drivers/net/wireless/libertas/main.c
2008-06-09libertas: fix sleep confirmationHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-04libertas: fix command size for CMD_802_11_SUBSCRIBE_EVENTHolger Schurig
The size was two small by two bytes. Signed-off-by: Holger Schurig Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03libertas: unify various CF-related definesHolger Schurig
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03libertas: fix compact flash interrupt handlingHolger Schurig
The old code misbehaved because it polled card status and always called the "tx over" code-path. This also fixes a hard lockup by not allowing and card interrupts while transferring a TX frame or a command into the card. 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-06-03libertas: rate adaptation configuration via iwconfig.Javier Cardona
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>
2008-06-03libertas: before sleeping, check for a command resultHolger Schurig
If we don't check for a command response early, but rather sleep, then we might sleep despite an already-received command response. This will lead to a command-timeout. 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-06-03libertas: use lbs_pr_XX instead of printkHolger Schurig
... because lbs_pr_XXX prefixes all messages with "libertas: " 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-06-03libertas: speeds up downloading of CF firmwareHolger Schurig
Keep the timeout the same (1000*500 == 100000 * 5), but take shorter naps. Makes downloading the firmware slightly faster. 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-06-03libertas: don't spin_unlock_irq() twiceHolger Schurig
priv->driver_lock has already been unlocked some lines above. This patch fixes the sparse warning: drivers/net/wireless/libertas/main.c:792:6: warning: context problem in 'lbs_thread': '_spin_unlock_irq' expected different context drivers/net/wireless/libertas/main.c:792:6: context 'lock': wanted >= 1, got 0 Signed-of-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-06-03libertas: provide reset_card() callback on OLPCDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-25Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/cpmac.c net/mac80211/mlme.c
2008-05-21libertas: reduce command retry timeHolger Schurig
[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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21libertas: sysfs interface for accessing default mesh channelJavier Cardona
This will create the following entry: /sys/class/net/mshX -- boot_options | |-- ... | `-- channel ... ... which I overlooked on my previous patch. 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>
2008-05-21libertas: Add reset_card() callback to hardware driverDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21libertas: sysfs interface for accessing non-volatile configurationJavier Cardona
This will create the following sysfs directories: /sys/class/net/mshX ... |-- boot_options | |-- bootflag | `-- boottime ... |-- mesh_ie | |-- capability | |-- mesh_id | |-- metric_id | `-- protocol_id 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>
2008-05-21libertas: Extend MESH_CONFIG command to access non-volatile configurationJavier Cardona
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>
2008-05-21libertas: fix multicast filtering on eth and msh interfacesDavid Woodhouse
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 <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21libertas: Increase priority of 'unknown command' warningsDavid Woodhouse
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 <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-20libertas: Fix ethtool statisticsDavid Woodhouse
Fix various problems: - We converted MESH_ACCESS to a direct command but missed this caller. - We were trying to access mesh stats even on meshless firmware. - We should really zero the buffer if something goes wrong. 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-05-16wireless: Create 'device' symlink in sysfsMasakazu Mokuno
Some network interfaces of the wireless drivers lack the 'device' symlink in sysfs. This patch lets the drivers create the links. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-16libertas: fix command timeout after firmware failureBrian Cavagnolo
This is a fix for OLPC ticket #6586: "SCAN command fails, timer doesn't fire". In fact, the timer was firing; the problem was that the dnld_sent state variable was not being updated after the timer expired, so lbs_execute_next_command was not being called. Signed-off-by: Brian Cavagnolo <brian@cozybit.com> 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>
2008-05-14libertas: remove lbs_get_data_rate()Holger Schurig
lbs_get_data_rate() gets called, but no-one uses it's result. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07libertas: allow removal of card at any timeHolger Schurig
This fixes several problems I had: * when removing the card while the card was scanning or associtating, it could happen that destroy_workqueue() stuck and didn't return. * make sure the command function doesn't run while we remove the list of pending commands * for still unknown reason, I had calls to lbs_stop_card() with priv==NULL 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-05-07libertas: make some functions voidHolger Schurig
They don't return anything meaningfull and no-one cares about their results. 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-05-07libertas: debug output tweaks for lbs_threadHolger Schurig
* make debug output match the variable name * always report that lbs_remove_rtap() has has been exited 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-05-01Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
2008-04-30libertas: fix use-before-check violationHolger Schurig
According to Coverity (kudo's to Adrian Bunk), we had one use-before-check bug in libe libertas driver. This patch fixes this issue. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-29wireless: use get/put_unaligned_* helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Michael Buesch <mb@bu3sch.de> Cc: Daniel Drake <dsd@gentoo.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>