Hauke Mehrtens [Wed, 5 Dec 2012 17:46:08 +0000 (18:46 +0100)]
ssb: register watchdog driver
Register the watchdog driver to the system if it is a SoC. Using the
watchdog on a non SoC device, like a PCI card, will make the PCI
card die when the timeout expired, but starting it again is not
supported by ssb.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Wed, 5 Dec 2012 17:46:07 +0000 (18:46 +0100)]
ssb: extif: add methods for watchdog driver
The watchdog driver wants to set the watchdog timeout in ms and not in
ticks, add a method converting ms to ticks before setting the watchdog
register. Return the ticks or millisecond the timer was set to in case
the provided value was bigger than the max allowed value.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Wed, 5 Dec 2012 17:46:05 +0000 (18:46 +0100)]
ssb: add methods for watchdog driver
The watchdog driver wants to set the watchdog timeout in ms and not in
ticks, which is depending on the SoC type and the clock.
Calculate the number of ticks per millisecond and provide two functions
for the watchdog driver. Also return the ticks or millisecond the timer
was set to in case the provided value was bigger than the max allowed
value.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Wed, 5 Dec 2012 17:46:04 +0000 (18:46 +0100)]
ssb: set the PMU watchdog if available
Some ssb based devices have a PMU and the PMU watchdog register should
be used instead of the register in the chip common part, if the device
has a PMU. This patch also calculates the maximal number the watchdog
could be set to.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Wed, 5 Dec 2012 17:46:02 +0000 (18:46 +0100)]
bcma: register watchdog driver
Register the watchdog driver to the system if this is a SoC. Using the
watchdog on a non SoC device, like a PCIe card, will make the PCIe
card die when the timeout expired, but starting it again is not
supported by bcma.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Wed, 5 Dec 2012 17:46:01 +0000 (18:46 +0100)]
bcma: add methods for watchdog driver
The watchdog driver wants to set the watchdog timeout in ms and not in
ticks, which is depending on the SoC type and the clock.
Calculate the number of ticks per millisecond and provide two functions
for the watchdog driver. Also return the ticks or millisecond the timer
was set to in case the provided value was bigger than the max allowed
value.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Wed, 5 Dec 2012 17:46:00 +0000 (18:46 +0100)]
bcma: set the pmu watchdog if available
Mostly all bcma based devices have a PMU and the PMU watchdog should be
used and not the old one in chip common. This patch also calculates the
maximal number the watchdog could be set to.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Wed, 5 Dec 2012 17:45:58 +0000 (18:45 +0100)]
ssb/bcma: add common header for watchdog
This adds a common header for watchdog functions, so a watchdog driver
just needs to use this and could provide watchdog functionality for ssb
and bcma based SoCs. Patches for a watchdog driver using this interface
will be send later.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Cc: stable@vger.kernel.org [3.7+] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
carl9170: explain why sta cannot be NULL for ampdus
Dan Carpenter reported that smatch detected a potential
problem with the code [1]:
drivers/net/wireless/ath/carl9170/tx.c:1488 carl9170_op_tx()
error: we previously assumed 'sta' could be null (see line 1482)
drivers/net/wireless/ath/carl9170/tx.c
1482 if (sta) {
^^^^^ New check.
[...]
1485 }
1487 if (info->flags & IEEE80211_TX_CTL_AMPDU) {
1488 run = carl9170_tx_ampdu_queue(ar, sta, skb);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Old dereference of "sta" inside the call to carl9170_tx_ampdu_queue().
A range of solutions have been discussed in [2] and
we agreed on the following: "
> we might as well add a comment to carl9170_tx_ampdu_queue
> and explain the situation [in a way that's obvious to a
> human reader]. This way we can save the "if"... which is
> a small win since carl9170_op_tx is sort of a hot-path.
Putting a comment there is fine. Without the comment
it's easy for a human reader to get confused why the
check is there. So long as humans can read the code,
that's all that matters."
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
LD drivers/net/wireless/brcm80211/built-in.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/fwil.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/fwil.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/fweh.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/fweh.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/dhd_common.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/usb.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/usb.o
CHECK drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c
CC [M] drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.o
LD [M] drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.o
LD drivers/net/wireless/brcm80211/brcmsmac/built-in.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c:1311:6: warning: context imbalance in 'brcms_down' - unexpected unlock
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c:1598:6: warning: context imbalance in 'brcms_rfkill_set_hw_state' - unexpected unlock
CC [M] drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/ucode_loader.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/ucode_loader.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/ampdu.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/antsel.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/antsel.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/channel.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/channel.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/main.c
drivers/net/wireless/brcm80211/brcmsmac/main.c:6246:36: warning: Initializer entry defined twice
drivers/net/wireless/brcm80211/brcmsmac/main.c:6246:43: also defined here
CC [M] drivers/net/wireless/brcm80211/brcmsmac/main.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/phy_shim.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/phy_shim.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/pmu.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/pmu.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/rate.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/rate.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/stf.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/stf.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/aiutils.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c:3313:46: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
CC [M] drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:17688:47: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:18187:53: warning: cast truncates bits from constant value (ffff3fff becomes 3fff)
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:21160:36: warning: cast truncates bits from constant value (ffff3fff becomes 3fff)
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:23321:35: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:28343:44: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
CC [M] drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/phy/phytbl_lcn.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/phy/phytbl_lcn.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/phy/phytbl_n.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/phy/phytbl_n.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/phy/phy_qmath.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/phy/phy_qmath.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/dma.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/dma.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/brcms_trace_events.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/brcms_trace_events.o
CHECK drivers/net/wireless/brcm80211/brcmsmac/debug.c
CC [M] drivers/net/wireless/brcm80211/brcmsmac/debug.o
LD [M] drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.o
LD drivers/net/wireless/brcm80211/brcmutil/built-in.o
CHECK drivers/net/wireless/brcm80211/brcmutil/utils.c
CC [M] drivers/net/wireless/brcm80211/brcmutil/utils.o
LD [M] drivers/net/wireless/brcm80211/brcmutil/brcmutil.o
Building modules, stage 2.
MODPOST 3 modules
CC drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.mod.o
LD [M] drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko
CC drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.mod.o
LD [M] drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko
CC drivers/net/wireless/brcm80211/brcmutil/brcmutil.mod.o
LD [M] drivers/net/wireless/brcm80211/brcmutil/brcmutil.ko
Cc: Brett Rudley <brudley@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Cc: Arend van Spriel <arend@broadcom.com> Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com> Cc: Kan Yan <kanyan@broadcom.com> Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com Reported-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Merge tag 'nfc-fixes-3.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-3.0
This is an NFC LLCP fix for 3.7 and contains only one patch.
It fixes a potential crash when receiving an LLCP HDLC frame acking a frame
that is not the last sent one. In that case we may dereference an already
freed pointer.
mwl8k: remove useless pci shutdown callback and stray debugging
This patch removes a left over debugging print present in the pci
shutdown callback, since this callback does not do anything useful, get
rid of it entirely.
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 17:34:47 +0000 (18:34 +0100)]
rt2x00: rt2800lib: introduce RFCSR3_VCOCAL_EN
On the RF3290,RF5360,RF5370,RF5372,RF5390,RF5392
radio frontends, the VCO calibration can be
controlled via the RFCSR3 register. The current
code uses the RFCSR30_RF_CALIBRATION constant to
enable the calibration, however that belongs to
the RFCSR30 register. Although the values of the
constant is correct, but using that for another
register is confusing.
Add a new definition for the VCO calibration enable
bit of the RFCSR3 register and use that in the
relevant places in order to avoid confusions.
The patch contains no functional changes.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 16:24:02 +0000 (17:24 +0100)]
rt2x00: rt2800lib: remove trailing semicolons from RFCSR3_* defines
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
On A-MPDU frames, the hardware only reports valid
signal strength data for the last subframe.
This patch fixes it by flagging everything but the
last subframe in an A-MPDU to tell mac80211 to
ignore the signal strength entirely. Otherwise
the empty value (= 0 dbm) will distort the
average quite badly.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 14:53:29 +0000 (15:53 +0100)]
rt2x00: rt2800lib: fix indentation in rt2800_init_rfcsr
The patch contains no functional changes.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 14:53:28 +0000 (15:53 +0100)]
rt2x00: rt2800lib: fix indentation of some rt2x00_rt calls
The patch contains no functional changes.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Sun, 2 Dec 2012 10:36:09 +0000 (13:36 +0300)]
p54: potential signedness issue in p54_parse_rssical()
"entries" is unsigned here, so it is never less than zero. In theory,
len could be less than offset so I have added a check for that.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bluetooth: trivial: Change NO_FCS_RECV to RECV_NO_FCS
Make code more readable by changing CONF_NO_FCS_RECV which is read
as "No L2CAP FCS option received" to CONF_RECV_NO_FCS which means
"Received L2CAP option NO_FCS". This flag really means that we have
received L2CAP FRAME CHECK SEQUENCE (FCS) OPTION with value "No FCS".
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Bluetooth: Process receiving FCS_NONE in L2CAP Conf Rsp
Process L2CAP Config rsp Pending with FCS Option 0x00 (No FCS)
which is sent by Motorola Windows 7 Bluetooth stack. The trace
is shown below (all other options are skipped).
If L2CAP_FEAT_FCS is not supported we sould miss EWS option
configuration because of break. Make code more readable by
combining FCS configuration in the single block.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Bluetooth: AMP: Mark controller radio powered down after HCIDEVDOWN
After getting HCIDEVDOWN controller did not mark itself as 0x00 which
means: "The Controller radio is available but is currently physically
powered down". The result was even if the hdev was down we return
in controller list value 0x01 "status 0x01 (Bluetooth only)".
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
In order to authenticate and configure an incoming SCO connection, the
BT_DEFER_SETUP option was added. This option is intended to defer reply
to Connect Request on SCO sockets.
When a connection is requested, the listening socket is unblocked but
the effective connection setup happens only on first recv. Any send
between accept and recv fails with -ENOTCONN.
Seth Forshee [Thu, 29 Nov 2012 13:36:00 +0000 (07:36 -0600)]
brcmsmac: Fix possible NULL pointer dereference in _dma_ctrlflags()
There's a debug message to warn if this function is passed a NULL
pointer, but in order to print the message we have to dereference the
pointer. Obviously this isn't a good idea, so remove the message.
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 29 Nov 2012 22:27:17 +0000 (23:27 +0100)]
rtlwifi: use SIMPLE_DEV_PM_OPS
rtlwifi only provides pm callbacks for functions covered by pm sleep
and they are also just called if CONFIG_PM_SLEEP is set.
Only add functions rtl_pci_suspend and rtl_pci_resume if
CONFIG_PM_SLEEP is set and use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 29 Nov 2012 22:27:16 +0000 (23:27 +0100)]
p54pci: use SIMPLE_DEV_PM_OPS
p54pci does not provide any runtime pm callbacks, so support for
PM_RUNTIME is not needed and we could go to PM_SLEEP.
This also makes it possible to use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 29 Nov 2012 22:27:15 +0000 (23:27 +0100)]
ath9k: use SIMPLE_DEV_PM_OPS
ath9k does not provide any runtime pm callbacks, so support for
PM_RUNTIME is not needed and we could go to PM_SLEEP.
This also makes it possible to use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Stamer [Thu, 29 Nov 2012 16:09:26 +0000 (17:09 +0100)]
rtlwifi: rtl8192se: Fixed coding style issues in the driver
This patch fixes almost all coding issues in the rtl8192se driver. Only
exception is putting trailing */ on separate lines.
Signed-off-by: Daniel Stamer <daniel@stamer.info> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 28 Nov 2012 20:53:45 +0000 (21:53 +0100)]
mwifiex: fix struct member mismatch
Using bss->information_elements and treating
bss->len_beacon_ies as its size is wrong, the
real size is len_information_elements.
Found while I was reviewing the use of this
cfg80211 API (as it is actually potentially
broken due to races.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Wed, 28 Nov 2012 20:44:14 +0000 (21:44 +0100)]
brcmfmac: change debug output for received event.
see header.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Wed, 28 Nov 2012 20:44:13 +0000 (21:44 +0100)]
brcmfmac: fix bug in setting mgmt ie and parsing vndrs ie.
Parsing vndrs ie was not taking len of tlv itself in account. Setting
mgmt ie was missing check for length indicating non configured ie and
wrongly checking available length.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 28 Nov 2012 20:44:12 +0000 (21:44 +0100)]
brcmfmac: remove mode from struct brcmf_cfg80211_conf
The mode should be stored and used per virtual interface. Remove
the mode from device global structure and rework the code to use
the mode from brcmf_cfg80211_vif.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@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>
Arend van Spriel [Wed, 28 Nov 2012 20:44:11 +0000 (21:44 +0100)]
brcmfmac: get rid of struct brcmf_cfg80211_info::link_up attribute
This attribute indicates successful IBSS or AP connection has been
established. However, this no longer works for virtual interfaces.
As it turns out this attribute is identical to the CONNECTED bit
in struct brcmf_cfg80211_vif::sme_state. This patch removes the
attribute and rework some functions relying on it.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@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>
Piotr Haber [Wed, 28 Nov 2012 20:44:10 +0000 (21:44 +0100)]
brcmsmac: support 4313iPA
Add support for 4313 iPA variant.
It is a variant of already supported 4313 ePA
and needs some PHY changes to work properly.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:09 +0000 (21:44 +0100)]
brcmsmac: move PHY functions
Move functions in
preparation for 4313iPA changes
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:07 +0000 (21:44 +0100)]
brcmsmac: fix bounds checking in tx/rx
brcms_b_txstatus and brcms_b_recv are off by one when
doing bounds checking on number of packets to process
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:06 +0000 (21:44 +0100)]
brcmsmac: cleanup in isr code
brcms_c_isr returns true if interrupt was for us
and if dpc should be scheduled which is the same thing.
Simplify it.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:05 +0000 (21:44 +0100)]
brcmsmac: handle packet drop during transmit correctly
The .tx() callback function can drop packets when there is no
space in the DMA fifo. Propagate that information to caller
and make sure the freed sk_buff reference is not accessed.
Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
wireless: allow Atheros card to not depend on ath.ko
There are 2 different things:
- sub-menu for "Atheros Wireless cards" family
- module ath.ko with common Atheros code
Until now, they both used to depend on the same Kconfig variable ATH_COMMON.
Thus, being "Atheros card" and "depending on ath.ko" was the same.
To allow module to belong to the
"Atheros Wireless cards" family but not use ath.ko,
2 conditions above need to be separated.
So, this patch introduce new Kconfig variable ATH_CARDS for belonging
to the "Atheros Wireless Cards" family; while ATH_COMMON becomes hidden
variable to express dependency on common Atheros code in ath.ko. Modules
that depend on this common code now express it by setting ATH_COMMON.
Right now, ath6kl do not depend on common code and thus do not set ATH_COMMON.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 28 Nov 2012 09:28:52 +0000 (10:28 +0100)]
rt2x00: Use addr_mask to disallow invalid MAC addresses in mutli-bssid mode
Reported-by: Petr Stetiar <ynezz@true.cz> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The commit "ath9k: stomp audio profiles on weak signal
strength" failed to take care of new stomp type while
programming concurrent tx priority. That leads to array
index out of bounds access.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Mon, 26 Nov 2012 23:31:55 +0000 (00:31 +0100)]
ssb: extif: fix compile errors
If CONFIG_SSB_EMBEDDED or CONFIG_SSB_DRIVER_MIPS is set and
CONFIG_SSB_DRIVER_EXTIF is not set, it will cause compile problems
because of missing functions. This patch fixes these problems.
The mips driver now also uses ssb_chipco_available() instead of
checking bus->chipco.dev manually.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Mon, 26 Nov 2012 23:30:04 +0000 (00:30 +0100)]
bcma: handle return value of pci_assign_resource
This fixes the following warning:
CC drivers/bcma/driver_pci_host.o
drivers/bcma/driver_pci_host.c: In function 'bcma_core_pci_fixup_addresses':
drivers/bcma/driver_pci_host.c:555:23: error: ignoring return value of
'pci_assign_resource', declared with attribute warn_unused_result
[-Werror=unused-result]
Reported-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 29 Nov 2012 00:25:20 +0000 (01:25 +0100)]
cfg80211: fix BSS struct IE access races
When a BSS struct is updated, the IEs are currently
overwritten or freed. This can lead to races if some
other CPU is accessing the BSS struct and using the
IEs concurrently.
Fix this by always allocating the IEs in a new struct
that holds the data and length and protecting access
to this new struct with RCU.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 28 Nov 2012 21:42:34 +0000 (22:42 +0100)]
cfg80211: fix cmp_hidden_bss
The cmp_bss() comparator function uses memcmp() to
compare the SSID. This means that cmp_hidden_bss()
needs to similarly return a number bigger than zero
(use 1) instead of -1 when ie1 is bigger than ie2,
which is the case if an ie2 byte is non-zero.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Marco Porsch [Fri, 23 Nov 2012 20:23:18 +0000 (12:23 -0800)]
mac80211: fix for mesh sync to indicate TBTT adjustment
Currently the mesh sync code checks, whether peers indicate TBTT adjustment,
but it never sets the corresponding flag itself.
By setting ifmsh->tbtt_adjusting to true, it will set the corresponding field
in the mesh configuration IE of own beacons.
This indication will be set in the current beacon. The TBTT adjustment will be
performed afterwards, affecting the next beacon. Thus, the first beacon with
stable TBTT will not indicate adjustment anymore and peers will continue
tracking the new offset.
Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Saravana [Wed, 28 Nov 2012 12:59:38 +0000 (18:29 +0530)]
mac80211: re-organize the rx rate calculation logic
Currently the logic to fill a struct rate_info with
a STA's last RX rate is accessible only in the cfg.c.
As the RX rate calculation might be needed elsewhere,
split this out into a separate function.
Signed-off-by: Saravana <saravanad@posedge.com>
[fix various whitespace issues, reword commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Saravana [Thu, 29 Nov 2012 13:52:37 +0000 (19:22 +0530)]
mac80211: add debugfs file for current tx rate
Add a debugfs file showing the current tx rate.
The information available in the rc_stats file
doesn't evidently provides us the current tx rate.
This patch adds the support for the same.
Signed-off-by: Saravana <saravanad@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Helmut Schaa [Tue, 27 Nov 2012 17:23:06 +0000 (18:23 +0100)]
mac80211: reject setting masked mac addresses
If a driver registers an address mask we should ensure that no
interface gets an address assigned that isn't covered by the
registered address mask. This prevents invalid configurations
from reaching the device and causing problems.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
[change function flow to reduce indentation, fix locking] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 14 Nov 2012 14:17:28 +0000 (15:17 +0100)]
nl80211: support P2P GO powersave configuration
If a driver supports P2P GO powersave, allow it to
set the new feature flags for it and allow userspace
to configure the parameters for it. This can be done
at GO startup and later changed with SET_BSS.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 22 Nov 2012 13:11:39 +0000 (14:11 +0100)]
mac80211: support VHT association
Determine the VHT channel from the AP's VHT operation IE
(if present) and configure the hardware to that channel
if it is supported. If channel contexts cause a channel
to not be usable, try a smaller bandwidth.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 22 Nov 2012 15:59:45 +0000 (16:59 +0100)]
cfg80211: rework chandef checking and export it
Some of the chandef checking that we do in cfg80211
to check if a channel is supported or not is also
needed in mac80211, so rework that a bit and export
the functions that are needed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
The LMAC API states that the TSF clock value of
every rx'ed frame is a "usec accurate timestamp
of the hardware clock at the end of frame
(before OFDM SIFS EOF padding)".
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 23 Nov 2012 22:46:19 +0000 (23:46 +0100)]
iwlwifi: initialize rx_status
The vendor radiotap patch added a few fields to
struct ieee80211_rx_status that need to be zero,
initialize the struct instead of using whatever
was left on the stack.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 22 Nov 2012 11:58:16 +0000 (12:58 +0100)]
iwlegacy: initialize rx_status
The vendor radiotap patch added a few fields to
struct ieee80211_rx_status that need to be zero,
initialize the struct instead of using whatever
was left on the stack.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>