History log of /drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
Revision Date Author Comments
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>
00d2ec0c5f5ae8507931efd8feb174f30370c12e 15-Dec-2011 Larry Finger <Larry.Finger@lwfinger.net> brcmsmac: Replace kmalloc/memset with kzalloc

In ai_attach(), space is allocated for an si_info struct. Immediately
after the allocation, routine ai_doattach() is called and that allocated
space is set to zero. As no other routine calls ai_doattach(), kzalloc()
can be utilized.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e922602edad30d1f225c32c1cddd80fb3740a8d3 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: cleanup buscore handling in aiutils.c

Instead of storing the buscore information now the BCMA core device
is kept for quick reference in si_info structure.

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>
99559f136559e6822f20fcf1b63e6910df126941 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: cleanup si_info structure definition

Number of fields are no longer needed as the BCMA provides it
or makes them redundant. These 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>
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>
e3d5af56e1a50c9bc3c24810e6b25df91d37bc77 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove ai_switch_core() function

The function ai_switch_core() is no longer needed and its counterpart
ai_restore_core() as well, because interrupts disabling is not needed
anymore.

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>
a232c8a12a0fe55a2e671d24626c98a21b57a332 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: INTROFF/INTRESTORE macros removed

The macros were used to assure that the correct core was accessed in
the ISR, but register access is now done giving the explicit core so
no need to change interrupt state.

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>
291ed3dcd5334c7987272494373751f86e5b61ee 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove empty or unused functions from pmu.c

A number of functions in pmu.c are not used or adding no functionality
at all. These 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>
c8086745215435281ca319b5243bf8b11a366ef3 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use bcma core access functions in aiutils.c

The code in aiutils.c now uses the BCMA function for control the
registers in the device cores.

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>
b14f16747f143b330d0cef84ff2c590c3f1744a4 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use bcma core access function in srom.c

The code in srom.c now uses the core access function provided by
BCMA so no need to pass __iomem pointer any longer.

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>
d3126c52eb7f3239b45481facc4078b08ed1027c 13-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: change ai_findcoreidx() to ai_findcore()

Instead of returning the core index the function now returns
the bcma device for the requested core id. This function is
now exposed in the header file.

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>
b0327ffa8cfe69ce2d380200c2097b86c6b3efd9 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: use bcma core access functions in nicpci.c

Code in nicpci.c now uses the PCI(E) core as provided by the BCMA
bus driver to configure that core.

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>
834d5846d1b17114530e2f4e4e0e5a415065f1f8 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove unused functions and/or prototypes

Several functions provided by aiutils.c are not used in brcmsmac
driver and 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>
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>
ad5db1317c04ece569d18c692f8e49453c552d1e 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove SI_FAST() macro usage

The use of SI_FAST() macro interferes with the BCMA integration as
it causes BCMA and aiutils.c to get out of sync on what the current
core is. When everything is using BCMA we will try to add SI_FAST
functionality to BCMA to avoid unnecessary core switching.

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>
5204563ab841fbb5d6ef683635682e155a0a9e84 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove enumeration rom parsing function

The core enumeration rom is already parsed by the bcma bus driver and
there is no need to repeat the exercise. The ai_scan() function still
exists but is targetted for removal as well.

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>
cbc80db2922112cf3c77a6121827ad662ea78c2d 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: rename struct si_info field pbus to pcibus

When moving to bcma usage there are two busses in play. The pci bus
connecting the device to the host and the bcma bus connecting the
cores in the device. To distinguish this the attribute pbus has been
renamed to a more explicit name, ie. pcibus.

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>
2e397c303807fadcf65f4e070603107453db4352 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: move fields from struct si_pub to struct si_info

The structure si_pub contained couple of fields that were only
used internally in aiutils.c. These have been moved to the
si_info structure.

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>
c9eb65a4865a915e93847be19a546d47816d88e4 09-Dec-2011 Arend van Spriel <arend@broadcom.com> brcm80211: smac: remove unused fields from struct si_pub definition

Several fields from the si_pub structure were not used or only set
once but never checked. These fields have been removed.

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>
8505a7e652c8a37bdacfd9d6ad5096c793f55ceb 13-Nov-2011 Joe Perches <joe@perches.com> brcmsmac: Use current logging styles

Add and use pr_fmt and pr_<level>
Remove useless double parentheses from macros.
Remove function names from format strings, add to pr_debug use.
Coalesce formats.
Remove uncompileable undeclared variable in a DMA_NONE use.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-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>