GitHub/LineageOS/android_kernel_samsung_universal7580.git
13 years agowl12xx: add config_hangover command
Eliad Peller [Sun, 28 Aug 2011 12:11:56 +0000 (15:11 +0300)]
wl12xx: add config_hangover command

Add wl12xx_acx_config_hangover() and respective conf values.
This command configures how long the chip will stay awake
after it was configured to enter psm.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: check for ROC on scan_complete
Eliad Peller [Sun, 28 Aug 2011 12:11:55 +0000 (15:11 +0300)]
wl12xx: check for ROC on scan_complete

When scan completes, and we are not associated, we should start
the dev role and ROC. however, we might already be in this situation
(e.g. if we got disconnected during scan). check for it.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag
Eliad Peller [Sun, 28 Aug 2011 12:11:54 +0000 (15:11 +0300)]
wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag

When setting the WL1271_SCAN_OPT_PRIORITY_HIGH flag, the
driver requests a scan *now*, and the fw doesn't enter psm
before scanning, which in turn might cause packets loss.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: don't disconnect on recovery
Eliad Peller [Sun, 28 Aug 2011 12:11:53 +0000 (15:11 +0300)]
wl12xx: don't disconnect on recovery

allow full connection recovery by dropping the
beacon_loss notification.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add beacon_filtering debugfs file
Eliad Peller [Thu, 25 Aug 2011 15:11:00 +0000 (18:11 +0300)]
wl12xx: add beacon_filtering debugfs file

Allow enabling/disabling beacon_filtering by debugfs,
in order to reduce the log size while debugging (beacon
filtering is disabled by default in AP mode, as beacons
are needed for ERP configuration).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add module_param to trigger BUG() on recovery
Eliad Peller [Thu, 25 Aug 2011 15:10:59 +0000 (18:10 +0300)]
wl12xx: add module_param to trigger BUG() on recovery

Crashing on recovery is useful for debugging, as a JTAG
can be connected in order to investigate the current fw state.
(otherwise, a reconfiguration will occur)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: print the seq_num of rx packet
Eliad Peller [Thu, 25 Aug 2011 15:10:58 +0000 (18:10 +0300)]
wl12xx: print the seq_num of rx packet

Make it easier to match the driver log against
a sniffer log.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: print acx id
Eliad Peller [Thu, 25 Aug 2011 15:10:57 +0000 (18:10 +0300)]
wl12xx: print acx id

Add id param to the acx debug print (on wl1271_cmd_configure)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agoMerge branch 'wl12xx-next' into for-linville
Luciano Coelho [Wed, 14 Sep 2011 08:32:15 +0000 (11:32 +0300)]
Merge branch 'wl12xx-next' into for-linville

13 years agocfg80211: print bandwidth in chan_reg_rule_print_dbg()
Pavel Roskin [Thu, 1 Sep 2011 15:54:12 +0000 (11:54 -0400)]
cfg80211: print bandwidth in chan_reg_rule_print_dbg()

Two spaces and the second "KHz" suggest that the code author meant to
print the bandwidth but forgot it.  The code appears in commit e702d3cf
already with two spaces and "KHz" in place of the bandwidth.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: ath9k_hw_set_txpowerlimit sets previous txpower
Bill Jordan [Wed, 31 Aug 2011 21:51:00 +0000 (17:51 -0400)]
ath9k: ath9k_hw_set_txpowerlimit sets previous txpower

In commit 9c204b46c7af93e334114bea1f5eeaa6fea9ba07
(ath9k_hw: do not limit initial tx power to 20 dbm),
setting of txpower was broken.

This patch fixes it by initializing reg_pwr from the new
power limit, not the previous value.

Signed-off-by: Bill Jordan <bjordan@rajant.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: add conditions for few operations
Rafał Miłecki [Wed, 31 Aug 2011 21:36:21 +0000 (23:36 +0200)]
b43: LCN-PHY: add conditions for few operations

It was not possible to guess the conditions from MMIO dumps. Take them
from brcmsmac code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: rename functions, get rid of magic names
Rafał Miłecki [Wed, 31 Aug 2011 21:36:20 +0000 (23:36 +0200)]
b43: LCN-PHY: rename functions, get rid of magic names

We've compared b43 with brcmsmac and took functions names from the
later.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: upload additional 0x7 table
Rafał Miłecki [Wed, 31 Aug 2011 21:36:19 +0000 (23:36 +0200)]
b43: LCN-PHY: upload additional 0x7 table

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: rewrite 0x7 table at the end of init
Rafał Miłecki [Wed, 31 Aug 2011 21:36:18 +0000 (23:36 +0200)]
b43: LCN-PHY: rewrite 0x7 table at the end of init

This is not implemented in brcmsmac, but was noticed in (newer) wl. Can
be workaround for some hardware bug.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: put tables functions in correct file
Rafał Miłecki [Wed, 31 Aug 2011 21:36:17 +0000 (23:36 +0200)]
b43: LCN-PHY: put tables functions in correct file

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: minor fixes
Rafał Miłecki [Wed, 31 Aug 2011 21:36:16 +0000 (23:36 +0200)]
b43: LCN-PHY: minor fixes

The biggest change is reversing order of reading 32-bit table value.
MMIO dumps has shown it's done that way for LCN-PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add new chipset support
zero.lin [Wed, 31 Aug 2011 18:43:52 +0000 (20:43 +0200)]
rt2x00: Add new chipset support

Signed-off-by: zero.lin <zero.lin@ralinktech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/cfg80211: add match filtering for sched_scan
Luciano Coelho [Wed, 31 Aug 2011 13:01:48 +0000 (16:01 +0300)]
nl80211/cfg80211: add match filtering for sched_scan

Introduce filtering for scheduled scans to reduce the number of
unnecessary results (which cause useless wake-ups).

Add a new nested attribute where sets of parameters to be matched can
be passed when starting a scheduled scan.  Only scan results that
match any of the sets will be returned.

At this point, the set consists of a single parameter, an SSID.  This
can be easily extended in the future to support more complex matches.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/cfg80211: add WIPHY_FLAG_AP_UAPSD flag
Eliad Peller [Wed, 31 Aug 2011 08:29:43 +0000 (11:29 +0300)]
nl80211/cfg80211: add WIPHY_FLAG_AP_UAPSD flag

add WIPHY_FLAG_AP_UAPSD flag to indicate uapsd support on
AP mode.

Advertise it to userspace by including a new
NL80211_ATTR_SUPPORT_AP_UAPSD attribute.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: signedness bug in iwl_trans_pcie_tx_agg_alloc()
Dan Carpenter [Wed, 31 Aug 2011 06:38:30 +0000 (09:38 +0300)]
iwlwifi: signedness bug in iwl_trans_pcie_tx_agg_alloc()

unsigned shorts and unsigned chars are never == -1.

Signed-off-by: Dan Carpenter <error27@gmail.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: fix double assign in iwl_start_tx_ba_trans_ready()
Dan Carpenter [Wed, 31 Aug 2011 06:37:42 +0000 (09:37 +0300)]
iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready()

"vif" is assigned twice.  We can remove the first one.

This silences a Smatch warning that "ctx" could be one step past the
end of the priv->contexts[] array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix rx latency of 11a mode
Rajkumar Manoharan [Wed, 31 Aug 2011 05:17:30 +0000 (10:47 +0530)]
ath9k_hw: Fix rx latency of 11a mode

Rx latecy to start signal(usec) of 11a is 41 not 37 and
also corrected the rx delay in quarter rate.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: handle allocation failures in mesh_pathtbl_init()
Dan Carpenter [Tue, 30 Aug 2011 19:16:15 +0000 (22:16 +0300)]
mac80211: handle allocation failures in mesh_pathtbl_init()

The calls to kzalloc() weren't checked here and it upsets the static
checkers.  Obviously they're not super likely to fail, but we might
as well add some error handling.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add flag to indicate HW only Tx-agg setup support
Arik Nemtsov [Tue, 30 Aug 2011 06:32:38 +0000 (09:32 +0300)]
mac80211: add flag to indicate HW only Tx-agg setup support

When this flag is set, Tx A-MPDU sessions will not be started by
mac80211. This flag is required for devices that support Tx A-MPDU setup
in hardware.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Remove unnecessary OOM logging messages
Joe Perches [Mon, 29 Aug 2011 21:17:41 +0000 (14:17 -0700)]
wireless: Remove unnecessary OOM logging messages

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorfkill: Remove unnecessary OOM logging messages
Joe Perches [Mon, 29 Aug 2011 21:17:34 +0000 (14:17 -0700)]
rfkill: Remove unnecessary OOM logging messages

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove unnecessary OOM logging messages
Joe Perches [Mon, 29 Aug 2011 21:17:31 +0000 (14:17 -0700)]
mac80211: Remove unnecessary OOM logging messages

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Consolidate mesh path duplicated functions
Javier Cardona [Mon, 29 Aug 2011 20:23:09 +0000 (13:23 -0700)]
mac80211: Consolidate mesh path duplicated functions

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Consolidate {mesh,mpp}_path_flush into one function
Javier Cardona [Mon, 29 Aug 2011 20:23:08 +0000 (13:23 -0700)]
mac80211: Consolidate {mesh,mpp}_path_flush into one function

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Don't iterate twice over all mpaths when once in sufficient
Javier Cardona [Mon, 29 Aug 2011 20:23:07 +0000 (13:23 -0700)]
mac80211: Don't iterate twice over all mpaths when once in sufficient

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove redundant mesh path expiration checks
Javier Cardona [Mon, 29 Aug 2011 20:23:06 +0000 (13:23 -0700)]
mac80211: Remove redundant mesh path expiration checks

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Improve mpath state locking
Javier Cardona [Mon, 29 Aug 2011 20:23:05 +0000 (13:23 -0700)]
mac80211: Improve mpath state locking

No need to take the mpath state lock when an mpath is removed.
Also, no need checking the lock when reading mpath flags.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove mesh paths when an interface is removed
Javier Cardona [Mon, 29 Aug 2011 20:23:04 +0000 (13:23 -0700)]
mac80211: Remove mesh paths when an interface is removed

When an interface is removed, the mesh paths associated with it should
also be removed.

This fixes a bug we observed when reloading a device driver module
without reloading mac80211s.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix RCU pointer dereference in mesh_path_discard_frame()
Javier Cardona [Mon, 29 Aug 2011 20:23:03 +0000 (13:23 -0700)]
mac80211: Fix RCU pointer dereference in mesh_path_discard_frame()

Reported by Pedro Larbig (ASPj)

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: replace kmalloc & memcpy sequence with kmemdup
Yogesh Ashok Powar [Mon, 29 Aug 2011 20:21:10 +0000 (13:21 -0700)]
mwifiex: replace kmalloc & memcpy sequence with kmemdup

Sequence of kmalloc/kzalloc and memcpy is replaced with
kmemdup.

Cc: Walter Harms <wharms@bfs.de>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix checks for first subframe delimiter padding
Felix Fietkau [Mon, 29 Aug 2011 16:57:54 +0000 (18:57 +0200)]
ath9k: fix checks for first subframe delimiter padding

The commit "ath9k_hw: Fix exceed transmission burst-time of 5GHz" added
a padding of 60 delimiters on the first subframe to work around an issue
on AR9380, but it lacked the checks to prevent it from being applied to
pre-AR9380, enterprise AR9380 or AR9580+

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: Set hardware flag IEEE80211_HW_AP_LINK_PS
Yogesh Ashok Powar [Mon, 29 Aug 2011 11:42:44 +0000 (17:12 +0530)]
mwl8k: Set hardware flag IEEE80211_HW_AP_LINK_PS

This will avoid mac80211 to trigger PS mode for connected station
based on the PM bit of incoming frames. AP firmware is capable of
handling such frames and buffering TX frames destined to the
stations that are in PS mode.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix the last register write for ar5416 addac
Felix Fietkau [Mon, 29 Aug 2011 11:39:47 +0000 (13:39 +0200)]
ath9k_hw: fix the last register write for ar5416 addac

The previous register used in these initvals was probably accidentally
copied over from the AR9100 values.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: drop an unused column in AR5008-AR9002 initvals
Felix Fietkau [Mon, 29 Aug 2011 11:39:46 +0000 (13:39 +0200)]
ath9k_hw: drop an unused column in AR5008-AR9002 initvals

It was used for the defunct 'turbo' mode which was never implemented in the
driver. Saves ~7.5k uncompressed

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/nl80211: Indicate roaming feature capability to userspace.
Vivek Natarajan [Mon, 29 Aug 2011 08:53:03 +0000 (14:23 +0530)]
cfg80211/nl80211: Indicate roaming feature capability to userspace.

When the rssi of the current AP drops, both wpa_supplicant and the
firmware may do a background scan to find a better AP and try to
associate. Since firmware based roaming is faster, inform
wpa_supplicant to avoid roaming and let the firmware decide to
roam if necessary.

For fullmac drivers like ath6kl, it is just enough to provide the
ESSID and the firmware will decide on the BSSID. Since it is not
possible to do pre-auth during roaming for fullmac drivers, the
wpa_supplicant needs to completely disconnect with the old AP and
reconnect with the new AP. This consumes lot of time and it is
better to leave the roaming decision to the firmware.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: retry sending failed BAR frames later instead of tearing down aggr
Felix Fietkau [Sun, 28 Aug 2011 19:11:01 +0000 (21:11 +0200)]
mac80211: retry sending failed BAR frames later instead of tearing down aggr

Unfortunately failed BAR tx attempts happen more frequently than I
expected, and the resulting aggregation teardowns cause performance
issues, as the aggregation session does not always get re-established
properly.
Instead of tearing down the entire aggr session, we can simply store the
SSN of the last failed BAR tx attempt, wait for the first successful
tx status event, and then send another BAR with the same SSN.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: implement saving and restoring PHY & radio configuration
Rafał Miłecki [Sun, 28 Aug 2011 17:59:28 +0000 (19:59 +0200)]
b43: LCN-PHY: implement saving and restoring PHY & radio configuration

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobcma: extract some basic info about board from SPROM
Rafał Miłecki [Sun, 28 Aug 2011 16:47:23 +0000 (18:47 +0200)]
bcma: extract some basic info about board from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: use u16 for storing board rev
Rafał Miłecki [Sun, 28 Aug 2011 16:47:22 +0000 (18:47 +0200)]
ssb: use u16 for storing board rev

Specs say about size 2 (u16) and my 14e4:4727 has board rev 0x1211.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: prepare functions for channel switching
Rafał Miłecki [Sun, 28 Aug 2011 12:59:58 +0000 (14:59 +0200)]
b43: LCN-PHY: prepare functions for channel switching

Switching is not fully implemented yet, prepare place for the code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: implement more PHY ops before radio init
Rafał Miłecki [Sun, 28 Aug 2011 12:28:44 +0000 (14:28 +0200)]
b43: LCN-PHY: implement more PHY ops before radio init

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: add R/W ops for PHY and radio
Rafał Miłecki [Sun, 28 Aug 2011 12:28:43 +0000 (14:28 +0200)]
b43: LCN-PHY: add R/W ops for PHY and radio

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: do not apply the 2.4 ghz ack timeout workaround to cts
Felix Fietkau [Sat, 27 Aug 2011 23:52:10 +0000 (01:52 +0200)]
ath9k_hw: do not apply the 2.4 ghz ack timeout workaround to cts

It is only used to workaround interoperability issues related to longer
delays in receiving the block ack, so it is not necessary to apply it
to the CTS exchange.
Should improve throughput slightly, especially when there are lots
of retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Defer tranmission of mesh path errors
Javier Cardona [Tue, 6 Sep 2011 19:10:43 +0000 (12:10 -0700)]
mac80211: Defer tranmission of mesh path errors

Under failure conditions, the mesh stack sends PERR messages to the
previous sender of the failed frame.  This happens in the tx feedback
path, in which the transmission queue lock may be taken.  Avoid a
deadlock by sending the path error via the pending queue.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: iwl-agn-rs.c: remove old comment
Greg Dietsche [Sun, 28 Aug 2011 13:22:38 +0000 (08:22 -0500)]
iwlwifi: iwl-agn-rs.c: remove old comment

this comment refers to some code that was removed.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: defer ath_tx_setup_buffer setup to the first tx attempt during aggr
Felix Fietkau [Sat, 27 Aug 2011 22:32:25 +0000 (00:32 +0200)]
ath9k: defer ath_tx_setup_buffer setup to the first tx attempt during aggr

With sequence number and buffer allocation deferred to when they're needed
for the first time, it becomes much easier to start dropping packets from
the tid queue if necessary, e.g. when latency suddenly increases. This can
lead to some future improvements in buffer management for better latency.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: move seqno allocation in the tx path to ath_tx_setup_buffer
Felix Fietkau [Sat, 27 Aug 2011 22:32:24 +0000 (00:32 +0200)]
ath9k: move seqno allocation in the tx path to ath_tx_setup_buffer

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: move the sequence number from ath_frame_info to ath_buf
Felix Fietkau [Sat, 27 Aug 2011 22:32:23 +0000 (00:32 +0200)]
ath9k: move the sequence number from ath_frame_info to ath_buf

It is only necessary for BAW tracking and moving it to the ath_buf
makes it easier to add further improvements, such as deferring
seqno allocation in the aggregation path.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: clean up the aggregation tid queue
Felix Fietkau [Sat, 27 Aug 2011 22:32:22 +0000 (00:32 +0200)]
ath9k: clean up the aggregation tid queue

Use a sk_buff_head instead containing skbs instead of a list_head
containing ath_bufs. This makes it easier to decouple the aggregation
code from the ath_buf struct

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use u8 for the tx key index
Felix Fietkau [Sat, 27 Aug 2011 22:32:21 +0000 (00:32 +0200)]
ath9k: use u8 for the tx key index

This saves some space in struct ath_frame_info

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: Make ath_printk void not int and remove unused struct ath_common *
Joe Perches [Fri, 26 Aug 2011 08:56:39 +0000 (01:56 -0700)]
ath: Make ath_printk void not int and remove unused struct ath_common *

Changing the return type and removing the unused argument from
ath_printk reduces code size.

Add an __always_unused struct ath_common * to the macros
that call ath_printk to avoid unused variable warnings.

$ size drivers/net/wireless/ath/built-in.o*
   text    data     bss     dec     hex filename
1159859   16235  212000 1388094  152e3e drivers/net/wireless/ath/built-in.o.new
1164175   16235  212032 1392442  153f3a drivers/net/wireless/ath/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: Make ath_dbg void not int
Joe Perches [Fri, 26 Aug 2011 08:56:38 +0000 (01:56 -0700)]
ath: Make ath_dbg void not int

The return value is never used so make it void.

Reduces object size a tiny bit.

$ size drivers/net/wireless/ath/built-in.o*
   text    data     bss     dec     hex filename
1164175   16235  212032 1392442  153f3a drivers/net/wireless/ath/built-in.o.new
1164819   16235  212032 1393086  1541be drivers/net/wireless/ath/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl12xx/sdio_test.c: fix build breakage from WL127X_FW_NAME change
John W. Linville [Mon, 29 Aug 2011 19:47:58 +0000 (15:47 -0400)]
wl12xx/sdio_test.c: fix build breakage from WL127X_FW_NAME change

Commit c302b2c959164622558474871ae942da0e484a38 ("wl12xx: Use a single
fw for both STA and AP roles") changed the name of the firmware name
definition, breaking the build of wl12xx/sdio_test.c.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: Fix swatch warning
Larry Finger [Sat, 27 Aug 2011 20:53:42 +0000 (15:53 -0500)]
b43: Fix swatch warning

Swatch reports the following warning for main.c:

  CHECK   drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c +4115 b43_wireless_core_stop(7) warn: variable dereferenced before check 'dev'

After analysis, this is not a bug, but a false warning. Nonetheless,
a cleanup is in order to prevent some future janitor proposing
the wrong fix, as I did in my original patch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix a smatch warnings
Larry Finger [Sat, 27 Aug 2011 18:56:00 +0000 (13:56 -0500)]
ath9k: Fix a smatch warnings

Smatch shows the following warnings:

  CHECK   drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/htc_drv_main.c +1315 ath9k_htc_configure_filter(27) warn: inconsistent returns mutex:&priv->mutex: locked (1303) unlocked (1315)

  CHECK   drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +3321 ar9300_eeprom_restore_internal(20) warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add debugfs support for mac/baseband samples
Rajkumar Manoharan [Sat, 27 Aug 2011 10:47:47 +0000 (16:17 +0530)]
ath9k: Add debugfs support for mac/baseband samples

This patch keep track of number of samples that includes
DMA debugs registers, PCU observe, CR, channel noise,
cycle conters, noisefloor history buffer and last N number
of tx and rx descriptor status. These samples are grouped
in table manner which dumping in debgufs.

Debugfs file location:
    <debugfs_mnt>/ieee80211/phy#/ath9k/samples

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix regression in sending aggregated packets
Felix Fietkau [Sat, 27 Aug 2011 08:25:27 +0000 (10:25 +0200)]
ath9k: fix regression in sending aggregated packets

The recent commit "ath9k: Send legacy rated frames as unaggregated"
introduced a check to ensure that packets with non-MCS rates set in
the rate series will not be aggregated. However, it failed to check
if the rate series is valid before testing the flags, thus breaking
aggregation for normal MCS-only packets if the last series is unset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix eifs/usec timeout for AR9287 v1.3+
Rajkumar Manoharan [Sat, 27 Aug 2011 06:43:21 +0000 (12:13 +0530)]
ath9k: Fix eifs/usec timeout for AR9287 v1.3+

For AR9287 v1.3+ chips, MAC runs at 117MHz. But the initvals
IFS parameters are loaded based on 44/88MHz clockrate. So
eifs/usec from ini should not be used for AR9287 v1.3+.
The mentioned values are tested on 2 chain HT40 mode.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Set default slottime as 9us
Rajkumar Manoharan [Sat, 27 Aug 2011 05:52:59 +0000 (11:22 +0530)]
ath9k_hw: Set default slottime as 9us

Initialize 9us slot time as that is what is used mostly
(for non-ERP cases) and also to be in sync with initvals.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: make HT-PHY support experimental
Rafał Miłecki [Fri, 26 Aug 2011 18:41:40 +0000 (20:41 +0200)]
b43: make HT-PHY support experimental

It was tested on three BCM4331 devices, code has been written from MMIO
dumps only, but seems to be quite stable.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: use 8K buffers for 64-bit DMA to workaround hardware bug
Rafał Miłecki [Fri, 26 Aug 2011 18:41:39 +0000 (20:41 +0200)]
b43: use 8K buffers for 64-bit DMA to workaround hardware bug

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: Relax requirement for descriptors to be in the DMA zone
Larry Finger [Fri, 26 Aug 2011 18:41:38 +0000 (20:41 +0200)]
b43: Relax requirement for descriptors to be in the DMA zone

When 64-bit DMA was first used, there were problems with the
BCM4311 (14e4:4311). The problem was "fixed" by using the GFP_DMA
flag in the allocation of coherent ring descriptor memory.

The original problem is now believed to have been due to bugs in
the 64-bit DMA implementation in the rest of the kernel, and that
those bugs have been fixed. Accordingly, the requirement for the
descriptors to be in the DMA zone is relaxed.

Bounce buffers are left in the DMA zone.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54spi: add "spi:" prefix for stlc45xx modalias
Axel Lin [Fri, 26 Aug 2011 06:34:59 +0000 (14:34 +0800)]
p54spi: add "spi:" prefix for stlc45xx modalias

Since commit e0626e38 (spi: prefix modalias with "spi:"),
the spi modalias is prefixed with "spi:".

This patch adds "spi:" prefix for modalias of stlc45xx.
Also move it to be group with other modalias.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-By: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: handle GO powersave
Johannes Berg [Fri, 26 Aug 2011 06:13:56 +0000 (23:13 -0700)]
iwlagn: handle GO powersave

In order to implement support for GO powersave on
the P2P client side, the ucode needs to know what
GO we're trying to authenticate/associate with,
it needs to have a station entry and the BSSID in
the RXON set.

Implement the new mac80211 callbacks to give this
data to the device.

Since this is also useful for the device when a
normal connection is established, also program it
with the information in that case.

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: move tx queues to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:32 +0000 (23:11 -0700)]
iwlagn: move tx queues to transport layer

This finalizes the move of the data path to the transport layer.

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: move the stop / wake queue logic to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:31 +0000 (23:11 -0700)]
iwlagn: move the stop / wake queue logic to transport layer

priv->mac80211_registered and priv->hw needed to move to shared.
stop_queue API was added in order to allow the upper layer to stop
the SW queues for regulatory purposes.

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: move check_stuck_queue to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:30 +0000 (23:11 -0700)]
iwlagn: move check_stuck_queue to transport layer

This one is really transport related.

==== moves Stanislaw's code to BSD area ====

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: move wait_for_tx_queue_empty to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:29 +0000 (23:11 -0700)]
iwlagn: move wait_for_tx_queue_empty to transport layer

This one is really transport related.

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: cosmetics in iwl-trans.h
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:28 +0000 (23:11 -0700)]
iwlagn: cosmetics in iwl-trans.h

Remove a few dereferences of priv from the transport layer while
at it.

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: move the disable agg logic to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:27 +0000 (23:11 -0700)]
iwlagn: move the disable agg logic to transport layer

Since all the check_empty logic is now in the transport layer,
the upper layer doesn't need to know anything about tx queues.
The disable aggregation flow was the last to know what a tx queue
is, so move it too.

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: move the check_empty logic to the transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:26 +0000 (23:11 -0700)]
iwlagn: move the check_empty logic to the transport layer

This logic is responsible to tell mac80211 when the HW queues are
empty and the BA session can be started / torn down.

Fix a bug on the way:
When the the Tx BA session is stopped and the HW queues aren't empty,
we stop the SW queue to drain the HW queue and then switch to the
legacy HW queue. This is the IWL_EMPTYING_HW_QUEUE_DELBA state.

While in this state, we never wake the SW queue, even when the HW
queue is almost empty, since we need to drain it completely. Look
at iwl_trans_pcie_reclaim regarding this.

Once the HW queue is really empty, we must wake the SW queue in order
to get traffic to the legacy queue.
This step was missing leading to an odd situation were the traffic
would just stall after we tore down a Tx BA session while the HW
queue was not empty.

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: allocate resources for TX BA session in transport
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:25 +0000 (23:11 -0700)]
iwlagn: allocate resources for TX BA session in transport

The queues and all the related logic suits to the transport layer.

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: move the mapping ac to queue / fifo to transport
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:24 +0000 (23:11 -0700)]
iwlagn: move the mapping ac to queue / fifo to transport

This mapping is transport related.
This allows us to remove the notion of tx queue from the tx path in
the upper layer.
iwl_wake_any_queue moved to transport layer since it needs to access
these mappings.
The TX API is nicer now:

int (*tx)(struct iwl_trans *trans, struct sk_buff *skb,
struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id);

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: upper layer uses slabs to allocate tx cmds
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:23 +0000 (23:11 -0700)]
iwlagn: upper layer uses slabs to allocate tx cmds

In a near future, the upper layer won't be aware of the tx queues.
This allows to remove one place where the upper layer needed to
provide the tx queue index to the transport layer.
This also saves around 1.5MB.

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: set tx_fifo for ampdu in transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:22 +0000 (23:11 -0700)]
iwlagn: set tx_fifo for ampdu in transport layer

the mapping tx_queue -> fifo is really transport related. The upper
layer should be involved in such things.

Note that upon agg_disable, the queue is always mapped to fifo 0, but
this doesn't matter since when the queue will be setup again for a
new BA session, it will be configured to the good fifo anyway.

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: upper layer stores iwl_rxon_context in skb's CB
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:21 +0000 (23:11 -0700)]
iwlagn: upper layer stores iwl_rxon_context in skb's CB

This removes the need for iwl_tx_info.
Each tx queue holds an array of skbs, the transport layer doesn't
need to know anything about the context in which a specific skb is
sent.

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: stop the device before freeing it
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:20 +0000 (23:11 -0700)]
iwlagn: stop the device before freeing it

When we remove the module, we free all the tx and rx resources.
Before doing that, we'd better stop the tx / rx activity. Calling
iwl_trans_stop_device in iwl_remove helps also to remove a few API
functions:
 * rx_free: happens in iwl_trans_free
 * tx_free: happens in iwl_trans_free
 * disable_sync_irq: happens in iwl_trans_stop_device

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: remove dereferences of priv from transport
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:19 +0000 (23:11 -0700)]
iwlagn: remove dereferences of priv from transport

There are still quite a few, but much less.
A few fields have been moved /copied to hw_params which sits in the
shared area:
 * priv->cfg->base_params->num_of_ampdu_queues
 * priv->cfg->base_params->shadow_reg_enable
 * priv->cfg->sku
 * priv->ucode_owner

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: iwl_tid_data moves to iwl-shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:18 +0000 (23:11 -0700)]
iwlagn: iwl_tid_data moves to iwl-shared

The rate scaling and the transport need to access the data in
iwl_tid_data, hence the move.

Note that the only component in the upper layer that needs this data
is the rate scaling. Refactoring the rate scaling may help to move
iwl_tid_data from the shared area to the transport area.

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: adding special "D" SKU for 2000 series
Wey-Yi Guy [Fri, 26 Aug 2011 06:11:17 +0000 (23:11 -0700)]
iwlagn: adding special "D" SKU for 2000 series

One more sku for 2000 series with different Subsystem ID

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: iwl-pci doesn't include iwl-dev any more
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:16 +0000 (23:11 -0700)]
iwlagn: iwl-pci doesn't include iwl-dev any more

Move all the iwlXXX_abgn_cfg forward declaration to a separate file
so that iwl-pci.c doesn't need to include iwl-agn.h that includes
all iwl-dev.h
This allows to provide real encapsulation. Dereferencing iwl_priv
in the bus layer will now lead to a compilation error.

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 compile warnings when CONFIG_PM_SLEEP is not set
Daniel Halperin [Fri, 26 Aug 2011 06:11:15 +0000 (23:11 -0700)]
iwlagn: fix compile warnings when CONFIG_PM_SLEEP is not set

  CC [M]  drivers/net/wireless/iwlwifi/iwl-pci.o
  drivers/net/wireless/iwlwifi/iwl-pci.c:506: warning: \91iwl_pci_suspend\92 defined but not used
  drivers/net/wireless/iwlwifi/iwl-pci.c:519: warning: \91iwl_pci_resume\92 defined but not used

These are only used if CONFIG_PM_SLEEP is enabled. CONFIG_PM depends
(CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME), so it can be set without
CONFIG_PM_SLEEP selected.

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: all function iwl-io.c receive iwl_bus
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:14 +0000 (23:11 -0700)]
iwlagn: all function iwl-io.c receive iwl_bus

Which means that iwl-io.c doesn't need to include iwl-dev.h any more.

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: add missing includes
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:13 +0000 (23:11 -0700)]
iwlagn: add missing includes

a few h files weren't self contained. Fix that.
Move iwl_dma_ptr to transport layer since it is not used by the upper layer
any more.

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: move Keep Warm to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:12 +0000 (23:11 -0700)]
iwlagn: move Keep Warm to transport layer

It is relevant for PCIe only.

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: iwl-dev.h doesn't include iwl-fh.h any more
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:11 +0000 (23:11 -0700)]
iwlagn: iwl-dev.h doesn't include iwl-fh.h any more

Since iwl-fh.h contains transport related data, it shouldn't be included by the
upper layer.
Only the transport layer and iwl-agn-ucode.c includes it.

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: remove unused parameters from hw_params
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:10 +0000 (23:11 -0700)]
iwlagn: remove unused parameters from hw_params

Some of them weren't used at all, the others always had the same value since
the driver split.

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: remove references to priv from the transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:09 +0000 (23:11 -0700)]
iwlagn: remove references to priv from the transport layer

Continue to the clean up of the priv dereferencing from the transport layer.

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: move dump_csr and dump_fh to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:08 +0000 (23:11 -0700)]
iwlagn: move dump_csr and dump_fh to transport layer

These are transport layer related. Move also the corresponding debugfs handlers.

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: move hcmd_lock to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:07 +0000 (23:11 -0700)]
iwlagn: move hcmd_lock to transport layer

Since it is needed for host commands only, it is needed in transport layer only

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: transport layer should receive iwl_trans
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:06 +0000 (23:11 -0700)]
iwlagn: transport layer should receive iwl_trans

Change a lot of functions to have them receive iwl_trans and not iwl_priv.

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: move iwl_free_pages to iwl-shared.h
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:05 +0000 (23:11 -0700)]
iwlagn: move iwl_free_pages to iwl-shared.h

This helper is used by the transport and the upper layer.
Kill __iwl_free_pages which was used in the transport only.

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: move all iwl_is_XXX helpers to iwl-shared.h
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:04 +0000 (23:11 -0700)]
iwlagn: move all iwl_is_XXX helpers to iwl-shared.h

Logic move after all priv->status moved to struct iwl_shared

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 the check of IWLAGN_FIRST_AMPDU_QUEUE
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:03 +0000 (23:11 -0700)]
iwlagn: fix the check of IWLAGN_FIRST_AMPDU_QUEUE

BUILD_BUG_ON(ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo) !=
IWLAGN_FIRST_AMPDU_QUEUE);

This check can be buggy. IWLAGN_FIRST_AMPDU_QUEUE has to be greater than the
ARRAY_SIZE of iwlagn_ipan_queue_to_tx_fifo.

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>