aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-03-15airo : Print of firmware versionmatthieu castet1-1/+1
For the firmware version 5.30.17 the log file shows: Firmware version 5.30.11 The variable softSubVer is binary. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Jose Alonso <joalonsof@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-15airo : fix printing status infomatthieu castet1-12/+23
For some status, reason is encoded in the low byte, but airo_print_status forgot tp mask low byte in status parsing. This make it only work when reason is 0. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-02airo: return from set_wep_key() when key length is zeroStanislaw Gruszka1-1/+2
Even if keylen == 0 is a bug and should not really happen, better avoid possibility of passing bad value to firmware. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-25Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller1-0/+1
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h drivers/net/wireless/rt2x00/rt2800pci.c
2010-02-15wireless: airo_cs build fixesRandy Dunlap1-0/+1
When WEXT_PRIV is not enabled, airo_cs has build errors. It needs to include net/iw_handler.h and it should select WEXT_PRIV, like the airo driver does. drivers/net/wireless/airo.c:7655: error: unknown field 'num_private' specified in initializer drivers/net/wireless/airo.c:7655: warning: initialization makes pointer from integer without a cast drivers/net/wireless/airo.c:7656: error: unknown field 'num_private_args' specified in initializer drivers/net/wireless/airo.c:7656: warning: excess elements in struct initializer drivers/net/wireless/airo.c:7656: warning: (near initialization for 'airo_handler_def') drivers/net/wireless/airo.c:7658: error: unknown field 'private' specified in initializer drivers/net/wireless/airo.c:7658: warning: initialization makes integer from pointer without a cast drivers/net/wireless/airo.c:7658: error: initializer element is not computable at load time drivers/net/wireless/airo.c:7658: error: (near initialization for 'airo_handler_def.num_standard') drivers/net/wireless/airo.c:7659: error: unknown field 'private_args' specified in initializer drivers/net/wireless/airo.c:7659: warning: initialization from incompatible pointer type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-12net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko1-1/+1
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-04Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller1-16/+18
2010-02-02airo: fix setting zero length WEP keyStanislaw Gruszka1-16/+18
Patch prevents call set_wep_key() with zero key length. That fix long standing regression since commit c0380693520b1a1e4f756799a0edc379378b462a "airo: clean up WEP key operations". Additionally print call trace when someone will try to use improper parameters, and remove key.len = 0 assignment, because it is in not possible code path. Reported-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu> Bisected-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu> Tested-by: Chris Siebenmann <cks@cs.toronto.edu> Cc: Dan Williams <dcbw@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-07drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan1-1/+1
Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section in every case. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-04airo: Fix integer overflow warningMichael Buesch1-1/+1
On BigEndian gcc complains: drivers/net/wireless/airo.c: In function ‘sniffing_mode’: drivers/net/wireless/airo.c:4809: warning: integer overflow in expression Fix this by doing the bitwise AND on the host-endian value. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-29Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-3/+2
2009-10-27airo : allow supend with card without power managementmatthieu castet1-1/+2
Some airo card don't support power Management [1]. Don't abort suspend with those cards. 00:06.0 Network controller: AIRONET Wireless Communications PC4800 (rev 01) Flags: medium devsel, IRQ 17 Memory at dffffe00 (32-bit, non-prefetchable) [size=128] I/O ports at d000 [size=128] I/O ports at cc00 [size=64] Kernel driver in use: airo Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27airo: Reorder tests, check bounds before elementRoel Kluin1-3/+2
Test whether index is within bounds before reading the element Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01wireless: convert drivers to netdev_tx_tStephen Hemminger1-3/+9
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>
2009-07-30Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-7/+6
Conflicts: drivers/net/wireless/iwlwifi/iwl-3945.h drivers/net/wireless/iwlwifi/iwl-tx.c drivers/net/wireless/iwlwifi/iwl3945-base.c
2009-07-27airo: Buffer overflowRoel Kluin1-7/+6
SSID_rid has space for only 3 ssids. txPowerLevels[i] is read before the bounds check for i Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-05net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy1-7/+7
This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-13net: use symbolic values for ndo_start_xmit() return codesPatrick McHardy1-3/+3
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>
2009-06-13net: fix network drivers ndo_start_xmit() return values (part 3)Patrick McHardy1-1/+2
net: fix network drivers ndo_start_xmit() return values (part 3) Fix up wireless drivers that return an errno value to qdisc_restart(), causing qdisc_restart() to print a warning an requeue/retransmit the skb. - airo: transmission not implemented for chip, intention is to free and abort - ipw2200: transmission not implemented for promiscous mode, intention is to drop - prism54: intention is to drop - wl3501_cs: intention appears to be to drop - zd1201: error counter indicates intention is to drop All drivers compile tested. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-20airo: fix airo_get_encode{,ext} buffer overflow like I mean it...John W. Linville1-9/+14
"airo: airo_get_encode{,ext} potential buffer overflow" was actually a no-op, due to an unrecognized type overflow in an assignment. Oddly, gcc only seems to tell me about it when using -Wextra...grrr... Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-11airo: airo_get_encode{,ext} potential buffer overflowJohn W. Linville1-2/+8
Feeding the return code of get_wep_key directly to the length parameter of memcpy is a bad idea since it could be -1... Reported-by: Eugene Teo <eugeneteo@kernel.sg> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-16airo: queue SIOCSIWAUTH-requested auth mode change for next commitDan Williams1-1/+1
Code was clearly wrong, plus callers expect the mode change to happen as soon as possible, not dropped on the floor until the next time some other config value changes and a commit happens. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds1-2/+0
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: wireless: remove duplicated .ndo_set_mac_address netfilter: xtables: fix IPv6 dependency in the cluster match tg3: Add GRO support. niu: Add GRO support. ucc_geth: Fix use-after-of_node_put() in ucc_geth_probe(). gianfar: Fix use-after-of_node_put() in gfar_of_init(). kernel: remove HIPQUAD() netpoll: store local and remote ip in net-endian netfilter: fix endian bug in conntrack printks dmascc: fix incomplete conversion to network_device_ops gso: Fix support for linear packets skbuff.h: fix missing kernel-doc ni5010: convert to net_device_ops
2009-03-31proc 2/2: remove struct proc_dir_entry::ownerAlexey Dobriyan1-1/+0
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy as correctly noted at bug #12454. Someone can lookup entry with NULL ->owner, thus not pinning enything, and release it later resulting in module refcount underflow. We can keep ->owner and supply it at registration time like ->proc_fops and ->data. But this leaves ->owner as easy-manipulative field (just one C assignment) and somebody will forget to unpin previous/pin current module when switching ->owner. ->proc_fops is declared as "const" which should give some thoughts. ->read_proc/->write_proc were just fixed to not require ->owner for protection. rmmod'ed directories will be empty and return "." and ".." -- no harm. And directories with tricky enough readdir and lookup shouldn't be modular. We definitely don't want such modular code. Removing ->owner will also make PDE smaller. So, let's nuke it. Kudos to Jeff Layton for reminding about this, let's say, oversight. http://bugzilla.kernel.org/show_bug.cgi?id=12454 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-03-29wireless: remove duplicated .ndo_set_mac_addressAlexander Beregalov1-2/+0
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21airo: convert to net_device_opsStephen Hemminger1-19/+44
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-05airo: reduce stack memory footprintFrank Seidel1-1/+6
Applying kernel janitors todos (reduce stack footprint where possible) to airo wireless driver. (Before 1124 bytes on i386, now 876) Signed-off-by: Frank Seidel <frank@f-seidel.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27airo: correct improper initialization of local variableJohn W. Linville1-1/+2
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-17drivers/net/wireless: fix sparse warnings: fix signednessHannes Eder1-1/+1
Fix this sparse warnings: drivers/net/wireless/airo.c:2102:21: warning: incorrect type in initializer (different signedness) drivers/net/wireless/airo.c:2126:21: warning: incorrect type in initializer (different signedness) drivers/net/wireless/airo.c:2167:21: warning: incorrect type in initializer (different signedness) drivers/net/wireless/airo.c:2191:21: warning: incorrect type in initializer (different signedness) Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17drivers/net/wireless: fix sparse warnings: symbol shadows an earlier oneHannes Eder1-3/+1
Impact: Move variable closer to usage resp. remove redundant variables resp. rename function scope variable. Fix this sparse warnings: drivers/net/wireless/airo.c:3840:29: warning: symbol 'i' shadows an earlier one drivers/net/wireless/airo.c:3751:13: originally declared here drivers/net/wireless/airo.c:3847:29: warning: symbol 'i' shadows an earlier one drivers/net/wireless/airo.c:3751:13: originally declared here drivers/net/wireless/airo.c:3861:21: warning: symbol 'i' shadows an earlier one drivers/net/wireless/airo.c:3751:13: originally declared here drivers/net/wireless/wavelan.c:43:13: warning: symbol 'irq' shadows an earlier one drivers/net/wireless/wavelan.p.h:692:17: originally declared here Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-29airo: remove useless #definesDan Williams1-6/+0
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29airo: clean up and clarify micinit()Dan Williams1-41/+41
Fix some endian issues too. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29airo: use __attribute__ ((packed)) not #pragmaDan Williams1-41/+49
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29airo: clean up WEP key operationsDan Williams1-56/+146
get_wep_key() and set_wep_key() combind both get/set of the actual WEP key and get/set of the transmit index into the same functions. Split those out so it's clearer what is going one where. Add error checking to WEP key hardware operations too. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29airo: simplify WEP index and capability checksDan Williams1-32/+27
Do the computation once at init time; don't ask the hardware every time. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29airo: re-arrange WPA capability checksDan Williams1-34/+32
The capability register has to be read for other (upcoming) stuff, so fold the WPA test function back into _init_airo_card() and move the netdevice registration stuff above it so that the netdevice has a name by the time the card's capabilities are printed out. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29airo: clean up and clarify interrupt-time task handlingDan Williams1-286/+327
Split each specific interrupt-time task out into its own function to make airo_interrupt() actually readable. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29wireless: Add channel/frequency conversions to ieee80211.hDavid Kilroy1-18/+7
Added mappings for FHSS, DSSS and OFDM channels - with macros to point HR DSSS and ERP to the DSSS mappings. Currently just static inline functions. Use the new functions in the older fullmac drivers. This eliminates a number of const static buffers and removes a couple of range checks that are now redundant. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Richard Farina <sidhayn@gmail.com> Acked-by: Jeroen Vreeken <pe1rxq@amsat.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-26drivers/net/wireless: fix sparse warnings: make symbols staticHannes Eder1-1/+1
Fix this sparse warnings: drivers/net/wireless/airo.c:3610:6: warning: symbol 'mpi_receive_802_11' was not declared. Should it be static? drivers/net/wireless/atmel.c:3183:6: warning: symbol 'atmel_join_bss' was not declared. Should it be static? drivers/net/wireless/ray_cs.c:831:5: warning: symbol 'ray_dev_init' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-10don't use net/ieee80211.hJohannes Berg1-26/+24
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>
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller1-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>
2008-10-31airo: Kill directly reference of netdev->privWang Chen1-85/+86
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. OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug", and I want to kill netdev->priv later, I decided to convert all the direct reference of netdev->priv first. In this driver, I don't simply use netdev_priv() to replace netdev->priv. The reason is: Pointer netdev->priv was changed in this driver, but it shouldn't. Because the memory was allocated when alloc_netdev() and netdev->priv should always point to that memory. So I use netdev->ml_priv to replace netdev->priv. After replacing, both ai and ai->wifidev->ml_priv point to the same memory. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27net: convert print_mac to %pMJohannes Berg1-12/+5
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>
2008-09-24wireless: Read scan flags correctly on x86-64David Kilroy1-1/+1
The SIOCSIWSCAN handler is passed data in an iw_point structure. Some drivers erronously use an iw_param instead. On 32 bit architectures the difference isn't noticed as the flags parameter tends to be the only one used by scan handlers and is at the same offset. On 64 bit architectures the pointer in the iw_point structure means the flag parameter is at different offsets in these structures. Thanks to Jean Tourrilhes for tracking this down for orinoco, and Pavel Roskin for confirming the fix and identifying other suspect handlers. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-22wireless: replace __FUNCTION__ with __func__Harvey Harrison1-8/+8
__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-06-27wireless: Small cleanupsPavel Machek1-23/+18
Small whitespace cleanups for wireless drivers Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-16wext: Emit event stream entries correctly when compat.David S. Miller1-15/+28
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-14airo: use simple_read_from_buffer()Akinobu Mita1-12/+3
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-10Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h
2008-06-04airo warning fixAndrew Morton1-1/+1
WARNING: space prohibited between function name and open parenthesis '(' #22: FILE: drivers/net/wireless/airo.c:2907: + while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) { total: 0 errors, 1 warnings, 8 lines checked ./patches/wireless-airo-waitbusy-wont-delay.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Dan Williams <dcbw@redhat.com> Cc: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>