summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmutil/utils.c
AgeCommit message (Collapse)Author
2013-04-22brcmutil: simplify brcmu_pkt_free_skb()Arend van Spriel
The function brcmu_pkt_free_skb() use skb->destructor to decide how the sk_buff should be freed. However, when running AP mode with iptables configured this results in a kernel warning. Reviewed-by: Hante Meuleman <meuleman@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>
2013-03-06brcmutil: add dequeue function with filteringArend van Spriel
Adding a packet dequeue function that will return packets that pass the provided match function. 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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05brcm80211: brcmu_pkt_buf_free_skb() should handle NULLDan Carpenter
This is potentially called with NULL pointers, for example, look at brcmf_c_prec_enq(). Since it's a free() function, probably people expect it to handle NULL pointers. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-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: Add and use brcmX_dbg_dump_hexJoe Perches
Reduce the number of #ifdef DEBUG uses by adding a dbg_hex_dump routine which has the appropriate #ifdef DEBUG test. 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-11-11brcm80211: util: remove pointer traversal from brcmu_pkt_buf_free_skbArend van Spriel
The function brcmu_pkt_buf_free_skb() was following the next pointer to free all linked packets. However, it is only called with unlinked packets so this can be 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: John W. Linville <linville@tuxdriver.com>
2011-11-11brcm80211: util: move brcmu_pkttotlen() function to brcmfmacArend van Spriel
The functions brcmu_pkttotlen() is only used in brcmfmac driver so it has been moved there. It also does not use the sk_buff next pointer anymore but walks a skb queue to determine the total length. 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>
2011-11-11brcm80211: util: use sk_buff_head in precedence queue functionsArend van Spriel
Instead of dealing with sk_buff prev pointers the queue functions now make use of the sk_buff_head functions provided by the kernel. Reported-by: Johannes Berg <johannes@sipsolutions.net> 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>
2011-11-08brcm80211: util: remove function brcmu_format_hex() from brcmutilArend van Spriel
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>
2011-11-08brcm80211: util: move brcmu_pktfrombuf() function to brcmfmacArend van Spriel
The function brcmu_pktfrombuf was only used in the brcmfmac source and has been moved there. It has been refactored to match its use. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14net: wireless: brcm80210: include module.hStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14brcm80211: moved function brcmu_format_flagsAlwin Beukers
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>
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: moved function brcmu_parse_tlvsAlwin Beukers
Moved the brcmu_parse_tlvs function and brcmu_tlv structure into the only file using them. 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>
2011-10-14brcm80211: moved function brcmu_chipnameAlwin Beukers
Moved the brcmu_chipname function into the only file using it. The function name was 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>
2011-10-14brcm80211: moved power conversion functionsAlwin Beukers
Moved brcmu_mw_to_qdbm and brcmu_qdbm_to_mw functions into the only file using them. 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>
2011-10-14brcm80211: removed unused functionsAlwin Beukers
Removed brcmu_bitcount, brcmu_mhz2channel, brcmu_chspec_ctlchan. 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-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>