Eyal Shapira [Wed, 14 Mar 2012 04:32:10 +0000 (06:32 +0200)]
wl12xx: support wowlan wakeup patterns
Use FW RX data filters to support cfg80211 wowlan wakeup patterns.
This enables to wake up the host from suspend following detection
of certain configurable patterns within an incoming packet.
Up to 5 patterns are supported. Once the host is resumed
any configured RX data filter is cleared.
A single pattern can match several bytes sequences with different
offsets within a packet.
Eyal Shapira [Wed, 14 Mar 2012 04:32:07 +0000 (06:32 +0200)]
wlcore: add RX filters util functions
This is prep work for the support of wowlan patterns
using the FW data rx filters mechanism.
Added an rx filter struct and some util functions
required to manipulate it.
Eric Lapuyade [Mon, 7 May 2012 10:31:31 +0000 (12:31 +0200)]
NFC: HCI drivers don't have to keep track of polling state
The NFC core code already does that for them.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Mon, 7 May 2012 10:31:29 +0000 (12:31 +0200)]
NFC: HCI based pn544 driver
This is an NFC driver for NXP pn544.
Unlike pn544.c, this one is based on the NFC HCI and SHDLC kernel layers.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
NFC: The NFC genl family structure should not be exposed globally
The variable 'nfc_genl_family' is only referenced in this file and
should be marked static to prevent it from being exposed globally.
Quites the sparse warning:
warning: symbol 'nfc_genl_family' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The variable 'hci_nfc_ops' is only referenced in this file and
should be marked static to prevent it from being exposed globally.
Quites the sparse warning:
warning: symbol 'hci_nfc_ops' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
NFC: Quiet nci/ntf.c sparse noise about plain integer as NULL pointer
Pointers should be cleared with NULL, not 0.
Quiets a couple sparse warnings of the type:
warning: Using plain integer as NULL pointer
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Include the header to pickup the exported symbol prototype.
Quites the sparse warning:
warning: symbol 'nci_to_errno' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> CC: Samuel Ortiz <sameo@linux.intel.com> CC: "David S. Miller" <davem@davemloft.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
NFC: Quiet nci/data.c sparse noise about plain integer as NULL pointer
Pointers should be cleared with NULL, not 0.
Quiets a couple sparse warnings of the type:
warning: Using plain integer as NULL pointer
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
joseph daniel [Mon, 7 May 2012 10:31:23 +0000 (12:31 +0200)]
NFC: Fix LLCP compilation warning
nfc_llcp_general_bytes is defined in nfc/core.c as:
nfc_llcp_general_bytes(struct nfc_dev *dev, size_t *gb_len).
as in nfc/nfc.h:
nfc_llcp_general_bytes(struct nfc_dev *dev, u8 *gb_len), if CONFIG_NFC_LLCP
is not defined.
so we got some warnings,
net/nfc/core.c:207:2: warning: passing argument 2 of ‘nfc_llcp_general_bytes’ from incompatible pointer type [enabled by default]
net/nfc/nfc.h:87:19: note: expected ‘u8 *’ but argument is of type ‘size_t *’
Signed-off-by: joseph daniel <josephdanielwalter@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Mon, 7 May 2012 10:31:18 +0000 (12:31 +0200)]
NFC: Remove unneeded pn533 dev NULL check
container_of() works by subtracting the offset of the member. The math
can't really return a zero here. Sometimes people check it when they
actually meant to check something else but in this case we can just
remove the check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Mon, 7 May 2012 10:31:17 +0000 (12:31 +0200)]
NFC: Update Documentation/nfc-hci.txt
Document the new HCI ops and fix a few typos and spelling mistakes.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Mon, 7 May 2012 10:31:16 +0000 (12:31 +0200)]
NFC: Add HCI/SHDLC support to let driver check for tag presence
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Mon, 7 May 2012 10:31:15 +0000 (12:31 +0200)]
NFC: Specify usage for targets found and target lost events
It is now specified that nfc_target_found() and nfc_target_lost() core
functions must not be called from an atomic context. This allow us to
serialize calls and protect the targets table using the nfc device lock
instead of a spinlock.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Mon, 7 May 2012 10:31:14 +0000 (12:31 +0200)]
NFC: Remove useless HCI private nfc target table
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Mon, 7 May 2012 10:31:13 +0000 (12:31 +0200)]
NFC: Cache the core NFC active target pointer instead of its index
The NFC Core now caches the active nfc target pointer, thereby avoiding
the need to lookup the target table for each invocation of a driver ops.
Consequently, pn533, HCI and NCI now directly receive an nfc_target
pointer instead of a target index.
Cc: Ilan Elias <ilane@ti.com> Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sun, 6 May 2012 21:01:05 +0000 (16:01 -0500)]
b43legacy: Fix error due to MMIO access with SSB unpowered
There is a dummy read of a PCI MMIO register that occurs before the SSB bus
has been powered, which is an error. This bug has not been seen earlier,
but was apparently exposed when udev was updated to version 182.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:38 +0000 (18:27 -0700)]
brcmfmac: replace brcmf_sdioh_card_regread with brcmf_sdio_regrl
Use the newly introduced brcmf_sdio_regrl to replace
brcmf_sdioh_card_regread as part of the SDIO WiFi dongle register
access interface clean up.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:37 +0000 (18:27 -0700)]
brcmfmac: remove function brcmf_sdcard_regfail
The new interface brcmf_sdio_regr/w provides result of access
attempts. It is no longer necessary to use dedicated variable
and function to provide enquiry for failure.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:36 +0000 (18:27 -0700)]
brcmfmac: remove redundant retries for SDIO core register access
The new brcmf_sdio_regrl/regwl interface has already performed
retries on failed attempts. It is no longer necessary to have the
retry mechanism in r_sdreg32/w_sdreg32.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:35 +0000 (18:27 -0700)]
brcmfmac: replace brcmf_sdcard_reg_write with brcmf_sdio_regwl
Use the newly introduced brcmf_sdio_regwl to replace
brcmf_sdcard_reg_write as part of the SDIO WiFi dongle register
access interface clean up.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:34 +0000 (18:27 -0700)]
brcmfmac: replace brcmf_sdcard_reg_read with brcmf_sdio_regrl
Use the newly introduced brcmf_sdio_regrl to replace
brcmf_sdcard_reg_read as part of the SDIO WiFi dongle register
access interface clean up.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:33 +0000 (18:27 -0700)]
brcmfmac: replace brcmf_sdcard_cfg_write with brcmf_sdio_regwb
Use the newly introduced brcmf_sdio_regwb to replace
brcmf_sdcard_cfg_write as part of the SDIO WiFi dongle register
access interface clean up.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:32 +0000 (18:27 -0700)]
brcmfmac: replace brcmf_sdcard_cfg_read with brcmf_sdio_regrb
Use the newly introduced brcmf_sdio_regrb to replace
brcmf_sdcard_cfg_read as part of the SDIO WiFi dongle register
access interface clean up.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:31 +0000 (18:27 -0700)]
brcmfmac: introduce unified register access interface for SDIO
Both brcmf_sdcard_cfg_read/write and brcmf_sdcard_reg_read/write
are used as interface functions for register access of SDIO WiFi
dongle. A unified interface brcmf_sdio_regr/w is introduced in
this patch in order to simplify the interface and keep the
complexity within the lower layer.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:30 +0000 (18:27 -0700)]
brcmfmac: decouple set_sbaddr_window from register write interface
brcmf_sdcard_set_sbaddr_window configures 3 registers on SDIO
function misc bank to change current silicon backplane programming
window. This patch makes it call brcmf_sdioh_request_byte directly
in order to prepare for the write register interface unification.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:29 +0000 (18:27 -0700)]
brcmfmac: remove unused parameter of brcmf_sdcard_reg_write
The size parameter for brcmf_sdcard_reg_write is always 4. Remove it
to make the code cleaner.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 5 May 2012 01:27:28 +0000 (18:27 -0700)]
brcmfmac: remove unused parameter of brcmf_sdcard_reg_read
The size parameter for brcmf_sdcard_reg_read is always 4. Remove it
to make the code neat.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes multiple issues with the current RTT
implementation in ath9k.
* The data that is obtained from the RTT interface registers
are stored in 31:5 - mask out the extra bits when reading them.
* A history buffer is maintained which is not needed at all.
Remove this array and just store the baseband data for each
chain (or bank).
* A 'num_readings' variable was being used to handle the
last entry. But it was being used in an improper manner, with
the result that the RTT values were never being written
to the RTT Interface registers. Fix this by using a simple
flag.
* Stop baseband operations before programming the calibration values
to the HW.
* Do not restore RX gain settings as part of RTT.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwlwifi: don't disable AGG queues that are not enabled
If the BA session is torn down before we had a chance to start it
we shouldn't disable the AGG tx queues that weren't enabled.
This can happen in two cases:
1) We get a delBA before we drained our Tx queues in agg start flow
2) We didn't get the (successfull) addBA response on time
Reported-by: Daniel Chyan <dchyan@princeton.edu> 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>
iwlwifi: don't flood logs when HT debug flag is set
We have TX_REPLY for that.
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>
Amit Beka [Thu, 3 May 2012 21:22:04 +0000 (14:22 -0700)]
iwlwifi: fix power index handling
The power index that the user gives as module parameter
in in range 1-5, but we need to decrease it in order
to create an array index out of it (0-4) for the power
table command.
Signed-off-by: Amit Beka <amit.beka@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marcel Holtmann [Thu, 3 May 2012 05:12:48 +0000 (07:12 +0200)]
NFC: Select CRC_CCITT for SHDLC link layer of HCI based drivers
The SHDLC link layer of HCI based drivers uses CRC-CCITT and thus
needs to select that kernel option.
Otherwise it ends up with this linking error:
net/built-in.o: In function `nfc_shdlc_add_len_crc':
net/nfc/hci/shdlc.c:113: undefined reference to `crc_ccitt'
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 1 May 2012 10:01:28 +0000 (03:01 -0700)]
mac80211_hwsim: Fix rate control by correctly reporting transmission counts
Drivers need to report the number of transmission attempts for each rate
as well as to terminate the rate array with -1. The in-kernel datapath
of hwsim simulates a perfect medium, therefore the driver only needs to
report that the first transmission attempt was sucessfully completed at
the most favorable rate.
Rate control is working again for this driver. Tested mesh mode with
minstrel.
Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
{nl,cfg,mac}80211: Allow user to see/configure HT protection mode
This patch introduces a new mesh configuration parameter "ht_opmode" and will
allow user to check the current HT protection mode selected. Users could
configure the protection mode by the command "iw mesh_iface set mesh_param
mesh_ht_protection_mode=2". The default protection mode of mesh is set to
non-HT mixed mode.
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Now that we have protection enabled, allow non-HT and HT20 stations to peer
with HT40+/- stations. Peering is still disallowed for HT40+/- mismatch.
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Section 9.23.3.5 of IEEE 80211s standard describes the protection rules for
HT mesh STA in a MBSS. Three HT protection modes are supported for now:
non-HT mixed mode - is selected if any non-HT peers are present in our MBSS.
20MHz-protection mode - is selected if all peers in our 20/40MHz MBSS support
HT and atleast one HT20 peer is present.
no-protection mode - is selected otherwise.
This is a limited implementation of 9.23.3.5, which only considers mesh peers
when determining the HT protection mode. Station's channel_type needs to be
maintained.
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Since the BSS table is organized in a RB tree, the BSSs need to be
comparable. This means that we must define a < and > operator to
the BSS object.
compare_ethr_addr isn't enough since it returns only a binary value.
Since Felix's
cfg80211: use compare_ether_addr on MAC addresses instead of memcmp
Because of the constant size and guaranteed 16 bit alignment, the inline
compare_ether_addr function is much cheaper than calling memcmp.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The BSS table is corrupted: rb_find_bss can't find the bss.
As a result BSSes are duplicated in the BSS table, and we get stuck
while probing an AP before associating (in STA mode).
Change-Id: I85928756f4328028230832c1565ece7f412f3843 CC: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 28 Apr 2012 01:56:59 +0000 (18:56 -0700)]
brcmfmac: add out of band interrupt support
Some sdio host controllers do not support real in band interrupt.
Software polling mode as a replacement is not fast enough for
high throughput and new features. Also some in band interrupts
do not support host wake up on embedded platform even when they
are real physical interrupts. Therefore out of band (oob)
interrupt mechanism is implemented for these scenarios.
To provide oob irq number and flags used for irq registration in
brcmfmac, a platform device contains irq resource must be
registered in board specific code.
Here is an example of platform device structure:
struct resource brcmf_sdio_res[] = {
{
.start = GPIO_BRCMF_SDIO_OOB_NUM,
.end = GPIO_BRCMF_SDIO_OOB_NUM,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
}
};
struct platform_device brcmf_sdio_device = {
.name = "brcmf_sdio_pd",
.id = -1,
.num_resources = ARRAY_SIZE(brcmf_sdio_res),
.resource = brcmf_sdio_res,
};
Reviewed-by: pieter-paul giesberts <pieterpg@broadcom.com> Reviewed-by: arend van spriel <arend@broadcom.com> Signed-off-by: franky lin <frankyl@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 28 Apr 2012 01:56:58 +0000 (18:56 -0700)]
brcmfmac: postpone interrupt register function
For out of band interrupt which is going to be introduced shortly,
the interrupt register function must be called after firmware is
downloaded. This patch moves it from brcmf_sdbrcm_probe to
brcmf_sdbrcm_bus_init.
Reviewed-by: pieter-paul giesberts <pieterpg@broadcom.com> Reviewed-by: arend van spriel <arend@broadcom.com> Signed-off-by: franky lin <frankyl@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 28 Apr 2012 01:56:57 +0000 (18:56 -0700)]
brcmfmac: check bus state for status
Bus state should be the correct flag for bus status. Use it instead
of result from previous function call for backplane clock switch.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 28 Apr 2012 01:56:56 +0000 (18:56 -0700)]
brcmfmac: stop releasing sdio host in irq handler
brcmf_sdbrcm_isr doesn't access to the dongle through SDIO bus.
Stop releasing and claiming host in irq handler to eliminate
any potential risk.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Mon, 23 Apr 2012 19:50:32 +0000 (12:50 -0700)]
mac80211: Add more ethtools stats: survey, rates, etc
The signal and noise are forced to be positive since ethtool
deals in unsigned 64-bit values and this number should be human
readable. This gives easy access to some of the data formerly
exposed in the deprecated /proc/net/wireless file.
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Wed, 25 Apr 2012 15:10:08 +0000 (08:10 -0700)]
iwlwifi: use 6000G2B for 6030 device series
"iwlwifi: use correct released ucode version" change
the ucode api ok from 6000G2 to 6000G2B, but it shall belong
to 6030 device series, not the 6005 device series. Fix it
Cc: stable@vger.kernel.org #3.3+ Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Hutchings [Sun, 22 Jan 2012 03:09:35 +0000 (03:09 +0000)]
ipw2200: Fix order of device registration
Currently cfg80211 fails to create a "phy80211" symlink in sysfs from
the net device to the wiphy device. The latter needs to be registered
first.
Compile-tested only.
Reported-by: Cesare Leonardi <celeonar@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
RFCSR is only used in rt2800. For other chipsets, the debug struct
for rfcsr should be zeroed, which isn't be an issue, since the code
can now cope with that.
Signed-off-by: Anisse Astier <anisse@astier.eu> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This warning appears only if we apply Ben Hutchings' fix
http://marc.info/?l=linux-wireless&m=132720195012653&w=2
for the bug reported by Cesare Leonardi
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656813
with cfg80211 warning during device registration
("cfg80211: failed to add phy80211 symlink to netdev!").
We separate device bring up and registration with network stack
to avoid the problem.
After that Ben Hutchings' fix can be applied to fix the bug.
Cc: stable@kernel.org Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Thu, 26 Apr 2012 22:01:07 +0000 (15:01 -0700)]
mac80211: don't transmit 40MHz frames to 20MHz peer
If a mesh peer indicates it is operating as 20MHz-only in its HT
operation IE, have the rate control algorithm respect this by disabling
the equivalent bit in the ieee80211_sta HT capabilities.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Thu, 26 Apr 2012 22:01:06 +0000 (15:01 -0700)]
mac80211: insert mesh peer after init
Drivers need the station rate info when inserting a new sta_info. The
patch "mac80211: refactor mesh peer initialization" wrongly assumed the
rate info could be applied after insertion. After further review, this
is clearly not the case.
This fixes a regression where HT parameters were not applied before
inserting the sta_info, causing performance degradation.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
"oui_type" in structure "ieee_types_vendor_header" is not used separately,
so include it in "oui" array. Now complete oui will be compared fixing
following warnings.
drivers/net/wireless/mwifiex/sta_ioctl.c:1410 mwifiex_set_gen_ie_helper()
error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/sta_ioctl.c:1435 mwifiex_set_gen_ie_helper()
error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/scan.c:1177 mwifiex_update_bss_desc_with_ie()
error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/scan.c:1185 mwifiex_update_bss_desc_with_ie()
error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@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>
mac80211: fix rate control update on 2040 bss change
The rate control updation never be called on 2040 BSS change.
The station should update its rate control on receiving beacon
with different HT mode in the HT operation IE. Not doing so,
leads to sending frames with higher(ht40) rates whereas AP is
operating in lower mode (ht20).
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Sat, 21 Apr 2012 12:23:44 +0000 (15:23 +0300)]
wireless: at76c50x: allocating too much data
This is a cut and paste mistake, sizeof(struct mib_local) was intended
instead of sizeof(struct mib_phy). The call to at76_get_mib() uses
sizeof(struct mib_local) correctly, although I changed that to
sizeof(*m) for style reasons after discussion with some of the wireless
maintainers.
The current code works fine because mib_phy structs are larger than
mib_local structs. But we may as well clean it up.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
There are various problems happened on 5GHz band not observed on
2.4 GHz (microcode errors, queue stuck, etc... ) . Also roaming
between 5GHz AP and 2GHz does not work very well. To workaround
the problems add option to disable 5GHz support. This will help
on environments where APs are dual-band, and devices will not try
to associate on band where issues happen.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Thu, 19 Apr 2012 16:48:01 +0000 (09:48 -0700)]
iwlwifi: add checking for the condition to reduce tx power
When bluetooth coex is active and certain condition matched,
driver need to decide should the tx power been reduce or not.
Adding the logic to manage it.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Do not assume we have our subsystem including this for us,
at least for older kernels this is not true. Lets just be
explicit about this requirement for the usage of wake_up().
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch removes ip_queue support which was marked as obsolete
years ago. The nfnetlink_queue modules provides more advanced
user-space packet queueing mechanism.
This patch also removes capability code included in SELinux that
refers to ip_queue. Otherwise, we break compilation.
Several warning has been sent regarding this to the mailing list
in the past month without anyone rising the hand to stop this
with some strong argument.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nf_conntrack: fix explicit helper attachment and NAT
Explicit helper attachment via the CT target is broken with NAT
if non-standard ports are used. This problem was hidden behind
the automatic helper assignment routine. Thus, it becomes more
noticeable now that we can disable the automatic helper assignment
with Eric Leblond's:
9e8ac5a netfilter: nf_ct_helper: allow to disable automatic helper assignment
Basically, nf_conntrack_alter_reply asks for looking up the helper
up if NAT is enabled. Unfortunately, we don't have the conntrack
template at that point anymore.
Since we don't want to rely on the automatic helper assignment,
we can skip the second look-up and stick to the helper that was
attached by iptables. With the CT target, the user is in full
control of helper attachment, thus, the policy is to trust what
the user explicitly configures via iptables (no automatic magic
anymore).
Interestingly, this bug was hidden by the automatic helper look-up
code. But it can be easily trigger if you attach the helper in
a non-standard port, eg.
I added the IPS_HELPER_BIT that allows us to differenciate between
a helper that has been explicitly attached and those that have been
automatically assigned. I didn't come up with a better solution
(having backward compatibility in mind).
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This refreshes the "timeout" attribute in existing expectations if one is
given.
The use case for this would be for userspace helpers to extend the lifetime
of the expectation when requested, as this is not possible right now
without deleting/recreating the expectation.
I use this specifically for forwarding DCERPC traffic through:
DCERPC has a port mapper daemon that chooses a (seemingly) random port for
future traffic to go to. We expect this traffic (with a reasonable
timeout), but sometimes the port mapper will tell the client to continue
using the same port. This allows us to extend the expectation accordingly.
Signed-off-by: Kelvie Wong <kelvie@ieee.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Hans Schillstrom [Mon, 30 Apr 2012 06:13:50 +0000 (08:13 +0200)]
net: export sysctl_[r|w]mem_max symbols needed by ip_vs_sync
To build ip_vs as a module sysctl_rmem_max and sysctl_wmem_max
needs to be exported.
The dependency was added by "ipvs: wakeup master thread" patch.
Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Signed-off-by: Simon Horman <horms@verge.net.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Allow master and backup servers to use many threads
for sync traffic. Add sysctl var "sync_ports" to define the
number of threads. Every thread will use single UDP port,
thread 0 will use the default port 8848 while last thread
will use port 8848+sync_ports-1.
The sync traffic for connections is scheduled to many
master threads based on the cp address but one connection is
always assigned to same thread to avoid reordering of the
sync messages.
Remove ip_vs_sync_switch_mode because this check
for sync mode change is still risky. Instead, check for mode
change under sync_buff_lock.
Make sure the backup socks do not block on reading.
Special thanks to Aleksey Chudov for helping in all tests.
Add two new sysctl vars to control the sync rate with the
main idea to reduce the rate for connection templates because
currently it depends on the packet rate for controlled connections.
This mechanism should be useful also for normal connections
with high traffic.
sync_refresh_period: in seconds, difference in reported connection
timer that triggers new sync message. It can be used to
avoid sync messages for the specified period (or half of
the connection timeout if it is lower) if connection state
is not changed from last sync.
sync_retries: integer, 0..3, defines sync retries with period of
sync_refresh_period/8. Useful to protect against loss of
sync messages.
Allow sysctl_sync_threshold to be used with
sysctl_sync_period=0, so that only single sync message is sent
if sync_refresh_period is also 0.
Add new field "sync_endtime" in connection structure to
hold the reported time when connection expires. The 2 lowest
bits will represent the retry count.
As the sysctl_sync_period now can be 0 use ACCESS_ONCE to
avoid division by zero.
Special thanks to Aleksey Chudov for being patient with me,
for his extensive reports and helping in all tests.
High rate of sync messages in master can lead to
overflowing the socket buffer and dropping the messages.
Fixed sleep of 1 second without wakeup events is not suitable
for loaded masters,
Use delayed_work to schedule sending for queued messages
and limit the delay to IPVS_SYNC_SEND_DELAY (20ms). This will
reduce the rate of wakeups but to avoid sending long bursts we
wakeup the master thread after IPVS_SYNC_WAKEUP_RATE (8) messages.
Add hard limit for the queued messages before sending
by using "sync_qlen_max" sysctl var. It defaults to 1/32 of
the memory pages but actually represents number of messages.
It will protect us from allocating large parts of memory
when the sending rate is lower than the queuing rate.
As suggested by Pablo, add new sysctl var
"sync_sock_size" to configure the SNDBUF (master) or
RCVBUF (slave) socket limit. Default value is 0 (preserve
system defaults).
Change the master thread to detect and block on
SNDBUF overflow, so that we do not drop messages when
the socket limit is low but the sync_qlen_max limit is
not reached. On ENOBUFS or other errors just drop the
messages.
Change master thread to enter TASK_INTERRUPTIBLE
state early, so that we do not miss wakeups due to messages or
kthread_should_stop event.
Thanks to Pablo Neira Ayuso for his valuable feedback!
Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>