Commit graph

201 commits

Author SHA1 Message Date
Vasanthakumar Thiagarajan
0d422f4237 staging: ath6kl: Fix a kernel panic during suspend/resume
The kernel panic happens when we try to complete a pending
scan request while going to suspend state. The cause for this
kernel panic is accessing a freed memory (ar->arWmin). This
is freed before ar6k_cfg80211_scanComplete_event() getting
called where it is dereferenced.

RIP: 0010:[<ffffffffa042e726>]  [<ffffffffa042e726>] wlan_iterate_nodes+0x16/0xc0 [ath6kl]
RSP: 0018:ffff8800719fbce8  EFLAGS: 00010296
RAX: ffff880071bbcc00 RBX: ffff880037b22520 RCX: ffff880077413c80
RDX: ffff880037b221c0 RSI: ffffffffa041ef10 RDI: 0000000000000020
RBP: ffff8800719fbd18 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000400 R11: 0000000000000000 R12: 0000000000000010
R13: ffff8800719fbdd8 R14: 00007fff83a84b60 R15: 0000000000000001
FS:  00007fdccb8a7700(0000) GS:ffff880077400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000148 CR3: 0000000070604000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
	DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process rmmod (pid: 1998, threadinfo ffff8800719fa000, task ffff880066712d80)
	Stack:
	0000000000000000 ffff880037b22520 0000000000000010 ffff8800719fbdd8
	00007fff83a84b60 0000000000000001 ffff8800719fbd28 ffffffffa0429fe2
	ffff8800719fbd58 ffffffffa041ee5f ffff8800719fbd58 ffff880037b22520
	Call Trace:
	[<ffffffffa0429fe2>] wmi_iterate_nodes+0x12/0x20 [ath6kl]
	[<ffffffffa041ee5f>] ar6k_cfg80211_scanComplete_event+0x3f/0xf0 [ath6kl]
	[<ffffffffa04245f1>] ar6000_close+0x61/0x100 [ath6kl]
	[<ffffffff814d6736>] __dev_close_many+0x96/0x100
	[<ffffffff814d688d>] dev_close_many+0x9d/0x120
	[<ffffffff814d6a48>] rollback_registered_many+0xe8/0x290
	[<ffffffff814d6d16>] unregister_netdevice_queue+0x96/0x100
	[<ffffffff814d6ea0>] unregister_netdev+0x20/0x30
	[<ffffffffa0420259>] ar6000_destroy+0x119/0x180 [ath6kl]
	[<ffffffffa043182a>] ar6k_cleanup_module+0x2a/0x33 [ath6kl]
	[<ffffffff81098fde>] sys_delete_module+0x19e/0x270
	[<ffffffff815d7542>] system_call_fastpath+0x16/0x1b
	Code: c3 0f 1f 40 00 48 89 df e8 68 ff ff ff eb df 66 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 08 0f 1f 44 00 00
	8b af 28 01 00 00 4c 8d 7f 08 49 89 fc 48 89 f3 49 89 d6 41
	RIP  [<ffffffffa042e726>] wlan_iterate_nodes+0x16/0xc0 [ath6kl]
	RSP <ffff8800719fbce8>

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 12:28:42 -07:00
Randy Dunlap
827e4a07e8 staging: fix ath6kl build when CFG80211 is not enabled
Fix build errors when CONFIG_CFG80211 is not enabled:

drivers/built-in.o: In function `ar6k_cfg80211_deinit':
(.text+0x189b71): undefined reference to `cfg80211_scan_done'
drivers/built-in.o: In function `ar6k_cfg80211_deinit':
(.text+0x189b86): undefined reference to `wiphy_unregister'
drivers/built-in.o: In function `ar6k_cfg80211_deinit':
(.text+0x189b8d): undefined reference to `wiphy_free'
drivers/built-in.o: In function `ar6k_cfg80211_init':
(.text+0x18add7): undefined reference to `wiphy_new'
drivers/built-in.o: In function `ar6k_cfg80211_init':
(.text+0x18ae48): undefined reference to `wiphy_register'
drivers/built-in.o: In function `ar6k_cfg80211_tkip_micerr_event':
(.text+0x18ae95): undefined reference to `cfg80211_michael_mic_failure'
drivers/built-in.o: In function `ar6k_cfg80211_scan_node':
(.text+0x18afb5): undefined reference to `__ieee80211_get_channel'
drivers/built-in.o: In function `ar6k_cfg80211_scan_node':
(.text+0x18afd2): undefined reference to `cfg80211_inform_bss_frame'
drivers/built-in.o: In function `ar6k_cfg80211_disconnect_event':
(.text+0x18b046): undefined reference to `cfg80211_ibss_joined'
drivers/built-in.o: In function `ar6k_cfg80211_disconnect_event':
(.text+0x18b176): undefined reference to `cfg80211_connect_result'
drivers/built-in.o: In function `ar6k_cfg80211_disconnect_event':
(.text+0x18b190): undefined reference to `cfg80211_disconnected'
drivers/built-in.o: In function `ar6k_cfg80211_connect_event':
(.text+0x18b291): undefined reference to `cfg80211_get_bss'
drivers/built-in.o: In function `ar6k_cfg80211_connect_event':
(.text+0x18b457): undefined reference to `cfg80211_put_bss'
drivers/built-in.o: In function `ar6k_cfg80211_connect_event':
(.text+0x18b4fa): undefined reference to `cfg80211_roamed'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 12:28:40 -07:00
Linus Torvalds
3f5785ec31 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (89 commits)
  bonding: documentation and code cleanup for resend_igmp
  bonding: prevent deadlock on slave store with alb mode (v3)
  net: hold rtnl again in dump callbacks
  Add Fujitsu 1000base-SX PCI ID to tg3
  bnx2x: protect sequence increment with mutex
  sch_sfq: fix peek() implementation
  isdn: netjet - blacklist Digium TDM400P
  via-velocity: don't annotate MAC registers as packed
  xen: netfront: hold RTNL when updating features.
  sctp: fix memory leak of the ASCONF queue when free asoc
  net: make dev_disable_lro use physical device if passed a vlan dev (v2)
  net: move is_vlan_dev into public header file (v2)
  bug.h: Fix build with CONFIG_PRINTK disabled.
  wireless: fix fatal kernel-doc error + warning in mac80211.h
  wireless: fix cfg80211.h new kernel-doc warnings
  iwlagn: dbg_fixed_rate only used when CONFIG_MAC80211_DEBUGFS enabled
  dst: catch uninitialized metrics
  be2net: hash key for rss-config cmd not set
  bridge: initialize fake_rtable metrics
  net: fix __dst_destroy_metrics_generic()
  ...

Fix up trivial conflicts in drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
2011-05-25 17:00:17 -07:00
John W. Linville
31ec97d9ce Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-05-24 16:47:54 -04:00
Jouni Malinen
ed9d01026f cfg80211: Use consistent BSS matching between scan and sme
cfg80211 scan code adds separate BSS entries if the same BSS shows up
on multiple channels. However, sme implementation does not use the
frequency when fetching the BSS entry. Fix this by adding channel
information to cfg80211_roamed() and include it in cfg80211_get_bss()
calls.

Please note that drivers using cfg80211_roamed() need to be modified to
fully implement this fix. This commit includes only minimal changes to
avoid compilation issues; it maintains the old (broken) behavior for
most drivers. ath6kl was the only one that I could test, so I updated
it to provide the operating frequency in the roamed event.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-19 10:37:18 -04:00
Naveen Singh
10ceaac958 ath6kl: iw dev wlan0 link implementation
implementing the cfg ops that gets called when iw dev wlan0
link is issued by user. The ops that needs to be implemented
is get_station.

kvalo: check the mac address, remove signal_pending(), use ARRAY_SIZE()
and fix style issues

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Kalle Valo <kalle.valo@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17 13:31:31 -07:00
Julia Lawall
d93089df1b drivers/staging/ath6kl/os/linux/cfg80211.c: Add missing call to cfg80211_put_bss
A call to cfg80211_get_bss hould be accompanied by a call to
cfg80211_put_bss in error-handling code.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression struct cfg80211_bss * x;
expression ra,rr;
position p1,p2;
@@

x = cfg80211_get_bss@p1(...)
...  when != x = rr
     when != cfg80211_put_bss(x,...)
     when != if (...) { ... cfg80211_put_bss(x,...) ...}
if(...) { ... when != x = ra
     when forall
     when != cfg80211_put_bss(x,...)
 \(return <+...x...+>; \| return@p2...; \) }

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

cocci.print_main("cfg80211_get_bss",p1)
cocci.print_secs("return",p2)

// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17 13:31:31 -07:00
Kalle Valo
e5813f8449 staging: ath6kl: provide hardware version to userspace
Signed-off-by: Kalle Valo <kalle.valo@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-10 11:19:06 -07:00
Vasanthakumar Thiagarajan
b83963b3c4 ath6kl: Remove ununsed macros from gpio_reg.h
After this there is no difference between hw2.0/hw/gpio_reg.h
and hw4.0/hw/gpio_reg.h, so remove the duplication.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06 09:31:55 -07:00
Vasanthakumar Thiagarajan
eb050f4c01 ath6kl: Remove gpio.h and gpio_api.h
The macros and function proto types in these files are
not used anywhere.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06 09:31:55 -07:00
Vasanthakumar Thiagarajan
7c370f9150 ath6kl: Remove unused eeprom.c
Also delete si_reg.h which is only used in eeprom.c

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06 09:31:55 -07:00
Vasanthakumar Thiagarajan
0ef18385ee ath6kl: Remove dead code with CONFIG_AR6002_REV1_FORCE_HOST
This is not defined anywhere, also delete vmc_reg.h which is
used only in the dead code.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06 09:31:55 -07:00
Vasanthakumar Thiagarajan
d67acf6d72 ath6kl: Remove somemore unused header files
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06 09:31:45 -07:00
Vasanthakumar Thiagarajan
7e0ddb5049 ath6kl: Remove few more unused header files
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:36:27 -07:00
Vasanthakumar Thiagarajan
0b0c87416f ath6kl: Replace data type macros with kernel defined ones
Now athtypes_linux.h and a_types.h are unused, remove them.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:58 -07:00
Vasanthakumar Thiagarajan
cb8a13aade ath6kl: Remove unused macros from gpio_reg.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:58 -07:00
Vasanthakumar Thiagarajan
79d16c2010 ath6kl: Remove unused regdump.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:58 -07:00
Vasanthakumar Thiagarajan
30eb736961 ath6kl: Remove somemore unused header files from hw4.0/hw/
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:57 -07:00
Vasanthakumar Thiagarajan
053db30673 ath6kl: Remove unused hw4.0/hw/vmc_reg.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:57 -07:00
Vasanthakumar Thiagarajan
e2da2c0f58 ath6kl: Remove unused bb_lc_reg.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:57 -07:00
Vasanthakumar Thiagarajan
21e43d965e ath6kl: Remove unused hw2.0/hw/uart_reg.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:56 -07:00
Vasanthakumar Thiagarajan
05177f4020 ath6kl: Remove duplicate si_reg.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:56 -07:00
Vasanthakumar Thiagarajan
1ecf2f1c3d ath6kl: Remove duplicate rtc_reg.h
Also remove unused rtc register definition from rtc_reg.h.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:56 -07:00
Vasanthakumar Thiagarajan
3dc8f80dbf ath6kl: Remove duplicate mbox_wlan_reg.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:55 -07:00
Vasanthakumar Thiagarajan
e428b6d67d ath6kl: Remove duplicate mbox_host_reg.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:55 -07:00
Vasanthakumar Thiagarajan
b783adb7d5 ath6kl: Remove duplicate abp_map.h
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:55 -07:00
Vasanthakumar Thiagarajan
a9d4d476df ath6kl: Remove unused analog_register header files
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:29:54 -07:00
Naveen Singh
9ae62107fb staging: ath6kl: open/shared auth implementation
If the wpa_supplicant conf file supplies both open and shared
algorithm, and AP is configured as shared then connection never
happens. Since it is a FMAC driver additional logic is added in
driver which first detects this, then tries open algorithm for the
first time and when it fails tries the shared algo.

kvalo: fix style issues

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Kalle Valo <kalle.valo@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:09:43 -07:00
Naveen Singh
60c87f1453 staging: ath6kl: cfg80211_roam issue; driver wedge
If a heavy traffic is undergoing and a link is lost (bcn miss),
wlan driver does a reconnection on its own and after connection
is re-established, reports it as ROAM_EVENT to cfg. Now this event
is handled as work queue. It could very well happen that by the
time this event gets handled, cfg would have aged out the bss and
we get the following WARN_ON in __cfg80211_roamed function in file
net/wireless/sme.c.

        /* internal error -- how did we get to CONNECTED w/o BSS? */
        if (WARN_ON(!wdev->current_bss)) {
                return;
        }
To resolve the issue we report the BSS whenever we send a connect or
roam event to the cfg.

kvalo: fix style issues

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Kalle Valo <kalle.valo@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:09:42 -07:00
Joe Perches
95cd17c9f3 staging: Remove unnecessary semicolons when switch (foo) {...};
Done via perl script:

$ cat remove_semi_switch.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces      = qr/(\{(?:[^\{\}]++|(?-1))*\})/;

foreach my $file (@ARGV) {
    my $f;
    my $text;
    my $oldtext;

    next if ((-d $file));

    open($f, '<', $file)
	or die "$P: Can't open $file for read\n";
    $oldtext = do { local($/) ; <$f> };
    close($f);

    next if ($oldtext eq "");

    $text = $oldtext;

    my $count = 0;
    do {
	$count = 0;
	$count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
    } while ($count > 0);

    if ($text ne $oldtext) {
	my $newfile = $file;

	open($f, '>', $newfile)
	    or die "$P: Can't open $newfile for write\n";
	print $f $text;
	close($f);
    }
}

$

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:58:35 -07:00
Naveen Singh
8fcf92d1cf ath6kl: fix operations for power management
The cfg80211 ops for power management were completely
broken. If we were asked for to go into power save it was putting
device in awake, and when we were asked to become awake we were
putting the device into power save... This fixes the powersave
operations to do the right thing.

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:24:24 -07:00
Naveen Singh
3c9d2f6c14 ath6kl: fix scan operation while disconnect
If a scan operation is pending and in between a disconnect
event is received from firmware the scan results never get
sent back to cfg80211. This causes a scan failure and yields
a device/resource busy state upon retries. If a disconnect
event is received and scan is pending return the scan done
to the cfg80211 to enable futher scans to be issued.

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:24:24 -07:00
Naveen Singh
26e58b5174 ath6kl: add the device ID on the data command packet
The firmware expects the device ID to be added on the
data and command packets sent to firmware for AR6003 v2.1.1.

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:24:24 -07:00
Naveen Singh
f3379c3966 ath6kl: Extend WMI API used by AR6003 v2.1.1
These commands and event IDs are used by AR6003 v2.1.1.
Some events are no longer needed so these are removed now.

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:24:23 -07:00
Naveen Singh
37f7949d0a ath6kl: add support for AR6003 v2.1.1
This adds support for AR6003 v2.1.1. Highlights changes
for this new hardware are:

1. Host interest area, through which driver communicates
   with FW has been enhanced to accomodate additional
   members for proper functioanlity of new HW.

2. The firmware and the board data files are different
   for AR6003 v2.1.1. The capability to read those file
   have been added in the driver.

3. Certain parameters like numdevice, firmware mode needs to be
   programmed for proper functionality of new driver.

Signed-off-by: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:24:23 -07:00
Naveen Singh
a29c58a0e6 staging:ath6kl:Correcting the typo
1) ATH6K_CONFIG_HIF_VIRTUAL_SCATTER needs to be
   ATH6KL_CONFIG_HIF_VIRTUAL_SCATTER in file ar6000_drv.h

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:24:23 -07:00
Greg Kroah-Hartman
32235b07b5 Staging: merge 2.6.39-rc3 into staging-next
This was done to handle a number of conflicts, the majority of which
were caused by the big "fix spelling issues" patch.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 12:14:05 -07:00
Luis R. Rodriguez
427beeb21a ath6kl: remove ar6000_prepare_target() crap
This was empty code, WTF^pi.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:18 -07:00
Luis R. Rodriguez
628a7dd85c ath6kl: remove chatty debug messages on ath6kl driver ops
These do not help in any way.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:17 -07:00
Luis R. Rodriguez
437c567b1a ath6kl: rename the pm ops to something more sensible
This has no functional changes.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:17 -07:00
Luis R. Rodriguez
0174d3c264 ath6kl: cleanup and move the ath6kl pm ops to be assigned statically
There should be no need to assign the pm ops dynamically, so
assign them statically and make them const. While we are
doing this just do some simple code style cleanup on the
routines and move them above prior to their assignment
into the driver ops.

This has no functional change other than assigning the
pm ops statically.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:17 -07:00
Luis R. Rodriguez
2df44b8b9b ath6kl: remove completely pointles platform driver
Perhaps there was some good intention on having some platform
driver on ath6kl, but right now its pointless. Kill!

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:16 -07:00
Luis R. Rodriguez
60a9bc5780 ath6kl: style cleanup on struct sdio_driver components
No functional changes except renames of the routines and
id data structure.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:16 -07:00
Luis R. Rodriguez
09b6b5e916 ath6kl: cleanup allocation and getting of the hif dev
Removes verbose debug messages and checks that are just
not needed, and renames the functions to something more
sensible. While we clean this up, just move the routines
above and remove the forward declarations.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:15 -07:00
Luis R. Rodriguez
4f56a12dd5 ath6kl: propagate errors on hifEnableFunc() failures
This will be passed along to the SDIO probe routine when
it fails. This will generate better error code to the user
when loading the module if it fails.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:15 -07:00
Luis R. Rodriguez
0c804c5a57 ath6kl: remove useless plat_setup_power() calls
These map to do nothing.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:14 -07:00
Luis R. Rodriguez
711908df76 ath6kl: propagate errors on module setup
This propagates initial platform registration failures and
also HIF initialization failures.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:14 -07:00
Luis R. Rodriguez
0e7fd280fb ath6kl: simplify btcoex parameter programming
Make the code more legible by parsing the config options on
the header file. While a it ensure to propagate errors and
bail out if we fail to set btcoex params.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:13 -07:00
Luis R. Rodriguez
524717f1a4 ath6kl: use CONFIG_ATH6KL_ENABLE_COEXISTENCE
When CONFIG_ATH6KL_ENABLE_COEXISTENCE gets enabled we define
another flag called ENABLE_COEXISTENCE, just use
CONFIG_ATH6KL_ENABLE_COEXISTENCE since that is already defined
by the generated autoconf header file from the kernel.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:13 -07:00
Luis R. Rodriguez
5b1978ee00 ath6kl: remove AR600x_CUSTOM_XXX define
There already is a CONFIG_AR600x_CUSTOM_XXX if this is
desired to be used.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:58:12 -07:00