History log of /drivers/net/wireless/brcm80211/brcmsmac/main.c
Revision Date Author Comments
d8aef3239e7d6a1bd550014ac766e5ec11c63ea9 15-Jul-2014 Rafał Miłecki <zajec5@gmail.com> bcma: extract antenna gains from SPROM correctly

Just like in case of SSB SPROMs they are encoded in a bit tricky way.
SPROM struct already uses s8 type and it's supposed to store decoded
values.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
20e6f7f0437d6e1f2d459d5fc2ed1e242afcee16 19-May-2014 Julia Lawall <Julia.Lawall@lip6.fr> brcmsmac: make return of 0 explicit

Delete unnecessary local variable whose value is always 0 and that hides
the fact that the result is always 0.

A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression ret;
expression e;
position p;
@@

-ret = 0;
... when != ret = e
return
- ret
+ 0
;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[arend@broadcom.com: make brcms_b_detach() a void function]
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6dc75f1c9ff912cdfea4cf6a2bb5957ea174a9e5 13-Jan-2014 Julia Lawall <Julia.Lawall@lip6.fr> brcmsmac: delete useless variable

Delete a variable that is at most only assigned to a constant, but never
used otherwise.

A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
identifier i;
constant c;
@@

-T i;
<... when != i
-i = c;
...>
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7d9b3589dfea43fb49ebc13205b5feadc4e364d7 03-Oct-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add support for a BCM4313 with PCI id 0x4313

There are some BCM4313 out there with a PCI id of 0x4313. These devices
are missing a sprom and are only used on routers or other embedded
devices. We found one connected to a BCM63XX SoC.

This devices was found by someone in this ticket:
https://dev.openwrt.org/ticket/13551

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d458cdf712e0c671e8e819abb16ecd6e44f9daec 02-Oct-2013 Joe Perches <joe@perches.com> net:drivers/net: Miscellaneous conversions to ETH_ALEN

Convert the memset/memcpy uses of 6 to ETH_ALEN
where appropriate.

Also convert some struct definitions and u8 array
declarations of [6] to ETH_ALEN.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
aa51e598d04c6acf5477934cd6383f5a17ce9029 24-Aug-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: use bcma PCIe up and down functions

replace the calls to bcma_core_pci_extend_L1timer() by calls to the
newly introduced bcma_core_pci_ip() and bcma_core_pci_down()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
67e39c5ae7369bad2a1c2d631e5b971be2e1edc1 20-Aug-2013 Arend van Spriel <arend@broadcom.com> brcmsmac: add debug info message providing phy and radio info

For debug purposes it is good to have the phy and radio information
available in the log. Only logged when driver is built when BRCMDBG
or BRCM_TRACING kconfig are set.

Tested-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a76e9ff18b7c4a3f8fc812fb71f55cb2eec74ba8 15-Jul-2013 John Greene <jogreene@redhat.com> brcmsmac: Further reduce log spam from tx phy messages

Relegate 2 phy messages to debug status as they create excessive
log spam, noted in multiple bugzillas for brcmsmac v3.8 and up.
This is a follow on to net-next 99e94940697adec4f84758adb2db71f4a82c7ba5:
brcmsmac: Reduce log spam in heavy tx, make err print in debug

brcmsmac bcma0:0: phyerr 0x10, rate 0x14
brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete:
ampdu tx phy error (0x10)

Signed-off-by: John Greene <jogreene@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
541e667e1c0f31a7e11d909eb831cf476814a201 06-Jun-2013 Arend van Spriel <arend@broadcom.com> brcmsmac: disable power-save related functions

This patch fixes a regression introduced by:

commit 6da3b6c48d79da96a36c2632053cf4f53bf48fb2
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun Mar 24 01:45:52 2013 +0100

brcmsmac: remove brcms_bss_cfg->associated

The regression behaviour was described on mailing list.

http://mid.gmane.org/5197DC4F.7030503@broadcom.com:
"On laptop I installed kernel with brcmsmac compiled as
module. It comes up and associates during boot, but after
logging in there is no connectivity. Triggering reassoc
gives connectivity for some time, but after a while (1-2 min)
it stops."

Before the mentioned commit the return value of
the function brcms_c_ps_allowed() was always false,
which is desired behaviour as power-save is not
supported at the moment. Therefor, the function is
changed to just return false instead of simply
reverting the mentioned commit.

Bug: 58471 <https://bugzilla.kernel.org/show_bug.cgi?id=58471>

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c55b3766054d3db7a9732c6c8a1c81afac2cfaa6 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add support for adhoc mode

This adds adhoc mode support to brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
492b71e8d468102372969705b65845f5e57038c5 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: activate AP support

This activates the AP mode support.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
04d2e422df4ae6bc4f0f193be020429000dd7556 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: deactivate ucode sending probe responses

It is possible to configure the ucode to automatically send the probe
responses to the clients after they send a probe request. At least for
WPS the userspace needs to answer the probe requests and we do not know
a way to say to the ucode to just handle the normal probe requests, so
for now no probe requests should be handled by the ucode.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5f1e59e59ffd11a150144977e38ec55bb868f027 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add support for probe response template

The ucode is able to answer probe response by itself. This writes such
a template into the specific memory. Currently the probe requests are
also send to mac80211 so there are more answers send to a requesting
client. We have to make the ucode stop sending probe requests to the
driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c031df31daf69ffbb4c9f6f966df83646241a195 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: react on changing SSID

To send the correct probe response the hardware needs to know the SSID
when it changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
af44e258108058f30d4d4de1f7af0aff88ea3f4b 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add beacon template support

This makes it possible that a beacon template provided by mac80211 is
written to the hardware for constant beaconing.

This is based on an old version of brcmsmac, on b43 and the spec b43 is
based on.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ee9794ff49d60bb0f363704c4e03f7eed511ed3b 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: write beacon period to hardware

Make brcms_c_set_beacon_period() write the beacon period to the
hardware if a new one is set.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0627fe3d51f2b44f028bff1a593c85d05d629206 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove brcms_pub->bcmerr

This was a write only member

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
73ff28504597dd6955e3600d02ecf5e1d7d628db 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove brcms_bss_cfg->cur_etheraddr

use brcms_pub->cur_etheraddr instead

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7a6c0b10783a2b4abf1f44fefba8500364bc29a6 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove brcms_bss_cfg->up

This was a read only member, replace it with pub->up.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
01996eaa1b06073848b1f23eccc61e948b6941ed 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove brcms_bss_cfg->enable

This was a read only member.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6da3b6c48d79da96a36c2632053cf4f53bf48fb2 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove brcms_bss_cfg->associated

Replaced the usage with pub->associated.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
45c4f657ce9388921deced415b076d49ed231188 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove brcms_bss_cfg->BSS

This was a read only member. The checks using BSS are replaced by
better fitting checks of the new type member.

The change in brcms_c_tbtt() was based on code from b43, in
brcms_c_ps_allowed() the same happens with BSS being true or false,
beaconing and probe responses are just needed in ap mode.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
70268ce280e9e06c002383b1691d97276d8cd1fb 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add interface type to brcms_bss_cfg

This makes it possible to easily check in which mode the device is
currently running. This also adds a function to start station mode.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
39b2d36c8a4c670de569267a7aca168e37be620b 24-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: implement ieee80211_ops get_tsf and set_tsf

setting the tsf is needed to start a timer to make beaconing in AP mode
work.

This is based on older versions of brcmsmac and b43.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
675a0b049abf6edf30f8dd84c5610b6edc2296c8 25-Mar-2013 Karl Beldan <karl.beldan@rivierawaves.com> mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan

Drivers that don't use chanctxes cannot perform VHT association because
they still use a "backward compatibility" pair of {ieee80211_channel,
nl80211_channel_type} in ieee80211_conf and ieee80211_local.

Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
[fix kernel-doc]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7626cf19713464dbad96abba3f375771447925e6 24-Feb-2013 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: export firmware version to ethtool

This exports the firmware version in use to userspace through ethtool.

root@OpenWrt:/# ethtool -i wlan0
firmware-version: 610.812

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b56e681b6210a635af4e4eb93ce81b4654851033 14-Feb-2013 Joe Perches <joe@perches.com> brcmsmac: Remove unnecessary memset casts

Remove the casts of the first argument of memset.

Neaten the style by using the sizeof the actual variable
being memset not the sizeof the type of variable.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e81c7e93b8f047bd0fe2cd150b0866c9da4c201d 14-Feb-2013 Joe Perches <joe@perches.com> brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings.

These messages don't seem to be errors but notifications
that some attribute isn't quite right.

Don't mark them as errors.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0d61c9177cb9bf48dcec9c3d9205a309085d4318 07-Feb-2013 Tim Gardner <tim.gardner@canonical.com> brcmsmac: avoid 512 byte stack variable

Dynamically allocate the probe response template which
avoids potential stack corruption. Observed with smatch:

drivers/net/wireless/brcm80211/brcmsmac/main.c:7412 brcms_c_bss_update_probe_resp()
warn: 'prb_resp' puts 512 bytes on stack

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list@broadcom.com
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
708eb54f20334470ad92042547db0fef0cd60462 07-Feb-2013 Tim Gardner <tim.gardner@canonical.com> brcmsmac: fix u16 overflow warning

DOT11_MIN_BEACON_PERIOD and DOT11_MAX_BEACON_PERIOD are
superfluous. The only invalid beacon period is 0. Comparing
a 16 bit quantity to 0xffff also causes a compile warning:

drivers/net/wireless/brcm80211/brcmsmac/main.c:5560 brcms_c_set_beacon_period()
warn: impossible condition '(period > 65535) => (0-65535 > 65535)'

Observed from smatch analysis.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list@broadcom.com
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7b2385b95363c9ff49801c19cba2489a05bd6672 02-Feb-2013 Arend van Spriel <arend@broadcom.com> brcmsmac: rework of mac80211 .flush() callback operation

This patch addresses a long standing issue of the driver with the
mac80211 .flush() callback. Since implementing the .flush() callback
a number of issues have been fixed, but a WARN_ON_ONCE() was still
triggered because the timeout on the flush could still occur.

This patch changes the awkward design using msleep() into one using
a waitqueue. The waiting flush() context will kick the transmit dma
when it is idle and the timeout used waiting for the event is set
to 500 ms. Worst case there can be 64 frames outstanding for transmit
in the driver. At a rate of 1Mbps that would take 1.5 seconds assuming
MTU is 1500 bytes and ignoring retries. The WARN_ON_ONCE() is also
removed as this was put in to indicate the flush timeout as a reason
for the driver to stall. That was not happening since fixing endless
AMPDU retries with following upstream commit:

commit 85091fc0a75653e239dc8379658515e577544927
Author: Arend van Spriel <arend@broadcom.com>
Date: Thu Feb 23 18:38:22 2012 +0100

brcm80211: smac: fix endless retry of A-MPDU transmissions

bugzilla: 42840 <https://bugzilla.kernel.org/show_bug.cgi?id=42840>
bugzilla@redhat: <https://bugzilla.redhat.com/show_bug.cgi?id=799168>
bugzilla@redhat: <https://bugzilla.redhat.com/show_bug.cgi?id=787649>

Cc: Jonathan Nieder <jrnieder@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Camaleón <noelamac@gmail.com>
Cc: Milan Bouchet-Valat <nalimilan@club-internet.fr>
Cc: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0e33e48ddc4402e890aaeeeacc95f730bf522098 22-Jan-2013 Arend van Spriel <arend@broadcom.com> brcmsmac: fix tx status processing

This issue was reported on the wireless list (see [1]) in which
brcmsmac ran into a fatal error:

[ 588.284074] brcmsmac bcma0:0: frameid != txh->TxFrameID
[ 588.284098] brcmsmac bcma0:0: MI_TFS: fatal
[ 588.284103] brcmsmac bcma0:0: wl0: fatal error, reinitializing
[ 588.286208] ieee80211 phy0: Hardware restart was requested

The tx status feedback is processed in a loop limiting the number of
frames processed in one run. The code terminate processing when the
limit is reached regardless the txstatus value read from the device
register. When that status is is flagged as being valid it must be
processed as the hardware will clear it after is has been read.

Bisecting was done by Seth Forshee and showed following commit as the
culprit:

commit 57fe504817ccec9b6ac23e973d2925343bf1e3b6
Author: Piotr Haber <phaber@broadcom.com>
Date: Wed Nov 28 21:44:07 2012 +0100

brcmsmac: fix bounds checking in tx/rx

[1] http://www.spinics.net/lists/linux-wireless/msg101293.html

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b180b10056e204fa1f65f0494215d73eb8253c87 02-Jan-2013 Arend van Spriel <arend@broadcom.com> brcmsmac: allow user-space setting of interface address

The interface address of the wireless device is determined by
the permanent address stored in the device. This patch allows
it to be overridden from user-space.

Reported-by: Maximilian Engelhardt <maxi@daemonizer.de>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c2397bb0c55495d8474c36143fdaced5c435a5e4 22-Dec-2012 Geert Uytterhoeven <geert@linux-m68k.org> brcmsmac: initialize morepending in brcms_b_recv()

drivers/net/wireless/brcm80211/brcmsmac/main.c: In function ‘brcms_b_recv’:
drivers/net/wireless/brcm80211/brcmsmac/main.c:7636: warning: ‘morepending’ may be used uninitialized in this function

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9dd4ea51544de0f9679630592daa3d2147f298ed 07-Dec-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add support for BCM43224 with PCI id of 14e4:a8d8

This device can be found on some embedded devices connected to a
Broadcom SoC like the BCM4718.
I tested this with my Netgear WNDR3400 v1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
512ae05611179e6e98a48b5ddc4d263b7eb8a587 07-Dec-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: do a read after the write of the objmem on broken PCIe controllers

As described in the documentation of bcma_wflush16 in drivers/net
/wireless/brcm80211/brcmsmac/types.h some PCIe controllers of Broadcom
SoCs are broken. The PCIe controller on these SoCs are mostly used to
connect some additional wifi device to the SoC and some of these wifi
devices are supported by brcmsmac.
For my BCM43224 connected to the broken PCIe controller of the BCM4718 I
need an extra read after write in brcms_b_write_objmem() to prevent a
Data bus error. This fixes the problem reading tsf_random later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6f80f01483d122174d9aa7864a8ac4050ba6daaa 07-Dec-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add support for cores with revision 17

This adds support for bcma wifi core revision 17 which is found on
BCM4716/4717/4718 SoCs. The firmware version 610.812 for brcmsmac found
in linux-firmware does not support these cores, but a firmware
generated with b43-fwcutter from the proprietary broadcom wireless
driver works with these chips. This wifi core contains a revision 5
N-PHY and a revision 7 radio of type 0x2056.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
57fe504817ccec9b6ac23e973d2925343bf1e3b6 28-Nov-2012 Piotr Haber <phaber@broadcom.com> 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>
94d9902dc06a28a1b25cf56a7cdc057608bdf48b 28-Nov-2012 Piotr Haber <phaber@broadcom.com> 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>
c4dea35e34f5f46e1701156153a09cce429d1ea9 28-Nov-2012 Piotr Haber <phaber@broadcom.com> 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>
6940c9bed1b4d3840e7cabc31104548a12f8dbd0 21-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Remove unused wlc_prio2prec_map and _BRCMS_PREC_* constants

Fixes sparse warning:
drivers/net/wireless/brcm80211/brcmsmac/main.c:308:10: sparse: symbol 'wlc_prio2prec_map' was not declared. Should it be static?

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9242c7261b8c05de71fb83f2fa7a299691c66977 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Remove some noisy and uninformative debug messages

These messages clutter up the trace buffer without adding any useful
information.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e3c0d8a6f67f2ee22476e0ceb0ad22945840a5af 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Add tracepoint for macintstatus

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cdf4352f5c59ee5599579ea3bfa4d8972c3f72f1 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Improve tx trace and debug support

Add the brcmsmac_tx trace system for tx debugging. Existing code to dump
tx status and descriptors are converted to using tracepoints, allowing
for more efficient collection and post-processing of this data. These
tracepoints are placed to collect data for all tx frames instead of only
on errors. Logging of tx errors is also improved.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
90123e045cac4ce8ec13e266f030c618fa674554 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Add brcms_dbg_dma() debug macro

Also convert relevant messages to use this macro.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
229a41d9d0d27e9570a18444e6435164b8807c75 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Add brcms_dbg_int() debug macro

Also convert relevant message to use this macro.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5ce58bb5f95c75b6966a9dc1f91992797f3c2286 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Add rx and tx debug macros

Also convert relevant messages over to use thses macros.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
913911f47b510ea3bfa468b43e7d43ee52d2de10 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Add brcms_dbg_mac80211() debug macro

This macro is used for messages related to the 802.11 MAC layer.
Relevant messages are also converted to use this macro.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b353dda485038d5033b066cc946dfcf66afae128 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Use debug macros for general error and debug statements

Convert most uses of wiphy_* and pr_* for general error and debug
messages to use the internal debug macros instead. Most code used only
for initialization still use wiphy_err(), as well as some locations
which are executed too early to use the debug macros. Some debug
messages which are redundant or not useful are removed.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b03417443c4dd3f65a070fe95cea1f2682eb0aa8 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Add module parameter for setting the debug level

The debug level can be set by passing debug=... to brcmsmac whenever
CONFIG_BRCMDBG is enabled.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1ca47e687a44b3db86fca9241109309fb36c3e37 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcm80211: Convert log message levels to debug levels

In preparation for enhancements to debug and trace support, convert the
message levels to debug levels which will be used for enabling
categories of debug messages. The two message levels are little-used
anyway and are combined into the BRCM_DL_INFO debug level.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
75be3e24eeedbc9ec5faf3483fe9b449abec94e8 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Reduce number of entries in tx DMA rings

Currently up to 256 frames can be queued for each DMA ring. This is
excessive, and now that we have better flow control we can get by with
less. Experimentation has shown 64 to work well.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e041f65d5f00011049c7d6af0e31ce69ce9e2655 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Remove internal tx queue

The brcmsmac internal tx buffering is problematic. The amount of
buffering is excessive (228 packets in addition to the 256 slots in each
DMA ring), and frames may be dropped due to a lack of flow control.

This patch reworks the transmit code path to remove the internal
buffering. Frames are immediately handed off to the DMA support rather
than passing through an intermediate queue. Non-aggregate frames are
queued immediately into the tx rings, and aggregate frames are queued
temporarily in an AMPDU session until ready for transmit.

Transmit flow control is also added to avoid dropping packets when the
tx rings are full. Conceptually this is a separate change, but it's
included in this commit because removing the tx queue without adding
flow control could cause significant problems.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
32d0f12a1611421abf70ff7c30d76c739aafad64 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Use IEEE 802.11 AC levels for pktq precedence levels

The mac80211 tx queues and brcmsmac DMA fifos both map directly to AC
levels. Therefore it's much more straightforward to queue tx frames and
choose the tx fifo based on the mac80211 queue instead of mapping 802.1D
priority tags to precedence levels then back to AC levels. mac80211
already maps the 802.1D levels to the appropriate AC levels and queues
management frames at the maximum priority, so the results should be
identical.

One functional change resulting from this patch is that AMPDU retries no
longer get a priority boost to queue them ahead of packets with the same
priority already in the tx queue. This behavior will be restored (in
effect at least) in a later patch when the tx queue is removed.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7f2de08fc0b997ef580a2204e6d14c3c889282c4 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Remove unimplemented flow control functions

Functions for flow control exist but remain unimplemented. Remove these
in advance of adding real flow control.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5c8067caeecbabf8c60dbb73dd517d2a2aad16a5 15-Nov-2012 Seth Forshee <seth.forshee@canonical.com> brcmsmac: Don't weight AMPDU packets in txfifo

According to the comments this "reduces rate lag," but in reality the
only way this value is used is for determining whether or not any frames
remain to be transmitted. Therefore there's no reason for AMPDU packets
to receive any weighting.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f4bda337bbb6e245e2a07f344990adeb6a70ff35 13-Nov-2012 Thomas Pedersen <thomas@cozybit.com> mac80211: support RX_FLAG_MACTIME_END

Allow drivers to indicate their mactime is at RX completion and adjust
for this in mac80211. Also rename the existing RX_FLAG_MACTIME_MPDU to
RX_FLAG_MACTIME_START to clarify its intent. Based on similar code by
Johannes Berg.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
[fix docs, atheros drivers]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
dfae714361ba75323914da19eb411aaae53d6af0 29-Sep-2012 Hauke Mehrtens <hauke@hauke-m.de> bcma: add an extra pcie core struct

The BCM4706 has two PCIe host controller on the bcma bus. For PCIe
client mode it is assumed that there is only one PCIe controller so the
PCIe driver, like b43 and brcmsmac are accessing the first PCIe
controller when they want to issue a operation on the host controller.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
858a455ba86b0b515d34972e68095ecd912c08cc 24-Jul-2012 Johannes Berg <johannes.berg@intel.com> brcmsmac: use ieee80211_channel_to_frequency

Instead of hard-coding almost the same functionality,
just use ieee80211_channel_to_frequency() directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
644e8c07391c0190b806d5001cbee82ebe2615b3 10-Jul-2012 Thomas Huehn <thomas@net.t-labs.tu-berlin.de> brcmsmac: restructure info->control.sta handling as it is goning to be removed soon.

brcmsmac uses info->control.sta while doing ampdu aggregation. This patch
changes the usage of the structure info->control.sta, as it is going to be
removed soon from struct ieee80211_tx_info. This patch is a pre-requisit in
order to add transmission power control (TPC) to the mac80211 subsystem.

Suggested-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cacaa64be6c7806fff90bc090a08da02be872d20 30-Jun-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: extend brcms_c_chipmatch() to also handle non PCIe devices

Now brcms_c_chipmatch() is also able to handle non PCI devices and also
does some checking for SoC if they are supported by brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
093cd33497d4f3336bf0940a0fa1d5659dbe68d2 02-Jul-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: extend xmtfifo_sz array

The xmtfifo_sz array contains the queue sizes for the different core
revs. This array missed the sizes for the core rev 17 and 28. This
patch extends the array to also include these sizes and adds a warning
if no queue size is stored in the array for the given core rev.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0d3b9dd1a3608eadbd2db157f44bbdd11cf63745 30-Jun-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: add a conditions for core rev 17 again

This reverts some changes made in this commit:
commit 7234592364e2efe8b4ac1040c99b1d7ef01cf502
Author: Roland Vossen <rvossen@broadcom.com>
Date: Mon Feb 14 12:16:45 2011 +0100

staging: brcm80211: removal of inactive d11 code

The bcm4716 has a rev 17 wireless core and this condition is needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a5fed0c1e48ca6c153e33e63aef406b4ef97cd95 30-Jun-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove some unnessessacry casts and void pointer

Acked-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>
1ef1a57de7078edc2504d156be606249cc32c199 30-Jun-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: use chip and package id constants from bcma

This patch depends on addin the chip IDs to bcma done in this commit in
my pending patch series for bcma.
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun Jun 3 18:17:57 2012 +0200

bcma: add constants for chip ids

Acked-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>
edc7651f3a4ffa7fca37d92401562694121512ad 16-Jun-2012 Seth Forshee <seth.forshee@canonical.com> brcm80211: smac: use current regulatory domain when checking whether OFDM is allowed

The brcmsmac internal regulatory data is being used to determine whether
OFDM should be allowed, and this is only done once during
initialization. To be effective this needs to be checked against
mac80211's regulatory rules for the current channel.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
91691295527d3fd63f12079222df0fd8048acccb 16-Jun-2012 Seth Forshee <seth.forshee@canonical.com> brcm80211: smac: always set channel specified by mac80211

In some situations brcmsmac is choosing a channel internally. This makes
it difficult at times to know what channel to use for enforcing
regulatory constraints, so instead always use the channel from the
mac80211 configuration.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2c208890c6d4e16076c6664137703ec813e8fa6c 04-Jun-2012 Joe Perches <joe@perches.com> wireless: Remove casts to same type

Adding casts of objects to the same type is unnecessary
and confusing for a human reader.

For example, this cast:

int y;
int *p = (int *)&y;

I used the coccinelle script below to find and remove these
unnecessary casts. I manually removed the conversions this
script produces of casts with __force, __iomem and __user.

@@
type T;
T *p;
@@

- (T *)p
+ p

Neatened the mwifiex_deauthenticate_infra function which
was doing odd things with array pointers and not using
is_zero_ether_addr.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
a06f2109917e19f41af4d19144ce993247b4eff2 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: read PCI vendor and device id only for PCI devices

If brcmsmac is used on non PCI(s) devices it should not try to access
bus->host_pci.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c496fe3a7ffcba32ffed61735e7fed8861e62ac3 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove pcicore_fixcfg()

This is now done in bcma by bcma_core_pci_fixcfg().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
712e3c1f33f807db5bdf40e7d01e075e9b995a7c 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove _ai_clkctl_cc()

This is now done by calling bcma_core_set_clockmode()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fa0b823b179d0d06bac60394dd3cb1c998fe26e2 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove ai_gpiocontrol()

This is now done by calling bcma_chipco_gpio_control().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b30ee754400d16606fc6308fa36ad4f49a72ff85 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove ai_pci_setup()

This is now done by calling bcma_core_pci_irq_ctl()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
23c8ae8d8cacc052215da374c414bad2c36c91e4 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove PCIe functions needed for PCIe core rev <= 10

The devices I know of are not using a PCIe core with rev <= 10. The
BCM4718 uses a PCIe core with revision 14 and the BCM43224 uses a PCIe
core with revision 15. This patch removes support for old PCIe core
versions, which are not found on devices supported by brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5d661a740acd23b46be2c2a08346e608e190fd77 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: remove references to PCI

There are no devices which are using bcma and have a PCI bus, just a
PCIe bus or something else. bcma does not support PCI devices, so lets
also remove PCI support from brcmsmac. All devices currently supported
by brcmsmac are PCIe based.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
898d3c3b2462cd439edb575f43b732425693aff0 29-Apr-2012 Hauke Mehrtens <hauke@hauke-m.de> brcmsmac: use sprom from bcma

bcma now provides all sprom attributes needed by brcmsmac and also
parses them from the pci sprom ant otp.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6ead629b27269c553c9092c47cd8f5ab0309ee3b 22-Apr-2012 Eldad Zack <eldad@fogrefinery.com> brcmsmac: "INTERMEDIATE but not AMPDU" only when tracing

I keep getting the following messages on the log buffer:
[ 2167.097507] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
[ 2281.331305] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
[ 2281.332539] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
[ 2329.876605] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
[ 2329.877354] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
[ 2462.280756] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
[ 2615.651689] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU

From the code comment I understand that this something that can -
and does, quite frequently - happen.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Acked-by: Franky Lin<frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
badc4f07622f0f7093a201638f45e85765f1b5e4 11-Apr-2012 Arend van Spriel <arend@broadcom.com> brcm80211: smac: resume transmit fifo upon receiving frames

There have been reports about not being able to use access-points
on channel 12 and 13 or having connectivity issues when these channels
were part of the selected regulatory domain. Upon switching to these
channels the brcmsmac driver suspends the transmit dma fifos. This
patch resumes them upon handing over the first received beacon to
mac80211.

This patch is to be applied to the stable tree for kernel versions
3.2 and 3.3.

Cc: stable@vger.kernel.org
Tested-by: Francesco Saverio Schiavarelli <fschiava@libero.it>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
137dabed34a13f90e068327b98329331367c9b46 09-Feb-2012 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove smatch warnings from brcmsmac code

The patch fixes following smatch warnings:

main.c +2902 brcms_b_read_objmem(11) info: ignoring unreachable code.
mac80211_if.c +1146 brcms_suspend(8) error: we previously assumed 'wl'
could be null (see line 1145)
srom.c +641 _initvars_srom_pci(16) error: potential null dereference
'entry'. (kzalloc returns null)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
23677ce3172fcb93522a1df077d21019e73ee1e3 09-Feb-2012 Joe Perches <joe@perches.com> drivers/net: Remove boolean comparisons to true/false

Booleans should not be compared to true or false
but be directly tested or tested with !.

Done via cocci script:

@@
bool t;
@@
- t == true
+ t
@@
bool t;
@@
- t != true
+ !t
@@
bool t;
@@
- t == false
+ !t
@@
bool t;
@@
- t != false
+ t

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
02f77195db6ce252d5488b6d48d8edc1c5e2aa30 15-Jan-2012 Joe Perches <joe@perches.com> brcm80211: Use pr_fmt and pr_<level>

Convert printks to pr_<level>
Prefix logging with pr_fmt.
Use ##__VA_ARGS__ in some WL_ logging macros.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c2e6d5abab73df316d2ae7caa6d902c143b2d52d 15-Jan-2012 Joe Perches <joe@perches.com> brcm80211: Use brcmu_dbg_hex_dump

Convert a couple of pr_debug/print_hex_dump to
the standard utility.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
18aad4f8e11530fd7e41d0faea0752c3a0ce799c 15-Jan-2012 Joe Perches <joe@perches.com> brcm80211: Convert printk(KERN_DEBUG to pr_debug

Use pr_debug to allow dynamic debugging to work.

Move an #endif to allow brcmf_dbg_hex_dump
to be outside the #if/#endif block.
Move a const char* declaration to be inside a
pr_debug so the function doesn't need a #if/#endif
block.
Don't use temporaries in debugging functions so
the code can be optimized away.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8ae746543c8370fd04c28aaf8f185c1687b0e694 15-Jan-2012 Joe Perches <joe@perches.com> brcm80211: Use normal DEBUG define

Current CONFIG_BRCMDBG flag when enabled does not
necessarily enable proper pr_debug output when
DEBUG is not also enabled.

Remove BCMDBG define and just use DEBUG instead.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f96b08a7e6f69c0f0a576554df3df5b1b519c479 17-Jan-2012 Stanislaw Gruszka <sgruszka@redhat.com> brcmsmac: fix tx queue flush infinite loop

This patch workaround live deadlock problem caused by infinite loop
in brcms_c_wait_for_tx_completion(). I do not consider the patch as
the proper fix, which should fix the real reason of tx queue flush
failure, but patch helps with system lockup.

Reference:
https://bugzilla.kernel.org/show_bug.cgi?id=42576

Reported-and-tested-by: Patrick <ragamuffin@datacomm.ch>
Cc: stable@vger.kernel.org # 3.2+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3b758a68402fc5b1c2dbc246595dbdc062bf0da9 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove mapped core related function from aiutils.c

In aiutils.c the selected core was maintained by its index number. This
is obsolete using BCMA functions so several functions using that index
have been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
937642f55ef7f8b9dcb202754d53853c7b36e15f 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove interrupt disable callback functionality

There is no need to interrupt disable/enable functionality any
longer due to BCMA usage assures the correct core is accessed
in any context.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a8779e4a8e7f0f90ae169393cd72105134ce7c7b 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use bcma core control functions

BCMA provides functions to control the state of the cores so
using that and remove similar implementation from the driver.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7d8e18e456466c2247abe0658e4add598f85c98e 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: replace ai_corereg() function with ai_cc_reg()

The ai_corereg() function is only used in the driver to safely
access the chipcommon core. The function has been renamed to
ai_cc_reg() removing the need to provide a core index parameter.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4b006b11ca18995677c5f1cd03cc9c42fbe80693 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use bcma functions for register access in phy code

This adds the use of bcma functions to access the registers within
the phy source code.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e81da6501b433f757baa981a4e02fd9956cd3147 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use bcma function for register access in dma.c

The dma.c source file now uses the register access functions
provided by bcma.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2e81b9b19f20286425fed3b54df9b81189444cee 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use DMA-API calls for descriptor allocations

Using BCMA hides the specifics about the host interface. The
driver is now using the DMA-API to do dma related calls. BCMA
provides the device object to use in the DMA-API calls.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16d2812e9eaaa47ca952ea81e34b4f400c861dfc 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use bcma core register access functions for 802.11 core

The driver now uses the bcma register access functions to read and
write the registers on the 802.11 core. The dma and phy code need
to be modified next and access to the other cores. That will be done
in coming patches.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
28a5344261753fadb1731b82c5eeecca708a877c 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: change ai_attach interface taking a bcma_bus object

The ai_attach now takes a bcma_bus object as its parameter to
obtain all required information needed for chip control.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b63337a0344d7ebf3c8d710b1327d0b61c0f6f03 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: change attach interfaces in main.c for bcma support

The driver is probed through bcma which provides a device representing
the core. This device is now passed in brcms_c_attach and brcms_b_attach
functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b2ffec46ea230acac52170dd0a747526328d25fe 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use inline access functions for struct si_pub fields

Instead of directly accessing the fields in struct si_pub the driver
now uses inline access functions. This is in preparation of the bcma
integration as a lot of information will be provided by bcma module.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
be667669ec01d514b3820f8c74d9336115be6aa7 23-Nov-2011 Alwin Beukers <alwin@broadcom.com> brcm80211: smac: added support for mac80211 filter flags

Added support for handling FIF_PROMISC_IN_BSS, FIF_FCSFAIL,
FIF_CONTROL, FIF_OTHER_BSS and FIF_PSPOLL.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3030794fcae9b07d62a9ff7649a413dff0c88e01 23-Nov-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove skb next pointer usage from the driver

In two places the next pointer was used to process a sk_buff chain
but it will always get a single sk_buff so this has been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
02a588a2e3b9e0156f306a542bb6cd29ba42e1b9 10-Nov-2011 Alwin Beukers <alwin@broadcom.com> brcm80211: smac: combine promiscuous mode functionality

Combined mac configuration for promiscious mode and monitor mode, and
removed unused monitor mode flag in pub structure.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ad4d71f69ebe2acab75d0a8a66ab9f7609151cce 10-Nov-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove usage of brcmu_pkttotlen

The function brcmu_pkttotlen calculates the total length of a sk_buff
chain following the next pointer. In brcmsmac this is not needed as
in each place where it was used the provided sk_buff had a NULL pointer
as next field value.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b7eec4233c348447e3f2d653f6c64128f2457c94 10-Nov-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: replace own access category definitions with mac80211 enum

The brcmsmac had own definitions for the access categories. The mac80211
header provides these as well as they are used in the conf_tx callback.
As the definitions did not match the driver configured the tx parameters
to the wrong queue.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3fd172d30b59d9b73cb35ab263a1f0173dae974c 21-Oct-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use sk_buff list for handling frames in receive path

In the receive path the frames are obtained from the dma using
multiple sk_buff that were linked using the skb next pointer.
This has been changed and it now used sk_buff lists and skb_queue
functions instead.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
dc460127898cab9014fb06281e0bad37b198bd83 21-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: mute transmit on ops_start

Monitor mode functionality (not functional yet) requires transmit to be
muted after ops_start() is called, transmit is unmuted when the first
interface is added.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c6c44893c864429a7c6a4f7942dfb3ee182b4ad1 21-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: fixed inconsistency in transmit mute

Transmit was muted in two ways: full mute and a partial mute called
'pre ism cac time' mute. But, this 'pre ism cac time' mute was done at
one place in the code (when tx_mute == false), and overridden later
on in another place in code.

To fix this, the 'pre ism cac time' mute has been replaced by a non
mute.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a8bc4917ed6bd6101569630708baaac14504ab8c 21-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: bugfix for tx mute in brcms_b_init()

Transmit can only be muted if the mac core is enabled. When brcms_b_init()
is called, the mac core is suspended. Brcms_b_init() calls a transmit mute
function that requires an enabled mac core. This code path is never taken,
but would have been taken in subsequent patches.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
43ac09722f8e8f69cb528877c4b853cf9b96d9d7 21-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: removed down-on-rf-kill functionality

Softmac would bring its interface down on an RF kill switch condition,
without Mac80211 intervention. Because Mac80211 should be the only party
initiating interfaces going up and down, this functionality has been
removed.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
28237002e726bfaeb3ab682ec5574d697a15e00d 21-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: removed down-on-watchdog MPC functionality

Softmac would bring its interface down on a certain Minimum Power Save
related condition, without Mac80211 intervention. Because Mac80211 should
be the only party initiating interfaces going up and down, this functionality
has been removed. All notions of 'MPC' have been removed in the code as
well.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4412953061def953a6458f9f1b277e442f83c919 21-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: removed MPC related variables

Several member variables were never read.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0bf1f883fd0ad0b6f55974aad6682de43f7305dd 21-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: removed MPC related code

The chip init sequence enables MPC (Minimum Power Consumption), but the
driver disables it after that. As there are no interfaces to enable this
mode the related code is unused (member variable wlc->mpc is false).

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
09c7dfa0f01e906671f303061babb7e6ddce2c92 18-Oct-2011 Arend van Spriel <arend@broadcom.com> brcm80211: util: remove function brcmu_format_hex() from brcmutil

The function brcmu_format_hex() filled a string buffer with byte
values from a data buffer. The calling function used this string
buffer in a printk. Now the calling function uses the kernel
function print_hex_dump_bytes().

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
094b199bf707a41bc6748f0c2f0a23ecf5d2ccd6 18-Oct-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: some local function made static in main.c

In main.c a couple of functions were not static although they
were only locally used. Sparse gave warnings on them and these
functions have been made static.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c261bdf8acad56717cae233709808d8d9291ce36 18-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: indicate severe problems to Mac80211

In case the hardware crashes, a reinitialization internal to the driver
was performed. Since Mac80211 must be in the know of such an event as
well, ieee80211_restart_hw() is now called.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
230382140e043903aa1138bb7ca095d7d23fd164 18-Oct-2011 Alwin Beukers <alwin@broadcom.com> brcm80211: removed duplicate defines

Removed defines from aiutils.h also present in soc.h.

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
73ffc2fcd53a041fdee1bade5ae471ce704be26d 18-Oct-2011 Alwin Beukers <alwin@broadcom.com> brcm80211: cleanup defines in main.c

Signed-off-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
447606514450655885c5369782d7baa2478916a7 12-Oct-2011 Alwin Beukers <alwin@broadcom.com> brcm80211: moved function brcmu_format_flags

Moved the brcmu_format_flags function and brcmu_bit_desc structure
into smac. Names were adjusted accordingly.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
94bdc2a2d487b1d51f024dba5db0bc34013d7706 12-Oct-2011 Alwin Beukers <alwin@broadcom.com> brcm80211: cleanup function prototypes

- removed unneeded fn prototypes from include files.
- explicitly marked fn prototypes as extern in include files.
- reordered functions to account for removed forward declarations
in include files.
- removed unused functions: brcms_c_txflowcontrol_override,
brcms_c_txflowcontrol_prio_isset, brcms_c_txflowcontrol.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
be69c4ef462a476523f89c74e7db29f6ad207a1a 12-Oct-2011 Roland Vossen <rvossen@broadcom.com> brcm80211: smac: removed redundant timer function parameters

Parameter 'wl' is already stored in struct brcms_timer, so the number of
function parameters could be decreased.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5b435de0d786869c95d1962121af0d7df2542009 05-Oct-2011 Arend van Spriel <arend@broadcom.com> net: wireless: add brcm80211 drivers

Add the brcm80211 tree to drivers/net/wireless, and disable the version that's
in drivers/staging. This version includes the sources currently in staging,
plus any changes that have been sent out for review.

Sources in staging will be deleted in a followup patch.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>