summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas
AgeCommit message (Collapse)Author
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-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>
2008-04-16libertas: un-garbage various command structsHolger Schurig
Some command structs contain reserved or unused fields, which the driver send uninitialized down to 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-04-16libertas: convert libertas driver to use an event/cmdresp queueHolger Schurig
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 <hs4233@mail.mn-solutions.de> Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-14Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ehea/ehea_main.c drivers/net/wireless/iwlwifi/Kconfig drivers/net/wireless/rt2x00/rt61pci.c net/ipv4/inet_timewait_sock.c net/ipv6/raw.c net/mac80211/ieee80211_sta.c
2008-04-08libertas: remove lbs_get_fwversion()Holger Schurig
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>
2008-04-08libertas: move lbs_update_channel out of assoc.cHolger Schurig
... as it has nothing to do with pure association 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-04-08libertas: move association code from scan.c into assoc.cHolger Schurig
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>
2008-04-08libertas: move association code from join.c into scan.cHolger Schurig
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>
2008-04-07libertas: fix mode initialization problemHolger Schurig
After moving lbs_find_best_network_ssid() from scan.c to assoc.c gcc was able to deduce that new_mode might stay uninitialized. 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-04-02Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/s2io.c
2008-04-01libertas: don't depend on IEEE80211Holger Schurig
Runtime-wise we only need escape_ssid from the deprecated IEEE80211 subsystem. However, it's easy to provide our own copy. 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-04-01libertas: convert sleep/wake config direct commandsHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-01libertas: convert CMD_802_11_EEPROM_ACCESS to a direct commandHolger 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-04-01libertas: convert CMD_802_11_MAC_ADDRESS to a direct commandHolger Schurig
* directly call lbs_cmd_with_response() * only overwrite priv->current_addr once the firmware call succeeded 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-27libertas: reduce debug outputHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-27libertas: remove CMD_802_11_PWR_CFGHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-27libertas: kill useless #define LBS_MONITOR_OFF 0Holger 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-03-27libertas: fix spinlock recursion bugHolger Schurig
This fixes a bug detected by CONFIG_DEBUG_SPINLOCK: if_cs_get_int_status() is only called from lbs_thread(), via priv->hw_get_int_status. However, lbs_thread() has already taken the priv->driver_lock. So it's a fault to take the same lock again here. 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-25libertas: store rssi as an u32Holger Schurig
Don't store an (hardware base) u8 value in bss_descriptor, but just an unsigned int (RSSI is really unsigned). Compilers generate more efficent code for ints than for bytes. 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-25libertas: remove lots of unused stuffHolger Schurig
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>
2008-03-25libertas: misc power saving adjustsHolger Schurig
* 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>
2008-03-25libertas: convert GET_LOG to a direct commandHolger Schurig
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>
2008-03-25libertas: fix scheduling while atomic bug in CMD_MAC_CONTROLHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25libertas: make a handy lbs_cmd_async() commandHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25libertas: remove some unused commandsHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25libertas: rename packetfilter to mac_controlHolger Schurig
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 <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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-18Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/rt2x00/rt2x00dev.c net/8021q/vlan_dev.c
2008-03-13libertas: implement SSID scanning for SIOCSIWSCANHolger Schurig
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>
2008-03-11libertas: fix the 'compare command with itself' properlySebastian Siewior
|libertas: Invalid CMD_RESP 8012 to command 50! The special case got mixed up in 8a96df80b3. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06libertas: clean up scan.c, remove zeromac and bcastmacDavid Woodhouse
Should be purely cosmetic apart from the removal of the two pointless MAC addresses. 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 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: add LED control TLV to types.hDavid 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-03-05Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/mac80211/rc80211_pid_algo.c
2008-03-04libertas: compare the current command with responseSebastian Siewior
instead of with itself. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04libertas: fix sanity check on sequence number in command responseDavid Woodhouse
Slightly more useful if we compare it against the sequence number of the command we have outstanding, rather than comparing the reply with itself. Doh. Pointed out by Sebastian Siewior 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: rename/document scan_channelHolger Schurig
Rename last_scanned_channel to scan_channel, just so that a grep for struct bss_descriptor's last_scanned element doesn't show up so many positives. Also documented the variable and moved it to other scan related entries in lbs_private. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29libertas: make lbs_unset_basic_rate_flags() staticHolger Schurig
... by moving it into the file where it's sole user resides Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29libertas: make lbs_sync_channel() staticHolger Schurig
... by moving it into the file where it's sole user resides Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29libertas: make association debug output nicerHolger Schurig
This also fixes a bug where should_deauth_infrastructure() always returned 0. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> 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-02-03Spelling fixes: lenght->lengthPaulius Zaleckas
Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-01-31libertas: fix interrupt while removing driverHolger Schurig
Previously I've got an interrupt while removing the driver. 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> Signed-off-by: David S. Miller <davem@davemloft.net>