summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap
Commit message (Collapse)AuthorAgeFilesLines
* headers: remove sched.h from interrupt.hAlexey Dobriyan2009-10-112-0/+2
| | | | | | | | After m68k's task_thread_info() doesn't refer to current, it's possible to remove sched.h from interrupt.h and not break m68k! Many thanks to Heiko Carstens for allowing this. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
* hostap: Revert a toxic part of the conversion to net_device_opsMartin Decky2009-09-141-1/+2
| | | | | | | | | | | | | | | As the hostap driver was converted to use net_device_ops, a mistake was made in hostap_main.c (commit 5ae4efbcd2611562a8b93596be034e63495706a5). Originally, the tx_queue_len was set to 0 for every other interface than HOSTAP_INTERFACE_MASTER, but the new fragment of code sets tx_queue_len to 0 only for HOSTAP_INTERFACE_MASTER. The opposite of the previous behavior makes the driver to drop all packets in AP mode. Change the way 0 is assigned to tx_queue_len according to the original logic. Signed-off-by: Martin Decky <martin@decky.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: convert drivers to netdev_tx_tStephen Hemminger2009-09-012-7/+14
| | | | | | | | | | | Mostly just simple conversions: * ray_cs had bogus return of NET_TX_LOCKED but driver was not using NETIF_F_LLTX * hostap and ipw2x00 had some code that returned value from a called function that also had to change to return netdev_tx_t Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hostap_cs: Enable shared interruptsLarry Finger2009-07-241-1/+2
| | | | | | | | | The hostap_cs driver is programmed for exclusive rather that shared interrupts. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-and-Tested-by: Jack Schneider <puck@dp-indexing.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net: convert remaining non-symbolic return values in ndo_start_xmit() functionsPatrick McHardy2009-07-051-21/+21
| | | | | | | | | | | | This patch converts the remaining occurences of raw return values to their symbolic counterparts in ndo_start_xmit() functions that were missed by the previous automatic conversion. Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero is changed to explicitly use NETDEV_TX_OK. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-06-151-4/+4
|\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/scsi/fcoe/fcoe.c net/core/drop_monitor.c net/core/net-traces.c
| * trivial: Kconfig: .ko is normally not included in module namesPavel Machek2009-06-121-4/+4
| | | | | | | | | | | | | | .ko is normally not included in Kconfig help, make it consistent. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | net: use symbolic values for ndo_start_xmit() return codesPatrick McHardy2009-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively. 0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases where its in direct proximity to one of the other values. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: remove needless (now buggy) & from dev->dev_addrJiri Pirko2009-05-171-1/+1
| | | | | | | | | | | | | | | | Patch fixes issues with dev->dev_addr changing from array to pointer. Hopefully there are no others. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | wireless: remove some (bogus?) 'may be used uninitialized' warningsJohn W. Linville2009-04-241-1/+1
|/ | | | | | | | | | | | | | net/mac80211/tx.c: In function ‘ieee80211_tx_h_select_key’: net/mac80211/tx.c:448: warning: ‘key’ may be used uninitialized in this function drivers/net/wireless/ath/ath9k/rc.c: In function ‘ath_rc_rate_getidx’: drivers/net/wireless/ath/ath9k/rc.c:815: warning: ‘nextindex’ may be used uninitialized in this function drivers/net/wireless/hostap/hostap_plx.c: In function ‘prism2_plx_probe’: drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_index’ may be used uninitialized in this function drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_offset’ may be used uninitialized in this function Signed-off-by: John W. Linville <linville@tuxdriver.com>
* hostap: convert to net_device_opsStephen Hemminger2009-03-212-18/+52
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hostap: convert to internal net_device_statsStephen Hemminger2009-03-215-33/+11
| | | | | | | Use pre-existing net_device_stats in network_device struct. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hostap: convert usage of net/ieee80211.h to linux/ieee80211.hDan Williams2009-02-2710-187/+164
| | | | | | | So that net/ieee80211.h can be made private to ipw2x00 in a follow-up. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: replace uses of __constant_{endian}Harvey Harrison2009-02-093-9/+9
| | | | | | | The base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* hostap: select required crypto bits in KconfigJohn W. Linville2008-12-051-0/+7
| | | | | | | This is fallout from moving the crypto stuff to the new lib80211 component. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* lib80211: consolidate crypt init routinesJohn W. Linville2008-11-212-93/+11
| | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* lib80211: absorb crypto bits from net/ieee80211John W. Linville2008-11-2112-115/+124
| | | | | | | | | These bits are shared already between ipw2x00 and hostap, and could probably be shared both more cleanly and with other drivers. This commit simply relocates the code to lib80211 and adjusts the drivers appropriately. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-11-181-1/+4
|\ | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
| * hostap: pad the skb->cb usage in lieu of a proper fixJohannes Berg2008-11-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like mac80211 did, this driver makes 'clever' use of skb->cb to pass information along with an skb as it is requeued from the virtual device to the physical wireless device. Unfortunately, that trick no longer works... Unlike mac80211, code complexity and driver apathy makes this hack the best option we have in the short run. Hopefully someone will eventually be motivated to code a proper fix before all the effected hardware dies. (Above text by me. Johannes officially disavows all knowledge of this hack. -- JWL) Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | drivers/net: Kill now superfluous ->last_rx stores.David S. Miller2008-11-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller <davem@davemloft.net>
* | wireless: avoid some net/ieee80211.h vs. linux/ieee80211.h conflictsJohn W. Linville2008-10-311-13/+0
| | | | | | | | | | | | There is quite a lot of overlap in definitions between these headers... Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | hostap: Fix sparse warningsLarry Finger2008-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compilation with the command "make C=2 CF="-D__CHECK_ENDIAN__" \ drivers/net/wireless/hostap/" yields the following warnings: CHECK drivers/net/wireless/hostap/hostap_info.c drivers/net/wireless/hostap/hostap_info.c:156:43: warning: incorrect type in argument 2 (different signedness) drivers/net/wireless/hostap/hostap_info.c:156:43: expected unsigned long volatile *addr drivers/net/wireless/hostap/hostap_info.c:156:43: got long *<noident> drivers/net/wireless/hostap/hostap_info.c:294:44: warning: incorrect type in argument 2 (different signedness) drivers/net/wireless/hostap/hostap_info.c:294:44: expected unsigned long volatile *addr drivers/net/wireless/hostap/hostap_info.c:294:44: got long *<noident> drivers/net/wireless/hostap/hostap_info.c:487:12: warning: incorrect type in argument 2 (different signedness) drivers/net/wireless/hostap/hostap_info.c:487:12: expected unsigned long volatile *addr drivers/net/wireless/hostap/hostap_info.c:487:12: got long *<noident> drivers/net/wireless/hostap/hostap_info.c:491:12: warning: incorrect type in argument 2 (different signedness) drivers/net/wireless/hostap/hostap_info.c:491:12: expected unsigned long volatile *addr drivers/net/wireless/hostap/hostap_info.c:491:12: got long *<noident> The warnings are fixed with the following compile-tested fix: Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | pci: use pci_ioremap_bar() in drivers/netArjan van de Ven2008-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | Use the newly introduced pci_ioremap_bar() function in drivers/net. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | net: convert print_mac to %pMJohannes Berg2008-10-278-260/+138
|/ | | | | | | | | | | | 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>
* pcmcia: remove unused argument to pcmcia_parse_tuple()Dominik Brodowski2008-08-311-1/+1
| | | | | | | | | | Since we're just parsing the tuple being passed to this function, we don't need any device-specific information. Also, remove the call to pcmcia_validate_cis() from pcmciamtd.c, since it is already called by the PCMCIA core. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_SUCCESSDominik Brodowski2008-08-231-11/+11
| | | | | | | | | Instead of using own error or success codes, the PCMCIA code should rely on the generic return values. Therefore, replace all occurrences of CS_SUCCESS with 0. CC: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: pcmcia_config_loop() improvement by passing vccDominik Brodowski2008-08-231-19/+4
| | | | | | | | By passing the current Vcc setting to the pcmcia_config_loop callback function, we can remove pcmcia_get_configuration_info() calls from many drivers. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: pcmcia_config_loop() default CIS entry handlingDominik Brodowski2008-08-231-13/+11
| | | | | | | Many drivers use the default CIS entry within their pcmcia_config_loop() callback function. Therefore, factor the default CIS entry handling out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: pcmcia_config_loop() ConfigIndex unificationDominik Brodowski2008-08-231-1/+0
| | | | | | | Almost all drivers set p_dev->conf.ConfigIndex to cfg->index in the pcmcia_config_loop() callback function. Therefore, factor it out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use pcmcia_loop_config in net pcmcia driversDominik Brodowski2008-08-231-119/+108
| | | | | | | Use the config loop helper in (some) net pcmcia drivers. CC: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep.David S. Miller2008-07-221-0/+3
| | | | | | | | | The new address list lock needs to handle the same device layering issues that the _xmit_lock one does. This integrates work done by Patrick McHardy. Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: Allocate multiple queues for TX.David S. Miller2008-07-171-2/+4
| | | | | | | | | | | | | | | | alloc_netdev_mq() now allocates an array of netdev_queue structures for TX, based upon the queue_count argument. Furthermore, all accesses to the TX queues are now vectored through the netdev_get_tx_queue() and netdev_for_each_tx_queue() interfaces. This makes it easy to grep the tree for all things that want to get to a TX queue of a net device. Problem spots which are not really multiqueue aware yet, and only work with one queue, can easily be spotted by grepping for all netdev_get_tx_queue() calls that pass in a zero index. Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: Move _xmit_lock and xmit_lock_owner into netdev_queue.David S. Miller2008-07-081-1/+11
| | | | | | | Accesses are mostly structured such that when there are multiple TX queues the code transformations will be a little bit simpler. Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-07-081-4/+8
|\ | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-3945.c net/mac80211/mlme.c
| * hostap_cs: correct poor NULL checks in suspend/resume routinesJohn W. Linville2008-07-071-4/+8
| | | | | | | | | | | | | | | | This corrects this kernel.org bug: http://bugzilla.kernel.org/show_bug.cgi?id=9701 Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | hostap: don't compile prism2_suspend() for hostap_pci without CONFIG_PMPavel Roskin2008-07-081-2/+2
| | | | | | | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵David S. Miller2008-07-055-17/+16
|\| | | | | | | | | | | | | | | | | | | | | 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
| * hostap: fix sparse warningsPavel Roskin2008-06-305-16/+15
| | | | | | | | | | | | | | | | | | Rewrite AID calculation in handle_pspoll() to avoid truncating bits. Make hostap_80211_header_parse() static, don't export it. Avoid shadowing variables. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * hostap: don't report useless WDS frames by defaultPavel Roskin2008-06-301-1/+1
| | | | | | | | | | | | | | | | DEBUG_EXTRA is reported to the kernel log by default, but DEBUG_EXTRA2 is not. Unrelated WDS frames pollute the log unnecessarily. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | hostap: use radiotap headers by defaultPavel Roskin2008-06-301-0/+1
| | | | | | | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | hostap: add radiotap support in monitor modePavel Roskin2008-06-303-2/+38
| | | | | | | | | | | | | | Provide MAC time, rate, channel, signal and noise. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | hostap: don't skip any headers in hostap_80211_header_parse()Pavel Roskin2008-06-301-19/+1
| | | | | | | | | | | | | | | | | | | | Don't try to skip any headers in hostap_80211_header_parse(). We never use that function for interfaces affected by local->monitor_type. Both the master and the AP interface receive 802.11 frames without any additional headers. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wext: Emit event stream entries correctly when compat.David S. Miller2008-06-163-44/+49
|/ | | | | | | | | | | | | | | | | | | | | | 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>
* net: Eliminate flush_scheduled_work() calls while RTNL is held.David S. Miller2008-06-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | If the RTNL is held when we invoke flush_scheduled_work() we could deadlock. One such case is linkwatch, it is a work struct which tries to grab the RTNL semaphore. The most common case are net driver ->stop() methods. The simplest conversion is to instead use cancel_{delayed_}work_sync() explicitly on the various work struct the driver uses. This is an OK transformation because these work structs are doing things like resetting the chip, restarting link negotiation, and so forth. And if we're bringing down the device, we're about to turn the chip off and reset it anways. So if we cancel a pending work event, that's fine here. Some drivers were working around this deadlock by using a msleep() polling loop of some sort, and those cases are converted to instead use cancel_{delayed_}work_sync() as well. Signed-off-by: David S. Miller <davem@davemloft.net>
* hostap_cs: add ID for Conceptronic CON11CProPavel Roskin2008-05-201-0/+1
| | | | | | | Reported by Santiago Garcia Mantinan <hostap@manty.net> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* hostap: fix "registers" registration in procfsMathieu Chouquet-Stringer2008-05-151-5/+4
| | | | | | | | | | The "registers" entry was incorrectly created in the procfs root instead of the device specific directory. Move "registers" registration immediately after the containing procfs directory is created. Signed-off-by: Mathieu Chouquet-Stringer <mchouque@free.fr> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [NET]: Undo code bloat in hot paths due to print_mac().David S. Miller2008-04-083-94/+155
| | | | | | | | | | | | | | | | | If print_mac() is used inside of a pr_debug() the compiler can't see that the call is redundant so still performs it even of pr_debug() ends up being a nop. So don't use print_mac() in such cases in hot code paths, use MAC_FMT et al. instead. As noted by Joe Perches, pr_debug() could be modified to handle this better, but that is a change to an interface used by the entire kernel and thus needs to be validated carefully. This here is thus the less risky fix for 2.6.25 Signed-off-by: David S. Miller <davem@davemloft.net>
* Add another Prism2 card to hostapMarcin Juszkiewicz2008-01-311-0/+3
| | | | | | | | | | | | | | Card reported by Ångström user: http://bugs.openembedded.net/show_bug.cgi?id=3236 Socket 1: product info: "Wireless LAN", "11Mbps PC Card", "Version 01.02", "" manfid: 0x0156, 0x0002 function: 6 (network) Signed-off-by: Marcin Juszkiewicz <openembedded@haerwu.biz> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hostap_80211.h: remove duplicate prototypeMichal Piotrowski2008-01-311-5/+0
| | | | | | | | | | | | | There were two identical prototypes for hostap_80211_rx() in drivers/net/wireless/hostap/hostap_80211.h. This patch fixes kernel Bugzilla #8930. Reported by Christoph Burger-Scheidlin. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hostap_cs: don't match revisions in presense of the MAC chip namePavel Roskin2008-01-281-9/+6
| | | | | | | | | | | | If the third PCMCIA ID string specifies the MAC chip, the fourth ID string doesn't need to be matched. Even if it's different, it will be compatible with the driver. This ensures that other different revisions of the card will be supported. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>