platform/kernel/linux-exynos.git
13 years agoiwlagn: call commit_rxon function directly
Wey-Yi Guy [Fri, 3 Jun 2011 14:54:16 +0000 (07:54 -0700)]
iwlagn: call commit_rxon function directly

No need to go though multiple levels of indirect call to send RXON command.
Call it directly

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: direct call to post_scan function
Wey-Yi Guy [Fri, 3 Jun 2011 14:54:15 +0000 (07:54 -0700)]
iwlagn: direct call to post_scan function

After driver split, no need to use function "ops" for post_scan.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: move all post scan functions in one place
Wey-Yi Guy [Fri, 3 Jun 2011 14:54:14 +0000 (07:54 -0700)]
iwlagn: move all post scan functions in one place

Both tx power and power save are being done after scan complete, move into
post_scan function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: set smps mode after assoc for 1000 device
Wey-Yi Guy [Fri, 3 Jun 2011 14:54:13 +0000 (07:54 -0700)]
iwlagn: set smps mode after assoc for 1000 device

For some timing reason, 1000 device having problem to kick-in to aggregation
without sending rxon assoc command. This is a W/A until find the real reason

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: save the latest smps mode
Wey-Yi Guy [Fri, 3 Jun 2011 14:54:12 +0000 (07:54 -0700)]
iwlagn: save the latest smps mode

When change smps mode due to bt coex, save it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: add missing null check
Greg Dietsche [Fri, 3 Jun 2011 03:24:06 +0000 (22:24 -0500)]
iwlegacy: add missing null check

lq_sta has other null checks in this function.
assuming they are correct, this additional null check
should be added too.

Incorporating suggestion from Gustavo Padovan.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: propagate error return value
Greg Dietsche [Fri, 3 Jun 2011 02:06:09 +0000 (21:06 -0500)]
iwlegacy: propagate error return value

propogate the return value from iwl4965_get_tx_atten_grp instead
of implicitly returning -EINVAL in the error case.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: return -EINVAL instead of -1
Greg Dietsche [Fri, 3 Jun 2011 02:06:08 +0000 (21:06 -0500)]
iwlegacy: return -EINVAL instead of -1

Cleanup the code to return -EINVAL instead of -1
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unecessary if statement
Greg Dietsche [Fri, 3 Jun 2011 02:06:07 +0000 (21:06 -0500)]
iwlegacy: remove unecessary if statement

the code always returns ret regardless, so if(ret) check is unecessary.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unreachable code
Greg Dietsche [Fri, 3 Jun 2011 02:06:06 +0000 (21:06 -0500)]
iwlegacy: remove unreachable code

return; at the end of the function is unecessary.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: add BCMA 80211 core specific defines
Rafał Miłecki [Thu, 2 Jun 2011 11:43:24 +0000 (13:43 +0200)]
b43: add BCMA 80211 core specific defines

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: add an option to register BROKEN bcma driver
Rafał Miłecki [Thu, 2 Jun 2011 07:56:04 +0000 (09:56 +0200)]
b43: add an option to register BROKEN bcma driver

It does nothing useful yet, so it is matched as BROKEN.
For now this is just an option for b43, in future we may want to make
b43 support SSB or BCMA (note: or, not xor).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobcma: read SPROM and extract MAC from it
Rafał Miłecki [Thu, 2 Jun 2011 00:08:51 +0000 (02:08 +0200)]
bcma: read SPROM and extract MAC from it

In case of BCMA cards SPROM is located in the ChipCommon core, it is
not mapped as separated host window. So far we have met only SPROMs rev
8.
SPROM layout seems to be the same as for SSB buses, so we decided to
share SPROM struct and some defines.
For now we extract MAC address only, this can be improved of course.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: do not use SSB specific flags when calling core reset function
Rafał Miłecki [Wed, 1 Jun 2011 23:07:12 +0000 (01:07 +0200)]
b43: do not use SSB specific flags when calling core reset function

Luckily the only flag we use when calling core reset is GMODE one.
Thanks to that we can just switch to single bool and make function calls
bus generic.

Tested on my BCM4312 (LP-PHY) and early tested with BCM43224.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: show excessive-retry MPDUs in debugfs
Felix Fietkau [Tue, 31 May 2011 19:21:41 +0000 (21:21 +0200)]
ath9k: show excessive-retry MPDUs in debugfs

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolib: cordic: add library module providing cordic angle calculation
Arend van Spriel [Tue, 31 May 2011 09:22:16 +0000 (11:22 +0200)]
lib: cordic: add library module providing cordic angle calculation

The brcm80211 driver in the staging tree has a cordic function to
determine cosine and sine for a given angle. Feedback received from
John Linville suggested that these kind of functions should be made
available to others as a library function in the kernel tree. The
b43 driver also has a cordic angle calculation implemented.

Cc: linux-kernel@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolib: crc8: add new library module providing crc8 algorithm
Arend van Spriel [Tue, 31 May 2011 09:22:15 +0000 (11:22 +0200)]
lib: crc8: add new library module providing crc8 algorithm

The brcm80211 driver in staging tree uses a crc8 function. Based on
feedback from John Linville to move this to lib directory, the linux
source has been searched. Although there is currently only one other
kernel driver using this algorithm (ie. drivers/ssb) we are providing
this as a library function for others to use.

Cc: linux-kernel@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: Dan Carpenter <error27@gmail.com>
Cc: George Spelvin <linux@horizon.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix logic in rx_interrupt
Mike McCormack [Mon, 30 May 2011 23:50:24 +0000 (08:50 +0900)]
rtlwifi: Fix logic in rx_interrupt

Should pass along packet if there's no CRC and no hardware error.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Use write barrier when assigning ownership
Mike McCormack [Mon, 30 May 2011 23:50:07 +0000 (08:50 +0900)]
rtlwifi: Use write barrier when assigning ownership

Make sure all updates to a descriptor are flushed to memory
before assigning ownship to hardware.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Assign rx buffer ownership to hardware last
Mike McCormack [Mon, 30 May 2011 23:49:51 +0000 (08:49 +0900)]
rtlwifi: Assign rx buffer ownership to hardware last

Ownership of an rx buffer should only be given to the hardware
after all other changes are written, otherwise there's
a potential race.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Don't block interrupts in spinlocks
Mike McCormack [Mon, 30 May 2011 23:49:36 +0000 (08:49 +0900)]
rtlwifi: Don't block interrupts in spinlocks

Now power state transitions are not called from an
interrupt context, there's no need to block interrupts.

This code appears to block interrupts for too long,
causing my trackpad to lose sync occasionally.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Run IPS leave work in a tasklet
Mike McCormack [Mon, 30 May 2011 23:49:23 +0000 (08:49 +0900)]
rtlwifi: Run IPS leave work in a tasklet

This removes the need to use IRQ safe spinlocks in many places.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Store loop index in local variable
Mike McCormack [Mon, 30 May 2011 23:49:07 +0000 (08:49 +0900)]
rtlwifi: Store loop index in local variable

_rtl_pci_rx_interrupt uses rtlpci->rx_ring[rx_queue_idx].idx a
few times, so store it in a separate variable.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Remove set_rfpowerstate_inprogress
Mike McCormack [Mon, 30 May 2011 23:48:50 +0000 (08:48 +0900)]
rtlwifi: Remove set_rfpowerstate_inprogress

set_rfpowerstate_inprogress is only set and never read
so remove it.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Synchronize IRQ after disabling it
Mike McCormack [Mon, 30 May 2011 23:48:23 +0000 (08:48 +0900)]
rtlwifi: Synchronize IRQ after disabling it

This make sure any IRQ handlers running on other CPUs complete.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix interface combinations
Johannes Berg [Thu, 2 Jun 2011 17:38:43 +0000 (19:38 +0200)]
iwlagn: fix interface combinations

My patch to advertise interface combinations
worked by pure luck in the P2P case, but all
other cases are broken. This is due to a dumb
mistake in the code that checks what should
be advertised, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: change log to better represent the state of aggregation process
Wey-Yi Guy [Fri, 27 May 2011 15:40:32 +0000 (08:40 -0700)]
iwlagn: change log to better represent the state of aggregation process

Multiple A-MPDU actions will received from mac80211 while setting up the
aggregation queue, change the message log to better represent the states.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: change the logging level for aggregation enable check
Wey-Yi Guy [Fri, 27 May 2011 15:40:31 +0000 (08:40 -0700)]
iwlagn: change the logging level for aggregation enable check

Aggregation will not enable if the traffic is lower than the threshold,
this is not an error condition, so change the logging level.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: advertise interface combinations
Johannes Berg [Fri, 27 May 2011 15:40:30 +0000 (08:40 -0700)]
iwlagn: advertise interface combinations

With this, iwlwifi will advertise the limits on
concurrency of virtual interfaces.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: free the ICT ISR when the request_irq failed
Emmanuel Grumbach [Fri, 27 May 2011 15:40:29 +0000 (08:40 -0700)]
iwlagn: free the ICT ISR when the request_irq failed

Fix a memory leak in case request_irq fails.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: disambiguate invalid DMA index warnings
Daniel Halperin [Fri, 27 May 2011 15:40:28 +0000 (08:40 -0700)]
iwlwifi: disambiguate invalid DMA index warnings

The exact same error message is used in three different functions in
iwlagn. Add the function name to the error string to disambiguate where
the error is coming from.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: solve sparse warning
Emmanuel Grumbach [Fri, 27 May 2011 15:40:27 +0000 (08:40 -0700)]
iwlagn: solve sparse warning

Remove local variable that was shadowing another one
sta_priv hasn't changed since the beginning of the function, so don't define
another pointer with the same name to the same variable

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix dual-mode RXON
Johannes Berg [Fri, 27 May 2011 15:40:26 +0000 (08:40 -0700)]
iwlagn: fix dual-mode RXON

 The PAN context has three states: disabled, disassociated
 and associated. It seems that wasn't quite as much of an
 issue in previous versions of the microcode, but now we
 really have to use all the three states properly. So add
 code to switch accordingly.

Additionally, PAN parameters need to be sent differently
and the timing for PAN RXON needs to be inbetween.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: remove un-necessary tx power ops
Wey-Yi Guy [Fri, 27 May 2011 15:40:25 +0000 (08:40 -0700)]
iwlagn: remove un-necessary tx power ops

All agn devices use the same tx power function, remove the ops

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: send tx power command if defer cause by RXON not match
Wey-Yi Guy [Fri, 27 May 2011 15:40:24 +0000 (08:40 -0700)]
iwlagn: send tx power command if defer cause by RXON not match

During channge channel, tx power will not send to uCode, the tx power command
should send after scan complete. but should also can send after RXON command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: skip disabled channels on channel survey
Luis R. Rodriguez [Fri, 27 May 2011 14:24:02 +0000 (07:24 -0700)]
cfg80211: skip disabled channels on channel survey

The channel survey information will be empy for
disabled channels so simply discard those entries.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: better position PAPRD debug message
Mohammed Shafi Shajakhan [Thu, 26 May 2011 06:11:13 +0000 (11:41 +0530)]
ath9k: better position PAPRD debug message

the training power calculation indirectly depends on target power under
some scenarios, unless we have a valid training power, the PAPRD frames
won't be sent out. so when we get an invalid training power, its better
to display them before returning back.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add a debug entry to start/stop ANI
Mohammed Shafi Shajakhan [Thu, 26 May 2011 05:26:15 +0000 (10:56 +0530)]
ath9k: Add a debug entry to start/stop ANI

this helps the user to start/stop ANI dynamically.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Further fix for mesh beaconing
Fabrice Deyber [Tue, 24 May 2011 13:44:35 +0000 (08:44 -0500)]
ath9k: Further fix for mesh beaconing

This fix ensure the timers to be set at beacon interval boundaries.
Without this change timers can be set improperly resulting in the absence of beacons.

Signed-off-by: Fabrice Deyber <fabricedeyber@agilemesh.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: wake up chip before initializing PAPRD table
Mohammed Shafi Shajakhan [Tue, 24 May 2011 09:59:52 +0000 (15:29 +0530)]
ath9k: wake up chip before initializing PAPRD table

In PAPRD table initialization path we do some register read, so
make sure the chip is awake during that. Currently PAPRD is disabled.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192se: Synchronize IRQ after disabling it
Larry Finger [Tue, 24 May 2011 01:38:52 +0000 (20:38 -0500)]
rtlwifi: rtl8192se: Synchronize IRQ after disabling it

As suggested by Mike McCormack <mikem@ring3k.org> for rtl8192ce, make sure any IRQ
handlers running on other CPUs complete.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192se: Use write barrier when assigning ownership
Larry Finger [Tue, 24 May 2011 01:37:31 +0000 (20:37 -0500)]
rtlwifi: rtl8192se: Use write barrier when assigning ownership

As noted by Mike McCormack <mikem@ring3k.org> for rtl8192ce, make sure
all updates to a descriptor are flushed to memory before assigning ownship
to hardware.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove support for old chipsets W0/W1
Amitkumar Karwar [Tue, 24 May 2011 01:00:17 +0000 (18:00 -0700)]
mwifiex: remove support for old chipsets W0/W1

For SD8787 A0/A1 chipsets we use the default firmware image
file 'mrvl/sd8787_uapsta.bin'. So the chip rev id variable
is removed.

The global variable fw_name is moved to adapter structure
so that we can support a different interface, such as PCIe,
in future.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43legacy: Fix warnings from gcc 4.6.0
Larry Finger [Mon, 23 May 2011 01:57:03 +0000 (20:57 -0500)]
b43legacy: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for b43legacy:

  CC [M]  drivers/net/wireless/b43legacy/main.o
drivers/net/wireless/b43legacy/main.c: In function ‘b43legacy_request_firmware’:
drivers/net/wireless/b43legacy/main.c:1567:6: warning: variable ‘tmshigh’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/main.c: In function ‘b43legacy_op_dev_config’:
drivers/net/wireless/b43legacy/main.c:2637:6: warning: variable ‘antenna_rx’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/main.c: In function ‘b43legacy_op_bss_info_changed’:
drivers/net/wireless/b43legacy/main.c:2778:24: warning: variable ‘phy’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/xmit.c: In function ‘generate_txhdr_fw3’:
drivers/net/wireless/b43legacy/xmit.c:324:7: warning: variable ‘rts_rate_ofdm’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/b43legacy/dma.o
drivers/net/wireless/b43legacy/dma.c: In function ‘free_all_descbuffers’:
drivers/net/wireless/b43legacy/dma.c:820:36: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/dma.c: In function ‘b43legacy_dma_tx’:
drivers/net/wireless/b43legacy/dma.c:1377:28: warning: variable ‘info’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/dma.c:1374:24: warning: variable ‘hdr’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/dma.c: In function ‘b43legacy_dma_handle_txstatus’:
drivers/net/wireless/b43legacy/dma.c:1438:36: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8192se: Fix warnings from gcc 4.6.0
Larry Finger [Mon, 23 May 2011 01:54:43 +0000 (20:54 -0500)]
rtl8192se: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for rtl8192se:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/dm.o
drivers/net/wireless/rtlwifi/rtl8192se/dm.c: In function ‘_rtl92s_dm_refresh_rateadaptive_mask’:
drivers/net/wireless/rtlwifi/rtl8192se/dm.c:225:5: warning: variable ‘rssi_level’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/fw.o
drivers/net/wireless/rtlwifi/rtl8192se/fw.c: In function ‘rtl92s_download_fw’:
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:361:6: warning: variable ‘file_length’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/hw.o
drivers/net/wireless/rtlwifi/rtl8192se/hw.c: In function ‘_rtl92se_hw_configure’:
drivers/net/wireless/rtlwifi/rtl8192se/hw.c:887:6: warning: variable ‘reg_ratr’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192se/hw.c: In function ‘_rtl92se_set_media_status’:
drivers/net/wireless/rtlwifi/rtl8192se/hw.c:1125:20: warning: variable ‘ledaction’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192se/hw.c: In function ‘rtl92se_gpio_radio_on_off_checking’:
drivers/net/wireless/rtlwifi/rtl8192se/hw.c:2274:32: warning: variable ‘cur_rfstate’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/phy.o
drivers/net/wireless/rtlwifi/rtl8192se/phy.c: In function ‘rtl92s_phy_set_bw_mode’:
drivers/net/wireless/rtlwifi/rtl8192se/phy.c:266:5: warning: variable ‘reg_prsr_rsc’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/trx.o
drivers/net/wireless/rtlwifi/rtl8192se/trx.c: In function ‘_rtl92se_translate_rx_signal_stuff’:
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:584:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8192cu: Fix warnings from gcc 4.6.0
Larry Finger [Mon, 23 May 2011 01:54:40 +0000 (20:54 -0500)]
rtl8192cu: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for rtl8192cu:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192cu/mac.o
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c: In function ‘rtl92c_translate_rx_signal_stuff’:
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c:1116:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8192ce: Fix warnings from gcc 4.6.0
Larry Finger [Mon, 23 May 2011 01:54:37 +0000 (20:54 -0500)]
rtl8192ce: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for rtl8192ce:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192ce/hw.o
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c: In function ‘_rtl92ce_hw_configure’:
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c:766:6: warning: variable ‘reg_ratr’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c: In function ‘rtl92ce_gpio_radio_on_off_checking’:
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c:1972:41: warning: variable ‘cur_rfstate’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192ce/phy.o
drivers/net/wireless/rtlwifi/rtl8192ce/phy.c: In function ‘rtl92c_phy_config_rf_with_headerfile’:
drivers/net/wireless/rtlwifi/rtl8192ce/phy.c:284:7: warning: variable ‘rtstatus’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192ce/trx.o
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘_rtl92ce_translate_rx_signal_stuff’:
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:595:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8192c-common: Fix warnings from gcc 4.6.0
Larry Finger [Mon, 23 May 2011 01:54:34 +0000 (20:54 -0500)]
rtl8192c-common: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for rtl8192c-common:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192c/fw_common.o
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: In function ‘_rtl92c_cmd_send_packet’:
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:549:5: warning: variable ‘own’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192c/phy_common.o
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c: In function ‘_rtl92c_phy_iq_calibrate’:
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:1256:6: warning: variable ‘bbvalue’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c: In function ‘rtl92c_phy_iq_calibrate’:
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:1766:6: warning: variable ‘reg_ecc’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:1765:34: warning: variable ‘reg_eac’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix warnings from gcc 4.6.0
Larry Finger [Mon, 23 May 2011 01:54:31 +0000 (20:54 -0500)]
rtlwifi: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for rtlwifi:

  CC [M]  drivers/net/wireless/rtlwifi/base.o
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_stop’:
drivers/net/wireless/rtlwifi/base.c:891:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_oper’:
drivers/net/wireless/rtlwifi/base.c:921:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/efuse.o
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_pg_packet_write’:
drivers/net/wireless/rtlwifi/efuse.c:928:24: warning: variable ‘dataempty’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_get_current_size’:
drivers/net/wireless/rtlwifi/efuse.c:1179:5: warning: variable ‘hoffset’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/ps.o
drivers/net/wireless/rtlwifi/ps.c: In function ‘rtl_ps_set_rf_state’:
drivers/net/wireless/rtlwifi/ps.c:85:19: warning: variable ‘rtstate’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/regd.o
drivers/net/wireless/rtlwifi/regd.c: In function ‘_rtl_dump_channel_map’:
drivers/net/wireless/rtlwifi/regd.c:310:28: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/usb.o
drivers/net/wireless/rtlwifi/usb.c: In function ‘_rtl_usb_transmit’:
drivers/net/wireless/rtlwifi/usb.c:826:21: warning: variable ‘urb_list’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/usb.c:825:23: warning: variable ‘skb_list’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: Fix warnings from gcc 4.6.0
Larry Finger [Mon, 23 May 2011 01:54:25 +0000 (20:54 -0500)]
b43: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for b43:

  CC [M]  drivers/net/wireless/b43/lo.o
drivers/net/wireless/b43/lo.c: In function ‘lo_measure_gain_values’:
drivers/net/wireless/b43/lo.c:304:7: warning: variable ‘trsw_rx’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/b43/dma.o
drivers/net/wireless/b43/dma.c: In function ‘free_all_descbuffers’:
drivers/net/wireless/b43/dma.c:760:30: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43/dma.c: In function ‘b43_dma_handle_txstatus’:
drivers/net/wireless/b43/dma.c:1391:30: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agominstrel_ht: fixed rate mode through debugfs
Zefir Kurtisi [Fri, 20 May 2011 18:29:17 +0000 (20:29 +0200)]
minstrel_ht: fixed rate mode through debugfs

Found several threads about fixed rate mode in minstrel_ht for test
environments, but no patches for it.

This patch provides such a mode through debugfs.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: add testmode dump support
Wey-Yi Guy [Fri, 20 May 2011 16:05:54 +0000 (09:05 -0700)]
nl80211: add testmode dump support

This adds dump support to testmode. The testmode
dump support in nl80211 requires using two of the
six cb->args, the rest can be used by the driver
to figure out where the dump position is at or to
store other data across invocations.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Handle IBSS status changes in BSS_CHANGED_IBSS
Rajkumar Manoharan [Fri, 20 May 2011 12:22:12 +0000 (17:52 +0530)]
ath9k: Handle IBSS status changes in BSS_CHANGED_IBSS

Configure ibss node's bss_changes under BSS_CHANGED_IBSS.
And also start/stop ani timer only if the station join/leave
the group.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove ATH9K_BEACON_PERIOD mask
Rajkumar Manoharan [Fri, 20 May 2011 12:22:11 +0000 (17:52 +0530)]
ath9k: Remove ATH9K_BEACON_PERIOD mask

Earlier beacon_interval is used to hold interval value and
some flags (ATH9K_BEACON_ENA &ATH9K_BEACON_PERIOD). So to
extract interval ATH9K_BEACON_PERIOD is used. Those flags
were completely removed. So masking beacon_interval is
not required.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobcma: host pci: implement block R/W operations
Rafał Miłecki [Fri, 20 May 2011 01:27:06 +0000 (03:27 +0200)]
bcma: host pci: implement block R/W operations

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: add helpers for checking host type
Rafał Miłecki [Thu, 19 May 2011 13:11:27 +0000 (15:11 +0200)]
b43: bus: add helpers for checking host type

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: use new pointers path to access ssb_device in SSB specific places
Rafał Miłecki [Thu, 19 May 2011 13:11:26 +0000 (15:11 +0200)]
b43: use new pointers path to access ssb_device in SSB specific places

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: SDIO: use new pointers path to access ssb_device
Rafał Miłecki [Thu, 19 May 2011 13:11:25 +0000 (15:11 +0200)]
b43: SDIO: use new pointers path to access ssb_device

SDIO code is SSB specific, we can safely just use "sdev"

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LP-PHY: use new pointers path to access ssb_device
Rafał Miłecki [Thu, 19 May 2011 13:11:24 +0000 (15:11 +0200)]
b43: LP-PHY: use new pointers path to access ssb_device

LP-PHY code is SSB specific, add check for bus type.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: mark few functions as static
Mohammed Shafi Shajakhan [Thu, 19 May 2011 12:38:57 +0000 (18:08 +0530)]
ath9k: mark few functions as static

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: make ath9k_setpower function as static
Mohammed Shafi Shajakhan [Thu, 19 May 2011 12:10:46 +0000 (17:40 +0530)]
ath9k: make ath9k_setpower function as static

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobcma: pci: implement interrupts control
Rafał Miłecki [Thu, 19 May 2011 12:08:22 +0000 (14:08 +0200)]
bcma: pci: implement interrupts control

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove ath9k_hw_get_desc_link
Felix Fietkau [Thu, 19 May 2011 10:20:26 +0000 (12:20 +0200)]
ath9k_hw: remove ath9k_hw_get_desc_link

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: unify edma and non-edma tx code, improve tx fifo handling
Felix Fietkau [Thu, 19 May 2011 10:20:25 +0000 (12:20 +0200)]
ath9k: unify edma and non-edma tx code, improve tx fifo handling

EDMA based chips (AR9380+) have 8 Tx FIFO slots, which are used to fix the
tx queue start/stop race conditions which have to be worked around for
earlier chips by keeping the last descriptor in the queue. The current code
stores all frames that do not fit onto the 8 FIFO slots in a separate
list. Whenever a FIFO slot is freed up, the next frame (or A-MPDU) from the
pending queue gets moved to that slot.

This process is not only inefficient, but also unnecessary. The code can
be improved visibly by keeping the pending queue fully linked, and moving
the contents of the entire queue to a FIFO slot as it becomes available.

This patch makes the necessary changes for that and also merges some code
that was duplicated for EDMA vs non-EDMA. It changes txq->axq_link to point
to the last descriptor instead of the link pointer, so that
ath9k_hw_set_desc_link can be used, which works on all chips.

With this patch, a small performance increase for non-aggregated traffic
was observed on AR9380 based embedded hardware.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove redundant if check
Mohammed Shafi Shajakhan [Thu, 19 May 2011 09:35:46 +0000 (15:05 +0530)]
ath9k: remove redundant if check

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211_hwsim driver support userspace frame tx/rx
Javier Lopez [Wed, 1 Jun 2011 09:26:13 +0000 (11:26 +0200)]
mac80211_hwsim driver support userspace frame tx/rx

This patch adds to mac80211_hwsim the capability to send traffic via
userspace.

Frame exchange between kernel and user spaces is done through generic
netlink communication protocol. A new generic netlink family
MAC80211_HWSIM is proposed, this family contains three basic commands
HWSIM_CMD_REGISTER, which is the command used to register a new
traffic listener, HWSIM_CMD_FRAME, to exchange the frames from kernel
to user and vice-versa, and HWSIM_CMD_TX_INFO_FRAME which returns
from user all the information about retransmissions, rates, rx signal,
and so on.

How it works:

Once the driver is loaded the MAC80211_HWSIM family will be registered.
In the absence of userspace daemon, the driver itselfs implements a
perfect wireless medium as it did in the past. When a daemon sends a
HWSIM_CMD_REGISTER command, the module stores the application PID, and
from this moment all frames will be sent to the registered daemon.

The user space application will be in charge of process/forward all
frames broadcast by any mac80211_hwsim radio. If the user application
is stopped, the kernel module will detect the release of the socket
and it will switch back to in-kernel perfect channel simulation.

The userspace daemon must be waiting for incoming HWSIM_CMD_FRAME
commands sent from kernel, for each HWSIM_CMD_FRAME command the
application will try to broadcast this frame to all mac80211_hwsim
radios, however the application may decide to forward/drop this frame.
In the case of forwarding the frame, a new HWSIM_CMD_FRAME command will
be created, all necessary attributes will be populated and the frame
will be sent back to the kernel.

Also after the frame broadcast phase, a HWSIM_CMD_TX_INFO_FRAME
command will be sent from userspace to kernel, this command contains
all the information regarding the transmission, such as number of
tries, rates, ack signal, etc.

You can find the actual implementation of wireless mediumd daemon
(wmediumd) at:

* Last version tarball: https://github.com/jlopex/cozybit/tarball/master
* Or visiting my github tree: https://github.com/jlopex/cozybit/tree

Signed-off-by: Javier Lopez <jlopex@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Enabled rt35xx device support by default.
Gertjan van Wingerde [Wed, 18 May 2011 18:26:04 +0000 (20:26 +0200)]
rt2x00: Enabled rt35xx device support by default.

Now that support for these devices has been added we can enable them
by default and remove the Kconfig not on support for these devices to
be non-functional.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Move rt2800_txdone and rt2800_txdone_entry_check to rt2800usb.
Gertjan van Wingerde [Wed, 18 May 2011 18:25:49 +0000 (20:25 +0200)]
rt2x00: Move rt2800_txdone and rt2800_txdone_entry_check to rt2800usb.

These two functions are only used by rt2800usb so they don't have to be
in rt2800lib.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Interface sequence lock doesn't have to disable interrupts.
Gertjan van Wingerde [Wed, 18 May 2011 18:25:42 +0000 (20:25 +0200)]
rt2x00: Interface sequence lock doesn't have to disable interrupts.

This lock is only used in the TX path and thus in process context. Therefore
we can use a much lighter spinlock variant.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add support for RT3572/RT3592/RT3592+Bluetooth combo card
Gertjan van Wingerde [Wed, 18 May 2011 18:25:31 +0000 (20:25 +0200)]
rt2x00: Add support for RT3572/RT3592/RT3592+Bluetooth combo card

(based on an earlier patch submitted by Shiang)

Add support for RT3572/RT3592/RT3592+Bluetooth combo card

Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Don't disable G0 PA_PE bit in case of BT coexistence.
Gertjan van Wingerde [Wed, 18 May 2011 18:25:18 +0000 (20:25 +0200)]
rt2x00: Don't disable G0 PA_PE bit in case of BT coexistence.

(split off from the earlier RT35xx patch submitted by Shiang)

Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Enable PA_PE bits in TX_PIN_CFG according to active band.
Gertjan van Wingerde [Wed, 18 May 2011 18:25:05 +0000 (20:25 +0200)]
rt2x00: Enable PA_PE bits in TX_PIN_CFG according to active band.

(split off from the earlier RT35xx patch submitted by Shiang)

There's no point in enabling the PA_PE bits for the bands that we are
not active on.

Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobcma: add IRQ number and pointer to DMA dev
Rafał Miłecki [Wed, 18 May 2011 09:40:22 +0000 (11:40 +0200)]
bcma: add IRQ number and pointer to DMA dev

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: abstract bus and core operations
Rafał Miłecki [Wed, 18 May 2011 00:06:43 +0000 (02:06 +0200)]
b43: bus: abstract bus and core operations

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: abstract board info
Rafał Miłecki [Wed, 18 May 2011 00:06:42 +0000 (02:06 +0200)]
b43: bus: abstract board info

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: abstract chip info
Rafał Miłecki [Wed, 18 May 2011 00:06:41 +0000 (02:06 +0200)]
b43: bus: abstract chip info

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: abstract device structs and irq
Rafał Miłecki [Wed, 18 May 2011 00:06:40 +0000 (02:06 +0200)]
b43: bus: abstract device structs and irq

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: abstract SPROM
Rafał Miłecki [Wed, 18 May 2011 00:06:39 +0000 (02:06 +0200)]
b43: bus: abstract SPROM

SPROM is another frequently used struct. We decided to share SPROM
struct between ssb na bcma as long as we will not need any hacks.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: abstract 80211 core info
Rafał Miłecki [Wed, 18 May 2011 00:06:38 +0000 (02:06 +0200)]
b43: bus: abstract 80211 core info

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: abstract R/W operations
Rafał Miłecki [Wed, 18 May 2011 00:06:37 +0000 (02:06 +0200)]
b43: bus: abstract R/W operations

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: add bus device abstraction layer
Rafał Miłecki [Wed, 18 May 2011 00:06:36 +0000 (02:06 +0200)]
b43: add bus device abstraction layer

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: rename ssb_device variable in ssb specific functions
Rafał Miłecki [Wed, 18 May 2011 00:06:35 +0000 (02:06 +0200)]
b43: rename ssb_device variable in ssb specific functions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into...
John W. Linville [Fri, 27 May 2011 19:18:35 +0000 (15:18 -0400)]
Merge git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

13 years agonet: Kill ratelimit.h dependency in linux/net.h
David S. Miller [Fri, 27 May 2011 17:41:33 +0000 (13:41 -0400)]
net: Kill ratelimit.h dependency in linux/net.h

Ingo Molnar noticed that we have this unnecessary ratelimit.h
dependency in linux/net.h, which hid compilation problems from
people doing builds only with CONFIG_NET enabled.

Move this stuff out to a seperate net/net_ratelimit.h file and
include that in the only two places where this thing is needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
13 years agonet: Add linux/sysctl.h includes where needed.
David S. Miller [Thu, 26 May 2011 20:40:37 +0000 (16:40 -0400)]
net: Add linux/sysctl.h includes where needed.

Several networking headers were depending upon the implicit
linux/sysctl.h include they get when including linux/net.h

Add explicit includes.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Kill ether_table[] declaration.
David S. Miller [Thu, 26 May 2011 20:30:57 +0000 (16:30 -0400)]
net: Kill ether_table[] declaration.

This got missed back in 2006 when Jes Sorensen deleted
net/ethernet/sysctl_net_ether.c

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinetpeer: fix race in unused_list manipulations
Eric Dumazet [Thu, 26 May 2011 17:27:11 +0000 (17:27 +0000)]
inetpeer: fix race in unused_list manipulations

Several crashes in cleanup_once() were reported in recent kernels.

Commit d6cc1d642de9 (inetpeer: various changes) added a race in
unlink_from_unused().

One way to avoid taking unused_peers.lock before doing the list_empty()
test is to catch 0->1 refcnt transitions, using full barrier atomic
operations variants (atomic_cmpxchg() and atomic_inc_return()) instead
of previous atomic_inc() and atomic_add_unless() variants.

We then call unlink_from_unused() only for the owner of the 0->1
transition.

Add a new atomic_add_unless_return() static helper

With help from Arun Sharma.

Refs: https://bugzilla.kernel.org/show_bug.cgi?id=32772

Reported-by: Arun Sharma <asharma@fb.com>
Reported-by: Maximilian Engelhardt <maxi@daemonizer.de>
Reported-by: Yann Dupont <Yann.Dupont@univ-nantes.fr>
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: expose ATM device index in sysfs
Dan Williams [Fri, 27 May 2011 04:51:54 +0000 (04:51 +0000)]
atm: expose ATM device index in sysfs

It's currently exposed only through /proc which, besides requiring
screen-scraping, doesn't allow userspace to distinguish between two
identical ATM adapters with different ATM indexes.  The ATM device index
is required when using PPPoATM on a system with multiple ATM adapters.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: David Woodhouse <dwmw2@infradead.org>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'pablo/nf-2.6-updates' of git://1984.lsi.us.es/net-2.6
David S. Miller [Fri, 27 May 2011 17:04:40 +0000 (13:04 -0400)]
Merge branch 'pablo/nf-2.6-updates' of git://1984.lsi.us.es/net-2.6

13 years agoath9k: Fix AR9287 calibration
Adrian Chadd [Thu, 26 May 2011 17:08:04 +0000 (01:08 +0800)]
ath9k: Fix AR9287 calibration

The AR9287 calibration code was not being called because of an
incorrect MAC revision check.
This forced the AR9287 to use the AR9285 initial calibration code and
bypass the AR9287 code entirely.

Signed-off-by: Adrian Chadd <adrian@freebsd.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove duplicate linux/slab.h include from net/mac80211/scan.c
Jesper Juhl [Thu, 26 May 2011 08:53:17 +0000 (10:53 +0200)]
mac80211: Remove duplicate linux/slab.h include from net/mac80211/scan.c

Commit 79f460ca49d8d5700756ab7071c951311c7f29cc add a duplicate
linux/slab.h include to net/mac80211/scan.c - remove it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: clear local->ps_data on disassoc
Eliad Peller [Thu, 26 May 2011 08:46:37 +0000 (11:46 +0300)]
mac80211: clear local->ps_data on disassoc

local->ps_data wasn't cleared on disassociation, which
(in some corner cases) caused reconnections to enter
psm before association completed.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Default to 'n' for 2 new added devices in Kconfig.
Tao Ma [Wed, 25 May 2011 01:44:05 +0000 (09:44 +0800)]
wireless: Default to 'n' for 2 new added devices in Kconfig.

We make oldconfig every time when a new kernel arrives, but
if we don't have such a device(I guess this is the most common
case for a new device), the default value should be 'n' so
that the kernel size we build doesn't grow up too much quickly.
For anyone who has the device, it is OK for them to turn it on
by themselves.

Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwl4965: fix 5GHz operation
Stanislaw Gruszka [Tue, 24 May 2011 14:28:55 +0000 (16:28 +0200)]
iwl4965: fix 5GHz operation

rx_status.band is used uninitialized, what disallow to work on 5GHz .

Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoIPVS: bug in ip_vs_ftp, same list heaad used in all netns.
Hans Schillstrom [Tue, 24 May 2011 12:11:05 +0000 (14:11 +0200)]
IPVS: bug in ip_vs_ftp, same list heaad used in all netns.

When ip_vs was adapted to netns the ftp application was not adapted
in a correct way.
However this is a fix to avoid kernel errors. In the long term another solution
might be chosen.  I.e the ports that the ftp appl, uses should be per netns.

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agomac80211: stop queues before rate control updation
Rajkumar Manoharan [Fri, 20 May 2011 12:22:15 +0000 (17:52 +0530)]
mac80211: stop queues before rate control updation

Stop tx queues before updating rate control to ensure
proper rate selection. Otherwise packets can be transmitted
in 40 Mhz whereas hw is configured in HT20.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: set 40 Mhz rate only if hw is configured in ht40
Rajkumar Manoharan [Fri, 20 May 2011 12:22:14 +0000 (17:52 +0530)]
ath9k: set 40 Mhz rate only if hw is configured in ht40

Whenever there is a channel width change from 40 Mhz to 20 Mhz,
the hardware is reconfigured to ht20. Meantime before doing
the rate control updation, the packets are being transmitted are
selected rate with IEEE80211_TX_RC_40_MHZ_WIDTH.

While transmitting ht40 rate packets in ht20 mode is causing
baseband panic with AR9003 based chips.

==== BB update: BB status=0x02001109 ====
ath: ** BB state: wd=1 det=1 rdar=0 rOFDM=1 rCCK=1 tOFDM=0 tCCK=0 agc=2
src=0 **
ath: ** BB WD cntl: cntl1=0xffff0085 cntl2=0x00000004 **
ath: ** BB mode: BB_gen_controls=0x000033c0 **
ath: ** BB busy times: rx_clear=99%, rx_frame=0%, tx_frame=0% **
ath: ==== BB update: done ====

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: disable phy restart on baseband panic caused by RXSM
Rajkumar Manoharan [Fri, 20 May 2011 12:22:13 +0000 (17:52 +0530)]
ath9k_hw: disable phy restart on baseband panic caused by RXSM

While receiving unsupported rate frame rx state machine
gets into a state 0xb and if phy_restart happens in that
state, BB would go hang. If RXSM is in 0xb state after
first bb panic, ensure to disable the phy_restart.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Reset chip on baseband hang
Rajkumar Manoharan [Fri, 20 May 2011 12:22:10 +0000 (17:52 +0530)]
ath9k: Reset chip on baseband hang

Resetting hardware helps to recover from baseband
hang/panic for AR9003 based chips.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: initialize last var in calibration function
Rafał Miłecki [Thu, 19 May 2011 23:04:46 +0000 (01:04 +0200)]
b43: N-PHY: initialize last var in calibration function

Reported-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>