aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/orinoco
AgeCommit message (Collapse)Author
2009-04-16orinoco: correct timeout logic in __orinoco_hw_set_tkip_key()Pavel Roskin
If the value read from HERMES_RID_TXQUEUEEMPTY becomes 0 after exactly 100 readings, we wrongly consider it a timeout. Rewrite the clever while loop as a for loop that does the right thing and looks simpler. Reported by Juha Leppanen <juha_motorsportcom@luukku.com> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16orinoco: firmware: consistently compile out fw cache support if not requestedAndrey Borzenkov
Currently part of support for FW caching is unconditionally compiled in even if it is never used. Consistently remove caching support if not requested by user. Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27orinoco: prevent accessing memory outside the firmware imageDavid Kilroy
Do this by indicating the end of the appropriate regions of memory. Note that MAX_PDA_SIZE should only apply to the PDA block read from flash/EEPROM, and has been erronously applied to the pdr elements. Remove the macro, and use the actual PDA size passed down by the caller. We also fix up some of the types used, marking as much as possible const, and using void* for the end pointers. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27orinoco: validate firmware headerDavid Kilroy
Check the Agere firmware headers for validity before attempting to download it. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-25Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/orinoco/orinoco.c
2009-02-23orinoco: do not resgister NULL pm_notifier functionAndrey Borzenkov
With DEBUG_NOTIFIERS it results in [11330.890966] WARNING: at /home/bor/src/linux-git/kernel/notifier.c:88 notifier_call_chain+0x91/0xa0() [11330.890977] Hardware name: PORTEGE 4000 [11330.890983] Invalid notifier called! ... Without DEBUG_NOTIFIERS it most likely crashes on NULL pointer. Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Acked-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: Storage class should be before const qualifierTobias Klauser
The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: hermes doesn't need to be a separate moduleDavid Kilroy
Just compile it into the orinoco module. If we merge USB support, the module can then be split as appropriate. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: hermes_dld does not need to be a moduleDavid Kilroy
Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: Move WEXT handlers into a separate fileDavid Kilroy
No functional change. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: Move hardware functions into separate fileDavid Kilroy
No functional change. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: Add hardware function to set multicast modeDavid Kilroy
No functional change. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: Use accessor functions for bitrate tablesDavid Kilroy
... when used by the WEXT ioctl functions. This will allow us to separate the card specific stuff from the WEXT code. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: Move firmware handling into a separate fileDavid Kilroy
No functional change. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13orinoco: Move MIC helpers into new fileDavid Kilroy
No functional change. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: Move scan helpers to a separate fileDavid Kilroy
No functional change. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: use orinoco_private instead of net_device in scan helperDavid Kilroy
This makes the interface to the scan helpers consistent, so we can split them out. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: Rename orinoco.cDavid Kilroy
So that we can split up the file and still produce a module named orinoco.o. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: Fix interesting checkpatch errorsDavid Kilroy
ERROR: "foo * bar" should be "foo *bar" ERROR: do not initialise statics to 0 or NULL WARNING: printk() should include KERN_ facility level WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: keep line length below 80 charactersDavid Kilroy
Remove most checkpatch warnings of the type WARNING: line over 80 characters Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: remove unnecessary bracesDavid Kilroy
Remove the following checkpatch warnings WARNING: braces {} are not necessary for any arm of this statement WARNING: braces {} are not necessary for single statement blocks Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: spaces in parenthesised expressionsDavid Kilroy
Remove checkpatch warnings of the following type: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that '!' (ctx:BxW) ERROR: space required before the open parenthesis '(' ERROR: space required before the open brace '{' Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11orinoco: address leading and trailing whitespaceDavid Kilroy
Remove the following checkpatch errors from orinoco.c ERROR: trailing whitespace ERROR: code indent should use tabs where possible WARNING: suspect code indent for conditional statements Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09wireless: replace uses of __constant_{endian}Harvey Harrison
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>
2009-02-09orinoco: checkpatch cleanupAndrey Borzenkov
Fix errors and obvious warnings reported by checkpatch in all files except orinoco.c. Orinoco.c is part of different patch series of Dave. Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29orinoco: trivial cleanup in alloc_orinocodevAndrey Borzenkov
Remove extra space; remove redundant cast Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29orinoco: convert to struct net_device_opsAndrey Borzenkov
No functional changes; use new kernel interface for netdev methods. Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29Move orinoco Kconfig entries into drivers/net/wireless/orinoco/KconfigAndrey Borzenkov
Since driver now lives in separate subdirectory, move Kconfig entries in own file so they can be tweaked indepndently. It complements "orinoco: Move sources to a subdirectory". Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29orinoco: Remove unused variable rx_dataDavid Kilroy
Probably something leftover from experimentation with tasklets. Now the structure declaration orinoco_rx_data can be relocated to orinoco.c Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29wireless: Add channel/frequency conversions to ieee80211.hDavid Kilroy
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>
2009-01-22orinoco: use KERN_DEBUG for link status messagesPavel Roskin
KERN_INFO is too "loud" for messages that are generated by the ordinary events, such as accociation. Use of KERN_DEBUG is consistent with mac80211. Suggested by Michael Gilbert <michael.s.gilbert@gmail.com> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-22orinoco: move kmalloc(..., GFP_KERNEL) outside spinlock in ↵Andrey Borzenkov
orinoco_ioctl_set_genie [ 56.923623] BUG: sleeping function called from invalid context at /home/bor/src/linux-git/mm/slub.c:1599 [ 56.923644] in_atomic(): 0, irqs_disabled(): 1, pid: 3031, name: wpa_supplicant [ 56.923656] 2 locks held by wpa_supplicant/3031: [ 56.923662] #0: (rtnl_mutex){--..}, at: [<c02abd1f>] rtnl_lock+0xf/0x20 [ 56.923703] #1: (&priv->lock){++..}, at: [<dfc840c2>] orinoco_ioctl_set_genie+0x52/0x130 [orinoco] [ 56.923782] irq event stamp: 910 [ 56.923788] hardirqs last enabled at (909): [<c01957db>] __kmalloc+0x7b/0x140 [ 56.923820] hardirqs last disabled at (910): [<c0309419>] _spin_lock_irqsave+0x19/0x80 [ 56.923847] softirqs last enabled at (880): [<c0124f54>] __do_softirq+0xc4/0x110 [ 56.923865] softirqs last disabled at (871): [<c01049ae>] do_softirq+0x8e/0xe0 [ 56.923895] Pid: 3031, comm: wpa_supplicant Not tainted 2.6.29-rc2-1avb #1 [ 56.923905] Call Trace: [ 56.923919] [<c01049ae>] ? do_softirq+0x8e/0xe0 [ 56.923941] [<c011ad12>] __might_sleep+0xd2/0x100 [ 56.923952] [<c0195837>] __kmalloc+0xd7/0x140 [ 56.923963] [<c030946a>] ? _spin_lock_irqsave+0x6a/0x80 [ 56.923981] [<dfc840e9>] ? orinoco_ioctl_set_genie+0x79/0x130 [orinoco] [ 56.923999] [<dfc840c2>] ? orinoco_ioctl_set_genie+0x52/0x130 [orinoco] [ 56.924017] [<dfc840e9>] orinoco_ioctl_set_genie+0x79/0x130 [orinoco] [ 56.924036] [<c0209325>] ? copy_from_user+0x35/0x130 [ 56.924061] [<c02ffd96>] ioctl_standard_call+0x196/0x380 [ 56.924085] [<c029f945>] ? __dev_get_by_name+0x85/0xb0 [ 56.924096] [<c02ff88f>] wext_handle_ioctl+0x14f/0x230 [ 56.924113] [<dfc84070>] ? orinoco_ioctl_set_genie+0x0/0x130 [orinoco] [ 56.924132] [<c02a3da5>] dev_ioctl+0x495/0x570 [ 56.924155] [<c0293e05>] ? sys_sendto+0xa5/0xd0 [ 56.924171] [<c0142fe8>] ? mark_held_locks+0x48/0x90 [ 56.924183] [<c0292880>] ? sock_ioctl+0x0/0x280 [ 56.924193] [<c029297d>] sock_ioctl+0xfd/0x280 [ 56.924203] [<c0292880>] ? sock_ioctl+0x0/0x280 [ 56.924235] [<c01a51d0>] vfs_ioctl+0x20/0x80 [ 56.924246] [<c01a53e2>] do_vfs_ioctl+0x72/0x570 [ 56.924257] [<c0293e62>] ? sys_send+0x32/0x40 [ 56.924268] [<c02947c0>] ? sys_socketcall+0x1d0/0x2a0 [ 56.924280] [<c010339f>] ? sysenter_exit+0xf/0x16 [ 56.924292] [<c01a5919>] sys_ioctl+0x39/0x70 [ 56.924302] [<c0103371>] sysenter_do_call+0x12/0x31 Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-12orinoco_cs: add ID for ARtem Onair Comcard 11Pavel Roskin
Reported by Michael Jarosch <mitsch@riotmusic.de> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-12orinoco: take the driver lock in the rx taskletDavid Kilroy
Fix the warning reproduced below. We add to rx_list in interrupt context and remove elements in tasklet context. While removing elements we need to prevent the interrupt modifying the list. Note that "orinoco: Process bulk of receive interrupt in a tasklet" did not preserve locking semantics on what is now orinoco_rx. This patch reinstates the locking semantics and ensures it covers rx_list as well. This leads to additional cleanup required in free_orinocodev. [89479.105038] WARNING: at lib/list_debug.c:30 __list_add+0x8f/0xa0() [89479.105058] list_add corruption. prev->next should be next (dddb3568), but was cbc28978. (prev=dddb3568). [89479.106002] Pid: 15746, comm: X Not tainted 2.6.28-1avb #26 [89479.106020] Call Trace: [89479.106062] [<c011d3b0>] warn_slowpath+0x60/0x80 [89479.106104] [<c01073d0>] ? native_sched_clock+0x20/0x70 [89479.106194] [<c013d825>] ? lock_release_holdtime+0x35/0x200 [89479.106218] [<c018d9f0>] ? __slab_alloc+0x550/0x560 [89479.106254] [<c02f9c9d>] ? _spin_unlock+0x1d/0x20 [89479.106270] [<c018d9f0>] ? __slab_alloc+0x550/0x560 [89479.106302] [<c01ff2a7>] ? delay_tsc+0x17/0x24 [89479.106319] [<c01ff221>] ? __const_udelay+0x21/0x30 [89479.106376] [<dfa8b1e2>] ? hermes_bap_seek+0x112/0x1e0 [hermes] [89479.106396] [<c013d7eb>] ? trace_hardirqs_off+0xb/0x10 [89479.106418] [<c018e307>] ? __kmalloc_track_caller+0xb7/0x110 [89479.106448] [<c028eefc>] ? dev_alloc_skb+0x1c/0x30 [89479.106465] [<c028eefc>] ? dev_alloc_skb+0x1c/0x30 [89479.106482] [<c020e13f>] __list_add+0x8f/0xa0 [89479.106551] [<dfd0fcae>] orinoco_interrupt+0xcae/0x16c0 [orinoco] [89479.106574] [<c013b0e3>] ? tick_dev_program_event+0x33/0xb0 [89479.106594] [<c01073d0>] ? native_sched_clock+0x20/0x70 [89479.106613] [<c013d825>] ? lock_release_holdtime+0x35/0x200 [89479.106662] [<c013d7eb>] ? trace_hardirqs_off+0xb/0x10 [89479.106892] [<dfe7faa7>] ? usb_hcd_irq+0x97/0xa0 [usbcore] [89479.106926] [<c015ba79>] handle_IRQ_event+0x29/0x60 [89479.106947] [<c015cf89>] handle_level_irq+0x69/0xe0 [89479.106963] [<c015cf20>] ? handle_level_irq+0x0/0xe0 [89479.106977] <IRQ> [<c02ca933>] ? tcp_v4_rcv+0x633/0x6e0 [89479.107025] [<c0103f0c>] ? common_interrupt+0x28/0x30 [89479.107057] [<c02a0000>] ? sk_run_filter+0x320/0x7a0 [89479.107078] [<c020e041>] ? list_del+0x21/0x90 [89479.107106] [<dfd0d24e>] ? orinoco_rx_isr_tasklet+0x2ce/0x480 [orinoco] [89479.107131] [<c01402e0>] ? __lock_acquire+0x160/0x1650 [89479.107151] [<c01073d0>] ? native_sched_clock+0x20/0x70 [89479.107169] [<c013d825>] ? lock_release_holdtime+0x35/0x200 [89479.107200] [<c012249a>] ? irq_enter+0xa/0x60 [89479.107217] [<c0104e52>] ? do_IRQ+0xd2/0x130 [89479.107518] [<c010342c>] ? restore_nocheck_notrace+0x0/0xe [89479.107542] [<c0122830>] ? __do_softirq+0x0/0x110 [89479.107561] [<c013f7b4>] ? trace_hardirqs_on_caller+0x74/0x140 [89479.107583] [<c01ff678>] ? trace_hardirqs_on_thunk+0xc/0x10 [89479.107602] [<c0122087>] ? tasklet_action+0x27/0x90 [89479.107620] [<c013f7b4>] ? trace_hardirqs_on_caller+0x74/0x140 [89479.107638] [<c01220a3>] ? tasklet_action+0x43/0x90 [89479.107655] [<c012289f>] ? __do_softirq+0x6f/0x110 [89479.107674] [<c0122830>] ? __do_softirq+0x0/0x110 [89479.107685] <IRQ> [<c015cf20>] ? handle_level_irq+0x0/0xe0 [89479.107715] [<c012246d>] ? irq_exit+0x5d/0x80 [89479.107732] [<c0104e52>] ? do_IRQ+0xd2/0x130 [89479.107747] [<c0103337>] ? sysenter_exit+0xf/0x16 [89479.107765] [<c013f83d>] ? trace_hardirqs_on_caller+0xfd/0x140 [89479.107782] [<c0103f0c>] ? common_interrupt+0x28/0x30 [89479.107797] ---[ end trace a1fc0a52df4a729d ]--- Reported-by: Andrey Borzenkov <arvidjaar@mail.ru> Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12spectrum_cs: Fix function names used in debug stringsDavid Kilroy
Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12orinoco: Fix inappropriate use of IRQ_BAPDavid Kilroy
This hardware buffer should only be used from an interrupt. The wireless event generation functions are called from a workqueue, so use USER_BAP instead. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12orinoco: Fix function names used in debug stringsDavid Kilroy
Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12airport: remove useless return in a function returning voidPavel Roskin
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26orinoco: Provide option to avoid unnecessary fw cachingDavid Kilroy
Make firmware caching on startup optional, and make it default. When the option is not selected and PM_SLEEP is configured, then cache firmware in the suspend pm_notifier. This configuration saves about 64k RAM in normal use, but can lead to a situation where the driver is configured to use a different firmware. Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26orinoco: Resume spectrum_cs in the same way as orinoco_csDavid Kilroy
Retrieval of external firmware has been resolved, and should work with the standard orinoco resume algorithm. This fixes an issue where priv->hw_unavailable indicates the card is ready when firmware has not been loaded. Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26orinoco: Cache Symbol firmwareDavid Kilroy
Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26orinoco: Separate fw caching from downloadDavid Kilroy
This refactorring will make it easier to share logic with Symbol firmware. Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26orinoco: indicate it is using dBm in wireless_stats and spyAndrey Borzenkov
Since WE7 /proc/net/wireless checks whether level and noise are in dBm and shows them accordingly. Indicate that we return signal and noice levels in dBm. Before: Inter-| sta-| Quality | Discarded packets | Missed | WE face | tus | link level noise | nwid crypt frag retry misc | beacon | 22 eth1: 0000 65. 219. 165. 0 0 148 41 0 0 After: Inter-| sta-| Quality | Discarded packets | Missed | WE face | tus | link level noise | nwid crypt frag retry misc | beacon | 22 eth1: 0000 65. -37. -91. 0 0 0 0 0 0 While at it, replace raw numbers with appropriate macro. Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-21orinoco: fix last beacon reporting on 64-bit systemsPavel Roskin
orinoco_translate_scan() and orinoco_translate_ext_scan() wrongly truncate last_scanned argument from unsigned long to unsigned int. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-10net: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-10orinoco: Move sources to a subdirectoryDavid Kilroy
Keeping all the orinoco drivers in a common directory will make maintenance easier. Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>