aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
AgeCommit message (Collapse)Author
2013-05-28brcmfmac: Turn off ARP offloading when configured for AP.Hante Meuleman
ARP offloading should only be used in STA or P2P client mode. It is currently configured once at init. When being configured for AP ARP offloading should be turned off and when AP mode is left it can be turned back on. Cc: stable@vger.kernel.org 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>
2013-03-06brcmfmac: introduce tracepoints for message loggingArend van Spriel
Inspired by tracing functionality added by Seth Forshee in the brcmsmac driver, this patch adds similar functionality to brcmfmac. Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: define pr_fmt in one placeArend van Spriel
Several source files (but not all) define the pr_fmt() macro in exactly the same way. Instead this commit defines it in a header file so driver logging is consistent. Cc: Joe Perches <joe@perches.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>
2012-12-10brcmfmac: error messages should not be suppressedArend van Spriel
The call to brcmf_dbg(ERROR, ...) only resulted in a log message when compiled with -DDEBUG. Error messages are valuable for resolving issues so this patch replaces it with brcmf_err(...) so they always end up in the log. 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>
2012-11-16brcmfmac: code cleanupHante Meuleman
Removing obsolete functions and prototypes. Moving (and renaming) defines to place with similar definitions. Removing unnecessary includes. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-16brcmfmac: rework firmware event handling codeArend van Spriel
Handling of firmware event has been reworked into a seperate code file. The change is needed as firmware event can be received in interrupt context. Decoupling of the event handling has been lowered to allow event processing to sleep. 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: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-14brcmfmac: remove obsolete function brcmf_c_mkiovarHante Meuleman
the refactored firmware interface layer made this function obsolete. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-14brcmfmac: fix pkt_filter sizeof calculation.Hante Meuleman
sizeof calculation in setting pkt_filter was incorrect. This patch fixes that and removes related defines which have become obsolete. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-29brcmfmac: use fwil for default configuration setup.Hante Meuleman
modify the setup code to use the refactored firmware interface layer. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-29brcmfmac: rework driver initialization in brcmf_bus_start()Arend van Spriel
In brcmf_bus_start() a number of settings are sent to the device. For this functions are used that bypass the common firmware interface. By reordering the code in brcmf_bus_start() this bypass can be removed. 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>
2012-10-29brcmfmac: extend struct brcmf_if with bssidx fieldArend van Spriel
When the firmware notifies the driver about adding a new interface it also provides an index for the bss associated with this interface. This index will be needed for upcoming features like peer-to-peer. By adding this index in struct brcmf_if it is easy to obtain as this will be associated with the net_device private data. 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>
2012-10-29brcmfmac: remove redundant function brcmf_c_mkiovar_bsscfgHante Meuleman
function brcmf_c_mkiovar_bsscfg became redundant with refactoring of firmware interface layer. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-19brcmfmac: remove 'always false' condition from brcmf_c_mkiovar_bsscfgArend van Spriel
The parameter buflen is unsigned so the condition buflen < 0 is always false. The patch fixes the if statement checking the buffer length. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@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>
2012-10-01Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-09-30Merge branch 'for-davem' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next John W. Linville says: ==================== Here is another batch of updates intended for 3.7... Highlights include an hci_connect re-write in Bluetooth, HCI/LLC layer separation in NFC, removal of the raw pn544 NFC driver, NFC LLCP raw sockets support, improved IBSS auth frame handling in mac80211, full-MAC AP mode notification support in mac80211, a lot of attention paid to brcmfmac, and the usual level of updates to iwlwifi, ath9k, mwifiex, and rt2x00, and various other updates. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/team/team.c drivers/net/usb/qmi_wwan.c net/batman-adv/bat_iv_ogm.c net/ipv4/fib_frontend.c net/ipv4/route.c net/l2tp/l2tp_netlink.c The team, fib_frontend, route, and l2tp_netlink conflicts were simply overlapping changes. qmi_wwan and bat_iv_ogm were of the "use HEAD" variety. With help from Antonio Quartulli. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28brcmfmac: use different fw api for encryption,auth. configHante Meuleman
This patch changes the commands being used to configure encryption and authentication. These new methods are needed for when p2p and hostap support are added. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
2012-09-24brcmfmac: fix debug printout of event data.Hante Meuleman
Some events result in printing of the buffer when debug is enabled. This printing was not very efficient. Changed to macro so it comes out nice and clean without filling log buffer. 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>
2012-09-24brcmfmac: add parameter check in brcmf_c_mkiovar()Arend van Spriel
This patch assures data is only appended in output buffer when data is not NULL and datalen is not zero. 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>
2012-09-12brcmfmac: add e-scan support.Hante Meuleman
This patch adds e-scan support (currently i-scan is in use). E-scan is a more powerful and memory efficient method for scanning. E-scan will be the default scan method and eventually, i-scan support will be removed. The scan methods do not make any difference to the end-user. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
2012-09-12brcmfmac: Fix big endian host configuration data.Hante Meuleman
Fixes big endian host configuration parameters. Cc: stable <stable@vger.kernel.org> 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>
2012-06-27brcmfmac: move glom alignment setting to SDIO bus layerFranky Lin
txglomming alignment is a SDIO bus specific feature. It is more appropriate to place it in SDIO bus layer instead of common layer. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-27brcmfmac: restrict dongle txglom disable to old SDIO coreFranky Lin
txglomming is a firmware feature for sdio bus interface. For SDIO device cores newer than revision 11, the default setting of firmware should be used instead of disabling it from the host side. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-27brcmfmac: add support for bus specific data commandFranky Lin
brcmfmac need to support data command setting for dongle's bus core. A list must be placed at brcmf_bus structure before calling brcmf_bus_start in order to be sent by brcmf_c_preinit_dcmds. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-13brcm80211: fmac: postpone dongle RF enabling.Franky Lin
BRCMF_C_UP is the command that asks the firmware to enable RF of dongle. Some firmware initialization steps must be performed during RF is down. Postpone BRCMF_C_UP firing until brcmf_netdev_open get called to ensure firmware have enough time to finish initialization. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-24brcm80211: Use pr_fmt and pr_<level>Joe Perches
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>
2012-01-24brcm80211: Convert printk(KERN_DEBUG to pr_debugJoe Perches
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>
2012-01-24brcm80211: Use normal DEBUG defineJoe Perches
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>
2011-12-19brcm80211: fmac: move sdio related macros to sdio_host.hFranky Lin
dhd_bus.h will be used as the shared header file for common layer and bus layer. It should not contain any sdio specific macros. This patch moves them to sdio_host.h as part of the fullmac bus interface refactoring. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19brcm80211: fmac: change function brcmf_c_prec_enq parameterFranky Lin
Change parameter to device pointer for bus layer interface function brcmf_c_prec_enq. This is part of the fullmac bus interface refactoring. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19brcm80211: fmac: change function add_if parameterFranky Lin
Change parameter to device pointer for bus layer interface function brcmf_add_if. This is part of the fullmac bus interface refactoring. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19brcm80211: fmac: remove oneline proto block functionsFranky Lin
brcmf_os_proto_block and brcmf_os_proto_unblock are oneline functions handling proto_block mutex. Place the mutex interface call inline to increase readability. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19brcm80211: fmac: unify common layer driver data structureFranky Lin
No need to split data structure for common layer into brcmf_pub and brcmf_info. Absorb brcmf_info into brcmf_pub to increase code readability. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-28brcm80211: fmac: remove function brcmf_c_initFranky Lin
brcmf_c_init only init brcmf_msg_level used for debug. It's no longer needed as brcmf_msg_level doesn't cause trouble to multiple instances. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-08brcm80211: fmac: use brcmf_add_if for all net devicesFranky Lin
Use brcmf_add_if for primary and virtual net device interfaces. This is part of the net device interface clean up for fullmac. 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>
2011-10-14brcm80211: moved function brcmu_mkiovarAlwin Beukers
Moved the brcmu_mkiovar function into fmac, adjusting the name 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>
2011-10-14brcm80211: add endian annotation to packet filter structuresArend van Spriel
The packet filter structures were byte copied and transferred over the host bus to the device. As such they are little endian and have been annotated accordingly. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
2011-10-11net: wireless: add brcm80211 driversArend van Spriel
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>