staging: brcm80211: fullmac cleanup and checkpatch fixes
cover staging: brcm80211: fullmac cleanup and checkpatch fixes
This series mainly consists of fullmac cleanup. Several checkpatch warnings were fixed and some review comments from the previous series were addressed.
Arend van Spriel (10):
staging: brcm80211: clean up checkpatch error
staging: brcm80211: rename macros in dhd_dbg.h
staging: brcm80211: remove checkpatch warnings 'suspect code indent'
staging: brcm80211: made name lookup arrays more const
staging: brcm80211: remove checkpatch warnings from phy_n.c
staging: brcm80211: replace occurrences of __attribute__((packed))
staging: brcm80211: remove several externs from dhd_linux.c
staging: brcm80211: remove external definitions from phy_lcn.c
staging: brcm80211: remove macro WLBANDINITFN from brcmsmac
staging: brcm80211: added newlines to some debug macros in
bcmsdh_sdmmc.c
Roland Vossen (21):
staging: brcm80211: removed occurrences of 'dhd'
staging: brcm80211: removed unused #ifdef sections in fullmac
staging: brcm80211: removed asserts from two fullmac files
staging: brcm80211: removed asserts from bcmsdh.c
staging: brcm80211: removed asserts from dhd_cdc.c and dhd_common.c
staging: brcm80211: removed asserts from dhd_linux.c
staging: brcm80211: removed asserts from dhd_sdio.c
staging: brcm80211: removed remains of assert mechanism in fullmac
staging: brcm80211: replaced various typedefs in softmac
staging: brcm80211: replaced typedef phy_info_t by struct brcms_phy
staging: brcm80211: replaced typedef wlc_phy_t with struct
brcms_phy_pub
staging: brcm80211: replaced typedef tx_power_t by struct
brcms_tx_power
staging: brcm80211: renamed structures in softmac
staging: brcm80211: replaced Broadcom specific acronym WLC
staging: brcm80211: deleted two fullmac source files
staging: brcm80211: merged dngl_stats.h into dhd.h
staging: brcm80211: merged sbsdio.h into sdio_host.h
staging: brcm80211: merged bcmsdbus.h into sdio_host.h
staging: brcm80211: moved fullmac definitions from .h to .c files
staging: brcm80211: removed #ifdef SDIOH_API_ACCESS_RETRY_LIMIT
staging: brcm80211: simpler string handling in
brcmf_c_pktfilter_offload_set()
drivers/staging/brcm80211/brcmfmac/Makefile | 4 +- drivers/staging/brcm80211/brcmfmac/bcmsdbus.h | 190 --- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 208 +++- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 178 --- drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 344 +++++- .../brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c | 262 ---- drivers/staging/brcm80211/brcmfmac/dhd.h | 49 +- drivers/staging/brcm80211/brcmfmac/dhd_bus.h | 15 +- drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | 78 +- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 251 ++-- drivers/staging/brcm80211/brcmfmac/dhd_dbg.h | 68 +- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 468 ++----- drivers/staging/brcm80211/brcmfmac/dhd_proto.h | 32 +- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 1344 +++++++++++--------- drivers/staging/brcm80211/brcmfmac/dngl_stats.h | 32 - drivers/staging/brcm80211/brcmfmac/sbsdio.h | 277 ---- drivers/staging/brcm80211/brcmfmac/sdio_host.h | 152 +++ drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 44 +- drivers/staging/brcm80211/brcmsmac/aiutils.c | 134 +- drivers/staging/brcm80211/brcmsmac/aiutils.h | 2 +- drivers/staging/brcm80211/brcmsmac/alloc.c | 79 +- drivers/staging/brcm80211/brcmsmac/ampdu.c | 121 +- drivers/staging/brcm80211/brcmsmac/ampdu.h | 4 +- drivers/staging/brcm80211/brcmsmac/antsel.c | 21 +- drivers/staging/brcm80211/brcmsmac/bmac.c | 452 ++++---- drivers/staging/brcm80211/brcmsmac/bmac.h | 98 +- drivers/staging/brcm80211/brcmsmac/channel.c | 417 ++++--- drivers/staging/brcm80211/brcmsmac/channel.h | 61 +- drivers/staging/brcm80211/brcmsmac/d11.h | 32 +- drivers/staging/brcm80211/brcmsmac/dma.c | 300 +++--- drivers/staging/brcm80211/brcmsmac/dma.h | 8 +- drivers/staging/brcm80211/brcmsmac/mac80211_if.c | 26 +- drivers/staging/brcm80211/brcmsmac/mac80211_if.h | 4 +- drivers/staging/brcm80211/brcmsmac/main.c | 804 ++++++------ drivers/staging/brcm80211/brcmsmac/main.h | 295 +++-- drivers/staging/brcm80211/brcmsmac/nicpci.c | 103 +- drivers/staging/brcm80211/brcmsmac/otp.c | 45 +- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 550 ++++---- drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h | 203 ++-- drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | 336 +++--- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 532 ++++---- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h | 4 +- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 832 ++++++------ .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.c | 29 +- .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.h | 30 +- drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.c | 18 +- drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h | 8 +- drivers/staging/brcm80211/brcmsmac/phy_shim.c | 74 +- drivers/staging/brcm80211/brcmsmac/phy_shim.h | 76 +- drivers/staging/brcm80211/brcmsmac/pub.h | 186 ++-- drivers/staging/brcm80211/brcmsmac/rate.c | 153 ++- drivers/staging/brcm80211/brcmsmac/rate.h | 90 +- drivers/staging/brcm80211/brcmsmac/scb.h | 5 +- drivers/staging/brcm80211/brcmsmac/srom.c | 26 +- drivers/staging/brcm80211/brcmsmac/stf.c | 43 +- drivers/staging/brcm80211/brcmsmac/stf.h | 2 +- drivers/staging/brcm80211/brcmsmac/types.h | 127 +-- drivers/staging/brcm80211/include/brcmu_utils.h | 4 - drivers/staging/brcm80211/include/brcmu_wifi.h | 37 +- drivers/staging/brcm80211/include/defs.h | 26 +- 60 files changed, 4940 insertions(+), 5453 deletions(-) delete mode 100644 drivers/staging/brcm80211/brcmfmac/bcmsdbus.h delete mode 100644 drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c delete mode 100644 drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c delete mode 100644 drivers/staging/brcm80211/brcmfmac/dngl_stats.h delete mode 100644 drivers/staging/brcm80211/brcmfmac/sbsdio.h
Signature · 1 line
1.7.4.1
PATCH 1/31 staging: brcm80211: clean up checkpatch error
A checkpatch error was introduced in following commit:
0f22b8a staging: brcm80211: remove MMC_SDIO_ABORT macro definition
The patch gets rid of the error.
--- drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +1 -2
@@ -567,8 +567,7 @@ brcmf_sdioh_request_byte(struct sdioh_info *sd, uint rw, uint func,sdio_writeb (gInstance->func[func], *byte, regaddr, &err_ret);sdio_release_host (gInstance->func[func]); - } -else if (regaddr <0xF0 ) { + }else if (regaddr <0xF0 ) {sd_err (("brcmf: F0 Wr:0x%02x: write " "disallowed\n" , regaddr)); }else {
Signature · 1 line
1.7.4.1
PATCH 2/31 staging: brcm80211: removed occurrences of 'dhd'
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
DHD is a Broadcom internal term and has been replaced by BRCMF.
--- drivers/staging/brcm80211/brcmfmac/dhd.h | 26 ++-- drivers/staging/brcm80211/brcmfmac/dhd_bus.h | 8 +- drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | 7 +- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 4 +- drivers/staging/brcm80211/brcmfmac/dhd_dbg.h | 6 +- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 45 +++---- drivers/staging/brcm80211/brcmfmac/dhd_proto.h | 32 +++--- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 158 +++++++++++------------ 8 files changed, 132 insertions(+), 154 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd.h +11 -15
@@ -18,8 +18,8 @@* Common types * */ -#ifndef _dhd_h_ -#define _dhd_h_ +#ifndef _BRCMF_H_ +#define _BRCMF_H_#define BRCMF_VERSION_STR "4.218.248.5"
@@ -310,10 +310,10 @@ struct brcmf_event {#define BRCMF_E_LINK_BSSCFG_DIS 4/* The level of bus communication with the dongle */ -enum dhd_bus_state { -DHD_BUS_DOWN ,/* Not ready for frame transfers */ -DHD_BUS_LOAD ,/* Download access only (CPU reset) */ -DHD_BUS_DATA /* Ready for frame transfers */ +enum brcmf_bus_state { +BRCMF_BUS_DOWN ,/* Not ready for frame transfers */ +BRCMF_BUS_LOAD ,/* Download access only (CPU reset) */ +BRCMF_BUS_DATA /* Ready for frame transfers */ };/* Pattern matching filter. Specifies an offset within received packets to
@@ -533,12 +533,12 @@ struct brcmf_pub {struct brcmf_proto *prot;struct brcmf_info *info; -/* Internal dhd items */ +/* Internal brcmf items */ bool up;/* Driver up/down (to OS) */ bool txoff;/* Transmit flow-controlled */ bool dongle_reset;/* true = DEVRESET put dongle into reset */ -enum dhd_bus_state busstate; -uint hdrlen;/* Total DHD header length (proto + bus) */ +enum brcmf_bus_state busstate; +uint hdrlen;/* Total BRCMF header length (proto + bus) */ uint maxctl;/* Max size rxctl request from proto to bus */ uint rxsz;/* Rx buffer size bus module should use */ u8 wme_dp;/* wme discard priority */
@@ -564,7 +564,7 @@ struct brcmf_pub {unsigned long rx_dropped;/* Packets dropped locally (no memory) */ unsigned long rx_flushed;/* Packets flushed due to unscheduled sendup thread */ -unsigned long wd_dpc_sched;/* Number of times dhd dpc scheduled by +unsigned long wd_dpc_sched;/* Number of times dpc scheduled by watchdog timer */ unsigned long rx_readahead_cnt;/* Number of packets where header read-ahead
@@ -744,10 +744,6 @@ static inline void MUTEX_UNLOCK_WL_SCAN_SET(void) { } -/* -* Exported from dhd OS modules (dhd_linux/dhd_ndis) -*/ -/* Indication from bus module regarding presence/insertion of dongle. * Return struct brcmf_pub pointer, used as handle to OS module in later calls. * Returned structure should have bus and prot pointers filled in.
@@ -902,4 +898,4 @@ struct brcmf_pktgen {#define BRCMF_IDLE_ACTIVE 0/* Do not request any SD clock change when idle */ -#endif /* _dhd_h_ */ +#endif /* _BRCMF_H_ */
drivers/staging/brcm80211/brcmfmac/dhd_bus.h +4 -4
@@ -14,8 +14,8 @@* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _dhd_bus_h_ -#define _dhd_bus_h_ +#ifndef _BRCMF_BUS_H_ +#define _BRCMF_BUS_H_/* Packet alignment for most efficient SDIO (can change based on platform) */ #ifndef BRCMF_SDALIGN
@@ -26,7 +26,7 @@#endif /* -* Exported from dhd bus module (dhd_usb, dhd_sdio) +* Exported from brcmf bus module (brcmf_usb, brcmf_sdio) */ /* Watchdog timer interval */
@@ -68,4 +68,4 @@ extern void brcmf_bus_clearcounts(struct brcmf_pub *drvr);extern void brcmf_sdbrcm_wd_timer (struct brcmf_bus *bus,uint wdtick); -#endif /* _dhd_bus_h_ */ +#endif /* _BRCMF_BUS_H_ */
drivers/staging/brcm80211/brcmfmac/dhd_cdc.c +3 -4
@@ -82,7 +82,6 @@ struct brcmf_proto_bdc_header {#define RETRIES 2/* # of retries to retrieve matching ioctl response */ #define BUS_HEADER_LEN (16+BRCMF_SDALIGN)/* Must be atleast SDPCM_RESERVE -* defined in dhd_sdio.c * (amount of header tha might be added) * plus any space that might be needed * for alignment padding.
@@ -176,8 +175,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, ret =brcmf_proto_cdc_msg (drvr);if (ret <0 ) { -DHD_ERROR (("dhdcdc_query_ioctl: dhdcdc_msg failed w/status " -"%d\n" , ret)); +DHD_ERROR (("brcmf_proto_cdc_query_ioctl: brcmf_proto_cdc_msg " +"failed w/status %d\n" , ret)); goto done; }
@@ -280,7 +279,7 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,struct brcmf_proto *prot = drvr->prot;int ret =-1 ; -if (drvr->busstate ==DHD_BUS_DOWN ) { +if (drvr->busstate ==BRCMF_BUS_DOWN ) {DHD_ERROR (("%s : bus is down. we have nothing to do\n" , __func__));return ret;
drivers/staging/brcm80211/brcmfmac/dhd_common.c +2 -2
@@ -118,7 +118,7 @@ static int brcmf_c_dump(struct brcmf_pub *drvr, char *buf, int buflen)brcmu_binit (strbuf, buf, buflen); -/* Base DHD info */ +/* Base info */ brcmu_bprintf (strbuf,"%s\n" , brcmf_version);brcmu_bprintf (strbuf,"\n" ); brcmu_bprintf(strbuf, "pub.up %d pub.txoff %d pub.busstate %d\n",
@@ -672,7 +672,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)if (hdr.version !=MSGTRACE_VERSION ) {DHD_ERROR ( ("\nMACEVENT: %s [unsupported version --> " -"dhd version:%d dongle version:%d]\n" , +"brcmf version:%d dongle version:%d]\n" , event_name,MSGTRACE_VERSION , hdr.version) );/* Reset datalen to avoid display below */
drivers/staging/brcm80211/brcmfmac/dhd_dbg.h +3 -3
@@ -14,8 +14,8 @@* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _dhd_dbg_ -#define _dhd_dbg_ +#ifndef _BRCMF_DBG_H_ +#define _BRCMF_DBG_H_#if defined(BCMDBG )
@@ -73,4 +73,4 @@extern int brcmf_msg_level; -#endif /* _dhd_dbg_ */ +#endif /* _BRCMF_DBG_H_ */
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +16 -29
167 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/dhd_proto.h +16 -16
@@ -14,8 +14,8 @@* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _dhd_proto_h_ -#define _dhd_proto_h_ +#ifndef _BRCMF_PROTO_H_ +#define _BRCMF_PROTO_H_#ifndef IOCTL_RESP_TIMEOUT #define IOCTL_RESP_TIMEOUT 2000/* In milli second */
@@ -26,22 +26,22 @@#endif /* -* Exported from the dhd protocol module (dhd_cdc, dhd_rndis) +* Exported from the brcmf protocol module (brcmf_cdc) */ /* Linkage, sets prot link and updates hdrlen in pub */ -extern int brcmf_proto_attach (struct brcmf_pub *dhdp); +extern int brcmf_proto_attach (struct brcmf_pub *drvr); -/* Unlink, frees allocated protocol memory (including dhd_prot) */ -extern void brcmf_proto_detach (struct brcmf_pub *dhdp); +/* Unlink, frees allocated protocol memory (including brcmf_proto) */ +extern void brcmf_proto_detach (struct brcmf_pub *drvr);/* Initialize protocol: sync w/dongle state. * Sets dongle media info (iswl, drv_version, mac address). */ -extern int brcmf_proto_init (struct brcmf_pub *dhdp); +extern int brcmf_proto_init (struct brcmf_pub *drvr);/* Stop protocol: sync w/dongle state. */ -extern void brcmf_proto_stop (struct brcmf_pub *dhdp); +extern void brcmf_proto_stop (struct brcmf_pub *drvr);/* Add any protocol-specific data header. * Caller must reserve prot_hdrlen prepend space.
@@ -54,22 +54,22 @@ extern int brcmf_proto_hdrpull(struct brcmf_pub *, int *ifidx, struct sk_buff *rxp);/* Use protocol to issue ioctl to dongle */ -extern int brcmf_proto_ioctl (struct brcmf_pub *dhd,int ifidx, +extern int brcmf_proto_ioctl (struct brcmf_pub *drvr,int ifidx,struct brcmf_ioctl *ioc,void *buf,int len);/* Add prot dump output to a buffer */ -extern void brcmf_proto_dump (struct brcmf_pub *dhdp, +extern void brcmf_proto_dump (struct brcmf_pub *drvr,struct brcmu_strbuf *strbuf);/* Update local copy of dongle statistics */ -extern void brcmf_proto_dstats (struct brcmf_pub *dhdp); +extern void brcmf_proto_dstats (struct brcmf_pub *drvr); -extern int brcmf_c_ioctl (struct brcmf_pub *dhd_pub,struct brcmf_c_ioctl *ioc, +extern int brcmf_c_ioctl (struct brcmf_pub *drvr,struct brcmf_c_ioctl *ioc,void *buf,uint buflen); -extern int brcmf_c_preinit_ioctls (struct brcmf_pub *dhd); +extern int brcmf_c_preinit_ioctls (struct brcmf_pub *drvr); -extern int brcmf_proto_cdc_set_ioctl (struct brcmf_pub *dhd,int ifidx,uint cmd, -void *buf,uint len); +extern int brcmf_proto_cdc_set_ioctl (struct brcmf_pub *drvr,int ifidx, +uint cmd,void *buf,uint len); -#endif /* _dhd_proto_h_ */ +#endif /* _BRCMF_PROTO_H_ */
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +77 -81
522 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 3/31 staging: brcm80211: removed unused #ifdef sections in fullmac
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
CONFIG_MACH_SANDGATE2G, CONFIG_MMC_MSM7X00A, CONFIG_HAS_EARLYSUSPEND and CONFIG_WIFI_CONTROL_FUNC were never defined.
--- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 126 ----------------------- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 5 - drivers/staging/brcm80211/include/brcmu_utils.h | 4 - 3 files changed, 0 insertions(+), 135 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +0 -126
@@ -29,9 +29,6 @@#include <linux/fs.h> #include <linux/uaccess.h> #include <net/cfg80211.h> -#if defined(CONFIG_HAS_EARLYSUSPEND ) -#include <linux/earlysuspend.h> -#endif #include <defs.h> #include <brcmu_utils.h> #include <brcmu_wifi.h>
@@ -90,10 +87,6 @@ struct brcmf_info {bool set_macaddress;u8 macvalue[ETH_ALEN ];atomic_t pend_8021x_cnt; - -#ifdef CONFIG_HAS_EARLYSUSPEND -struct early_suspend early_suspend; -#endif /* CONFIG_HAS_EARLYSUSPEND */ };/* Error bits */
@@ -180,108 +173,6 @@ static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdstruct brcmf_event_msg *event_ptr, void **data_ptr); -#if defined(CONFIG_HAS_EARLYSUSPEND ) -static int brcmf_set_suspend (int value,struct brcmf_pub *drvr) -{ -int power_mode =PM_MAX ; -/* struct wl_pkt_filter_enable enable_parm; */ -char iovbuf[32 ]; -int bcn_li_dtim =3 ; - -DHD_TRACE (("%s: enter, value = %d in_suspend=%d\n" , - __func__, value, drvr->in_suspend)); - -if (drvr && drvr->up) { -if (value && drvr->in_suspend) { - -/* Kernel suspended */ -DHD_TRACE (("%s: force extra Suspend setting\n" , - __func__)); - -brcmf_proto_cdc_set_ioctl (drvr,0 ,BRCMF_C_SET_PM , - (char *)&power_mode, -sizeof (power_mode)); - -/* Enable packet filter, only allow unicast -packet to send up */ -brcmf_set_packet_filter (1 , drvr); - -/* if dtim skip setup as default force it -* to wake each third dtim -* for better power saving. -* Note that side effect is chance to miss BC/MC -* packet -*/ -if ((drvr->dtim_skip ==0 ) || (drvr->dtim_skip ==1 )) - bcn_li_dtim =3 ; -else - bcn_li_dtim = drvr->dtim_skip; -brcmu_mkiovar ("bcn_li_dtim" , (char *)&bcn_li_dtim, -4 , iovbuf,sizeof (iovbuf)); -brcmf_proto_cdc_set_ioctl (drvr,0 ,BRCMF_C_SET_VAR , - iovbuf,sizeof (iovbuf)); - }else { - -/* Kernel resumed */ -DHD_TRACE (("%s: Remove extra suspend setting\n" , - __func__)); - - power_mode =PM_FAST ; -brcmf_proto_cdc_set_ioctl (drvr,0 ,BRCMF_C_SET_PM , - (char *)&power_mode, -sizeof (power_mode)); - -/* disable pkt filter */ -brcmf_set_packet_filter (0 , drvr); - -/* restore pre-suspend setting for dtim_skip */ -brcmu_mkiovar ("bcn_li_dtim" , (char *)&drvr->dtim_skip, -4 , iovbuf,sizeof (iovbuf)); - -brcmf_proto_cdc_set_ioctl (drvr,0 ,BRCMF_C_SET_VAR , - iovbuf,sizeof (iovbuf)); - } - } - -return 0 ; -} - -static void brcmf_suspend_resume_helper (struct brcmf_info *drvr_priv,int val) -{ -struct brcmf_pub *drvr = &drvr_priv->pub; - -brcmf_os_proto_block (drvr); -/* Set flag when early suspend was called */ - drvr->in_suspend = val; -if (!drvr->suspend_disable_flag) -brcmf_set_suspend (val, drvr); -brcmf_os_proto_unblock (drvr); -} - -static void brcmf_early_suspend (struct early_suspend *h) -{ -struct brcmf_info *drvr_priv = - container_of(h, struct brcmf_info, early_suspend); - -DHD_TRACE (("%s: enter\n" , __func__)); - -if (drvr_priv) -brcmf_suspend_resume_helper (drvr_priv,1 ); - -} - -static void brcmf_late_resume (struct early_suspend *h) -{ -struct brcmf_info *drvr_priv = - container_of(h, struct brcmf_info, early_suspend); - -DHD_TRACE (("%s: enter\n" , __func__)); - -if (drvr_priv) -brcmf_suspend_resume_helper (drvr_priv,0 ); -} -#endif /* defined(CONFIG_HAS_EARLYSUSPEND) */ -/* * Generalized timeout mechanism. Uses spin sleep with exponential * back-off until
@@ -1479,20 +1370,9 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)*/ memcpy (netdev_priv (net), &drvr_priv,sizeof (drvr_priv)); -#if defined(CUSTOMER_HW2 ) && defined(CONFIG_WIFI_CONTROL_FUNC ) - g_bus = bus; -#endif #if defined(CONFIG_PM_SLEEP )atomic_set (&brcmf_mmc_suspend, false);#endif /* defined(CONFIG_PM_SLEEP) */ -/* Init lock suspend to prevent kernel going to suspend */ -#ifdef CONFIG_HAS_EARLYSUSPEND - drvr_priv->early_suspend.level =EARLY_SUSPEND_LEVEL_BLANK_SCREEN +20 ; - drvr_priv->early_suspend.suspend = brcmf_early_suspend; - drvr_priv->early_suspend.resume = brcmf_late_resume; -register_early_suspend (&drvr_priv->early_suspend); -#endif -return &drvr_priv->pub; fail:
@@ -1664,12 +1544,6 @@ void brcmf_detach(struct brcmf_pub *drvr)struct brcmf_if *ifp;int i; -#if defined(CONFIG_HAS_EARLYSUSPEND ) -if (drvr_priv->early_suspend.suspend) -unregister_early_suspend ( - &drvr_priv->early_suspend); -#endif /* defined(CONFIG_HAS_EARLYSUSPEND) */ -for (i =1 ; i <BRCMF_MAX_IFS ; i++)if (drvr_priv->iflist[i])brcmf_del_if (drvr_priv, i);
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +0 -5
@@ -166,13 +166,8 @@ struct rte_console {#define TXRETRIES 2/* # of retries for tx frames */ -#if defined(CONFIG_MACH_SANDGATE2G ) -#define BRCMF_RXBOUND 250/* Default for max rx frames in -one scheduling */ -#else #define BRCMF_RXBOUND 50/* Default for max rx frames in one scheduling */ -#endif /* defined(CONFIG_MACH_SANDGATE2G) */ #define BRCMF_TXBOUND 20/* Default for max tx frames in one scheduling */
drivers/staging/brcm80211/include/brcmu_utils.h +0 -4
@@ -205,12 +205,8 @@ extern int brcmu_iovar_lencheck(const struct brcmu_iovar *table, void *arg,#define ISPOWEROF2 (x) ((((x)-1)&(x)) == 0)/* map physical to virtual I/O */ -#if !defined(CONFIG_MMC_MSM7X00A )#define REG_MAP (pa, size) ioremap_nocache((unsigned long)(pa), \ (unsigned long)(size)) -#else -#define REG_MAP (pa, size) (void *)(0) -#endif /* the largest reasonable packet buffer driver uses for ethernet MTU in bytes */ #define PKTBUFSZ 2048
Signature · 1 line
1.7.4.1
PATCH 4/31 staging: brcm80211: rename macros in dhd_dbg.h
In reply to Arend van SprielThe header file dhd_dbg.h contains several macros used throughout the code starting with DHD_. These have been renamed to get rid of this broadcom specific acronym.
--- drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | 72 +- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 218 +++--- drivers/staging/brcm80211/brcmfmac/dhd_dbg.h | 62 +- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 224 +++--- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 1018 ++++++++++++----------- 5 files changed, 815 insertions(+), 779 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_cdc.c +36 -36
@@ -105,7 +105,7 @@ static int brcmf_proto_cdc_msg(struct brcmf_pub *drvr)int len =le32_to_cpu (prot->msg.len) +sizeof (struct brcmf_proto_cdc_ioctl ); -DHD_TRACE (("%s: Enter\n" , __func__)); +BRCMF_TRACE (("%s: Enter\n" , __func__));/* NOTE : cdc->msg.len holds the desired length of the buffer to be * returned. Only up to CDC_MAX_MSG_SIZE of this buffer area
@@ -124,7 +124,7 @@ static int brcmf_proto_cdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len)int ret;struct brcmf_proto *prot = drvr->prot; -DHD_TRACE (("%s: Enter\n" , __func__)); +BRCMF_TRACE (("%s: Enter\n" , __func__)); do { ret = brcmf_sdbrcm_bus_rxctl(drvr->bus,
@@ -147,8 +147,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,int ret =0 , retries =0 ;u32 id, flags =0 ; -DHD_TRACE (("%s: Enter\n" , __func__)); -DHD_CTL (("%s: cmd %d len %d\n" , __func__, cmd, len)); +BRCMF_TRACE (("%s: Enter\n" , __func__)); +BRCMF_CTL (("%s: cmd %d len %d\n" , __func__, cmd, len));/* Respond "bcmerror" and "bcmerrorstr" with local cache */ if (cmd ==BRCMF_C_GET_VAR && buf) {
@@ -175,8 +175,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, ret =brcmf_proto_cdc_msg (drvr);if (ret <0 ) { -DHD_ERROR (("brcmf_proto_cdc_query_ioctl: brcmf_proto_cdc_msg " -"failed w/status %d\n" , ret)); +BRCMF_ERROR (("brcmf_proto_cdc_query_ioctl: brcmf_proto_cdc_msg " +"failed w/status %d\n" , ret)); goto done; }
@@ -192,9 +192,9 @@ retry:if ((id < prot->reqid) && (++retries <RETRIES )) goto retry;if (id != prot->reqid) { -DHD_ERROR (("%s: %s: unexpected request id %d (expected %d)\n" , -brcmf_ifname (drvr, ifidx), __func__, id, - prot->reqid)); +BRCMF_ERROR (("%s: %s: unexpected request id %d (expected %d)\n" , +brcmf_ifname (drvr, ifidx), __func__, id, + prot->reqid)); ret = -EINVAL ; goto done; }
@@ -228,8 +228,8 @@ int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,int ret =0 ;u32 flags, id; -DHD_TRACE (("%s: Enter\n" , __func__)); -DHD_CTL (("%s: cmd %d len %d\n" , __func__, cmd, len)); +BRCMF_TRACE (("%s: Enter\n" , __func__)); +BRCMF_CTL (("%s: cmd %d len %d\n" , __func__, cmd, len));memset (msg,0 ,sizeof (struct brcmf_proto_cdc_ioctl ));
@@ -254,9 +254,9 @@ int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, id = (flags &CDCF_IOC_ID_MASK ) >>CDCF_IOC_ID_SHIFT ;if (id != prot->reqid) { -DHD_ERROR (("%s: %s: unexpected request id %d (expected %d)\n" , -brcmf_ifname (drvr, ifidx), __func__, id, - prot->reqid)); +BRCMF_ERROR (("%s: %s: unexpected request id %d (expected %d)\n" , +brcmf_ifname (drvr, ifidx), __func__, id, + prot->reqid)); ret = -EINVAL ; goto done; }
@@ -280,13 +280,13 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,int ret =-1 ;if (drvr->busstate ==BRCMF_BUS_DOWN ) { -DHD_ERROR (("%s : bus is down. we have nothing to do\n" , - __func__)); +BRCMF_ERROR (("%s : bus is down. we have nothing to do\n" , + __func__));return ret; }brcmf_os_proto_block (drvr); -DHD_TRACE (("%s: Enter\n" , __func__)); +BRCMF_TRACE (("%s: Enter\n" , __func__));ASSERT (len <=BRCMF_C_IOCTL_MAXLEN );
@@ -294,13 +294,13 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc, goto done;if (prot->pending == true) { -DHD_TRACE (("CDC packet is pending!!!! cmd=0x%x (%lu) " -"lastcmd=0x%x (%lu)\n" , - ioc->cmd, (unsigned long )ioc->cmd, prot->lastcmd, - (unsigned long )prot->lastcmd)); +BRCMF_TRACE (("CDC packet is pending!!!! cmd=0x%x (%lu) " +"lastcmd=0x%x (%lu)\n" , + ioc->cmd, (unsigned long )ioc->cmd, prot->lastcmd, + (unsigned long )prot->lastcmd));if ((ioc->cmd ==BRCMF_C_SET_VAR ) || (ioc->cmd ==BRCMF_C_GET_VAR )) -DHD_TRACE (("iovar cmd=%s\n" , (char *)buf)); +BRCMF_TRACE (("iovar cmd=%s\n" , (char *)buf)); goto done; }
@@ -361,7 +361,7 @@ void brcmf_proto_hdrpush(struct brcmf_pub *drvr, int ifidx, {struct brcmf_proto_bdc_header *h; -DHD_TRACE (("%s: Enter\n" , __func__)); +BRCMF_TRACE (("%s: Enter\n" , __func__));/* Push BDC header used to convey priority for buses that don't */
@@ -384,13 +384,13 @@ int brcmf_proto_hdrpull(struct brcmf_pub *drvr, int *ifidx, {struct brcmf_proto_bdc_header *h; -DHD_TRACE (("%s: Enter\n" , __func__)); +BRCMF_TRACE (("%s: Enter\n" , __func__));/* Pop BDC header used to convey priority for buses that don't */ if (pktbuf->len <BDC_HEADER_LEN ) { -DHD_ERROR (("%s: rx data too short (%d < %d)\n" , __func__, - pktbuf->len,BDC_HEADER_LEN )); +BRCMF_ERROR (("%s: rx data too short (%d < %d)\n" , __func__, + pktbuf->len,BDC_HEADER_LEN ));return -EBADE ; }
@@ -398,22 +398,22 @@ int brcmf_proto_hdrpull(struct brcmf_pub *drvr, int *ifidx, *ifidx =BDC_GET_IF_IDX (h);if (*ifidx >=BRCMF_MAX_IFS ) { -DHD_ERROR (("%s: rx data ifnum out of range (%d)\n" , - __func__, *ifidx)); +BRCMF_ERROR (("%s: rx data ifnum out of range (%d)\n" , + __func__, *ifidx));return -EBADE ; }if (((h->flags &BDC_FLAG_VER_MASK ) >>BDC_FLAG_VER_SHIFT ) !=BDC_PROTO_VER ) { -DHD_ERROR (("%s: non-BDC packet received, flags 0x%x\n" , -brcmf_ifname (drvr, *ifidx), h->flags)); +BRCMF_ERROR (("%s: non-BDC packet received, flags 0x%x\n" , +brcmf_ifname (drvr, *ifidx), h->flags));return -EBADE ; }if (h->flags &BDC_FLAG_SUM_GOOD ) { -DHD_INFO (("%s: BDC packet received with good rx-csum, " -"flags 0x%x\n" , -brcmf_ifname (drvr, *ifidx), h->flags)); +BRCMF_INFO (("%s: BDC packet received with good rx-csum, " +"flags 0x%x\n" , +brcmf_ifname (drvr, *ifidx), h->flags));PKTSETSUMGOOD (pktbuf, true); }
@@ -430,13 +430,13 @@ int brcmf_proto_attach(struct brcmf_pub *drvr) cdc =kzalloc (sizeof (struct brcmf_proto ),GFP_ATOMIC );if (!cdc) { -DHD_ERROR (("%s: kmalloc failed\n" , __func__)); +BRCMF_ERROR (("%s: kmalloc failed\n" , __func__)); goto fail; }/* ensure that the msg buf directly follows the cdc msg struct */ if ((unsigned long )(&cdc->msg +1 ) != (unsigned long )cdc->buf) { -DHD_ERROR (("struct brcmf_proto is not correctly defined\n" )); +BRCMF_ERROR (("struct brcmf_proto is not correctly defined\n" )); goto fail; }
@@ -475,7 +475,7 @@ int brcmf_proto_init(struct brcmf_pub *drvr)int ret =0 ;char buf[128 ]; -DHD_TRACE (("%s: Enter\n" , __func__)); +BRCMF_TRACE (("%s: Enter\n" , __func__));brcmf_os_proto_block (drvr);
drivers/staging/brcm80211/brcmfmac/dhd_common.c +110 -108
534 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/dhd_dbg.h +28 -34
83 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +116 -108
608 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +525 -493
1,595 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.4.1
Part of the diff is not shown here. View the raw message.
PATCH 5/31 staging: brcm80211: removed asserts from two fullmac files
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
ASSERTs are non desirable, replaced by error handling where applicable.
--- drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 37 +++++++------------- .../brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c | 2 - 2 files changed, 13 insertions(+), 26 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +13 -24
@@ -279,12 +279,16 @@ brcmf_sdioh_iovar_op(struct sdioh_info *si, const char *name,bool bool_val;u32 actionid; -ASSERT (name); -ASSERT (len >=0 ); +if (name ==NULL || len <=0 ) +return -EINVAL ; -/* Get must have return space; Set does not take qualifiers */ -ASSERT (set || (arg && len)); -ASSERT (!set || (!params && !plen)); +/* Set does not take qualifiers */ +if (set && (params || plen)) +return -EINVAL ; + +/* Get must have return space;*/ +if (!set && !(arg && len)) +return -EINVAL ;sd_trace (("%s: Enter (%s %s)\n" , __func__, (set ?"set" :"get" ), name));
@@ -676,7 +680,6 @@ brcmf_sdioh_request_packet(struct sdioh_info *sd, uint fix_inc, uint write,sd_trace (("%s: Enter\n" , __func__)); -ASSERT (pkt);BRCMF_PM_RESUME_WAIT (sdioh_request_packet_wait);BRCMF_PM_RESUME_RETURN_ERROR (-EIO );
@@ -687,14 +690,6 @@ brcmf_sdioh_request_packet(struct sdioh_info *sd, uint fix_inc, uint write, pkt_len +=3 ; pkt_len &=0xFFFFFFFC ; -/* Make sure the packet is aligned properly. -* If it isn't, then this -* is the fault of brcmf_sdioh_request_buffer() which -* is supposed to give -* us something we can work with. -*/ -ASSERT (((ulong) (pkt->data) &DMA_ALIGN_MASK ) ==0 ); -if ((write) && (!fifo)) { err_ret = sdio_memcpy_toio(gInstance->func[func], addr, ((u8 *) (pnext->data)),
@@ -789,11 +784,10 @@ brcmf_sdioh_request_buffer(struct sdioh_info *sd, uint pio_dma, uint fix_inc,brcmu_pkt_buf_free_skb (mypkt); }else if (((ulong) (pkt->data) &DMA_ALIGN_MASK ) !=0 ) { -/* Case 2: We have a packet, but it is unaligned. */ - -/* In this case, we cannot have a chain. */ -ASSERT (pkt->next ==NULL ); - +/* +* Case 2: We have a packet, but it is unaligned. +* In this case, we cannot have a chain (pkt->next == NULL) +*/ sd_data (("%s: Creating aligned %s Packet, len=%d\n" , __func__, write ?"TX" :"RX" , pkt->len)); mypkt =brcmu_pkt_buf_get_skb (pkt->len);
@@ -886,13 +880,10 @@ static void brcmf_sdioh_irqhandler(struct sdio_func *func)sd_trace (("brcmf: ***IRQHandler\n" )); sd = gInstance->sd; -ASSERT (sd !=NULL );sdio_release_host (gInstance->func[0 ]);if (sd->use_client_ints) { sd->intrcount++; -ASSERT (sd->intr_handler); -ASSERT (sd->intr_handler_arg); (sd->intr_handler) (sd->intr_handler_arg); }else {sd_err (("brcmf: ***IRQHandler\n" ));
@@ -912,6 +903,4 @@ static void brcmf_sdioh_irqhandler_f2(struct sdio_func *func)sd_trace (("brcmf: ***IRQHandlerF2\n" )); sd = gInstance->sd; - -ASSERT (sd !=NULL ); }
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c +0 -2
@@ -194,7 +194,6 @@ int brcmf_sdioh_osinit(struct sdioh_info *sd)void brcmf_sdioh_osfree (struct sdioh_info *sd) {struct sdos_info *sdos; -ASSERT (sd && sd->sdos_info); sdos = (struct sdos_info *)sd->sdos_info;kfree (sdos);
@@ -209,7 +208,6 @@ int brcmf_sdioh_interrupt_set(struct sdioh_info *sd, bool enable)sd_trace (("%s: %s\n" , __func__, enable ?"Enabling" :"Disabling" )); sdos = (struct sdos_info *)sd->sdos_info; -ASSERT (sdos);if (enable && !(sd->intr_handler && sd->intr_handler_arg)) { sd_err(("%s: no handler registered, will not enable\n",
Signature · 1 line
1.7.4.1
PATCH 6/31 staging: brcm80211: removed asserts from bcmsdh.c
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 36 --------------------------- 1 files changed, 0 insertions(+), 36 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +0 -36
@@ -119,30 +119,22 @@ brcmf_sdcard_iovar_op(struct brcmf_sdio_card *card, const char *name,int brcmf_sdcard_intr_enable (struct brcmf_sdio_card *card) { -ASSERT (card); -return brcmf_sdioh_interrupt_set (card->sdioh, true); }int brcmf_sdcard_intr_disable (struct brcmf_sdio_card *card) { -ASSERT (card); -return brcmf_sdioh_interrupt_set (card->sdioh, false); }int brcmf_sdcard_intr_reg (struct brcmf_sdio_card *card,void (*fn)(void *),void *argh) { -ASSERT (card); -return brcmf_sdioh_interrupt_register (card->sdioh, fn, argh); }int brcmf_sdcard_intr_dereg (struct brcmf_sdio_card *card) { -ASSERT (card); -return brcmf_sdioh_interrupt_deregister (card->sdioh); }
@@ -158,8 +150,6 @@ u8 brcmf_sdcard_cfg_read(struct brcmf_sdio_card *card, uint fnc_num, u32 addr,if (!card) card = l_card; -ASSERT (card->init_success); - #ifdef SDIOH_API_ACCESS_RETRY_LIMIT do { if (retry) /* wait for 1 ms till bus get settled down */
@@ -193,8 +183,6 @@ brcmf_sdcard_cfg_write(struct brcmf_sdio_card *card, uint fnc_num, u32 addr,if (!card) card = l_card; -ASSERT (card->init_success); - #ifdef SDIOH_API_ACCESS_RETRY_LIMIT do { if (retry) /* wait for 1 ms till bus get settled down */
@@ -223,8 +211,6 @@ u32 brcmf_sdcard_cfg_read_word(struct brcmf_sdio_card *card, uint fnc_num,if (!card) card = l_card; -ASSERT (card->init_success); - status =brcmf_sdioh_request_word (card->sdioh,SDIOH_CMD_TYPE_NORMAL ,SDIOH_READ , fnc_num, addr, &data,4 );
@@ -246,8 +232,6 @@ brcmf_sdcard_cfg_write_word(struct brcmf_sdio_card *card, uint fnc_num,if (!card) card = l_card; -ASSERT (card->init_success); - status =brcmf_sdioh_request_word (card->sdioh,SDIOH_CMD_TYPE_NORMAL ,SDIOH_WRITE , fnc_num, addr, &data,4 );
@@ -272,10 +256,6 @@ int brcmf_sdcard_cis_read(struct brcmf_sdio_card *card, uint func, u8 * cis,if (!card) card = l_card; -ASSERT (card->init_success); -ASSERT (cis); -ASSERT (length <=SBSDIO_CIS_SIZE_LIMIT ); - status =brcmf_sdioh_cis_read (card->sdioh, func, cis, length);if (ascii) {
@@ -330,8 +310,6 @@ u32 brcmf_sdcard_reg_read(struct brcmf_sdio_card *card, u32 addr, uint size)if (!card) card = l_card; -ASSERT (card->init_success); -if (bar0 != card->sbwad) {if (brcmf_sdcard_set_sbaddr_window (card, bar0))return 0xFFFFFFFF ;
@@ -384,8 +362,6 @@ u32 brcmf_sdcard_reg_write(struct brcmf_sdio_card *card, u32 addr, uint size,if (!card) card = l_card; -ASSERT (card->init_success); -if (bar0 != card->sbwad) { err =brcmf_sdcard_set_sbaddr_window (card, bar0);if (err)
@@ -429,14 +405,10 @@ brcmf_sdcard_recv_buf(struct brcmf_sdio_card *card, u32 addr, uint fn,uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK ;int err =0 ; -ASSERT (card); -ASSERT (card->init_success); -BRCMF_SD_INFO (("%s:fun = %d, addr = 0x%x, size = %d\n" , __func__, fn, addr, nbytes));/* Async not implemented yet */ -ASSERT (!(flags &SDIO_REQ_ASYNC ));if (flags &SDIO_REQ_ASYNC )return -ENOTSUPP ;
@@ -473,14 +445,10 @@ brcmf_sdcard_send_buf(struct brcmf_sdio_card *card, u32 addr, uint fn,uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK ;int err =0 ; -ASSERT (card); -ASSERT (card->init_success); -BRCMF_SD_INFO (("%s:fun = %d, addr = 0x%x, size = %d\n" , __func__, fn, addr, nbytes));/* Async not implemented yet */ -ASSERT (!(flags &SDIO_REQ_ASYNC ));if (flags &SDIO_REQ_ASYNC )return -ENOTSUPP ;
@@ -506,10 +474,6 @@ brcmf_sdcard_send_buf(struct brcmf_sdio_card *card, u32 addr, uint fn,int brcmf_sdcard_rwdata (struct brcmf_sdio_card *card,uint rw,u32 addr,u8 *buf,uint nbytes) { -ASSERT (card); -ASSERT (card->init_success); -ASSERT ((addr &SBSDIO_SBWINDOW_MASK ) ==0 ); - addr &=SBSDIO_SB_OFT_ADDR_MASK ; addr |=SBSDIO_SB_ACCESS_2_4B_FLAG ;
Signature · 1 line
1.7.4.1
PATCH 7/31 staging: brcm80211: removed asserts from dhd_cdc.c and dhd_common.c
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | 2 -- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 21 +++++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_cdc.c +0 -2
@@ -288,8 +288,6 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,BRCMF_TRACE (("%s: Enter\n" , __func__)); -ASSERT (len <=BRCMF_C_IOCTL_MAXLEN ); -if (len >BRCMF_C_IOCTL_MAXLEN ) goto done;
drivers/staging/brcm80211/brcmfmac/dhd_common.c +9 -12
@@ -272,7 +272,6 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, eprec = prec; else if (pktq_full(q)) { p =brcmu_pktq_peek_tail (q, &eprec); -ASSERT (p);if (eprec > prec)return false; }
@@ -280,7 +279,6 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,/* Evict if needed */ if (eprec >=0 ) {/* Detect queueing to unconfigured precedence */ -ASSERT (!pktq_pempty (q, eprec)); discard_oldest =AC_BITMAP_TST (drvr->wme_dp, eprec);if (eprec == prec && !discard_oldest)return false;/* refuse newer (incoming) packet */
@@ -290,9 +288,7 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,if (p ==NULL ) {BRCMF_ERROR (("%s: brcmu_pktq_penq() failed, oldest %d." , __func__, discard_oldest)); -ASSERT (p); } -brcmu_pkt_buf_free_skb (p); }
@@ -300,10 +296,9 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, p =brcmu_pktq_penq (q, prec, pkt);if (p ==NULL ) {BRCMF_ERROR (("%s: brcmu_pktq_penq() failed." , __func__)); -ASSERT (p); } -return true; +return p !=NULL ; } static int
@@ -317,14 +312,16 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name,BRCMF_TRACE (("%s: Enter\n" , __func__)); -ASSERT (name); -ASSERT (len >=0 ); +if (name ==NULL || len <=0 ) +return -EINVAL ; -/* Get MUST have return space */ -ASSERT (set || (arg && len)); +/* Set does not take qualifiers */ +if (set && (params || plen)) +return -EINVAL ; -/* Set does NOT take qualifiers */ -ASSERT (!set || (!params && !plen)); +/* Get must have return space;*/ +if (!set && !(arg && len)) +return -EINVAL ; vi =brcmu_iovar_lookup (brcmf_iovars, name);if (vi ==NULL ) {
Signature · 1 line
1.7.4.1
Re: [PATCH 07/31] staging: brcm80211: removed asserts from dhd_cdc.c and dhd_common.c
drivers/staging/brcm80211/brcmfmac/dhd_common.c brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name, · line 317
Quoted 9 lines · Arend van Spriel
drivers/staging/brcm80211/brcmfmac/dhd_common.c +2
-2@@ -317,14 +312,16 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name,BRCMF_TRACE (("%s: Enter\n" , __func__)); -ASSERT (name); -ASSERT (len >=0 ); +if (name ==NULL || len <=0 ) +return -EINVAL ;
In the original code len == 0 was OK but now we return -EINVAL.
regards,
dan carpenter
Re: [PATCH 07/31] staging: brcm80211: removed asserts from dhd_cdc.c and dhd_common.c
Hi Dan,
Quoted 11 lines
drivers/staging/brcm80211/brcmfmac/dhd_common.c brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name, · line 317
Quoted 9 lines
drivers/staging/brcm80211/brcmfmac/dhd_common.c +2
-2@@ -317,14 +312,16 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name,BRCMF_TRACE (("%s: Enter\n" , __func__)); -ASSERT (name); -ASSERT (len>=0 ); +if (name ==NULL || len<=0 ) +return -EINVAL ;In the original code len == 0 was OK but now we return
-EINVAL.
Agreed, this is non desirable behavior. We did not see a regression in our fullmac driver testing (which, I admit, is fairly limited at this stage). I will create an additional patch to fix this.
Thanks, Roland.
PATCH 8/31 staging: brcm80211: removed asserts from dhd_linux.c
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 33 +----------------------- 1 files changed, 1 insertions(+), 32 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +1 -32
@@ -235,7 +235,6 @@ static int brcmf_net2idx(struct brcmf_info *drvr_priv, struct net_device *net) {int i =0 ; -ASSERT (drvr_priv);while (i <BRCMF_MAX_IFS ) {if (drvr_priv->iflist[i] && (drvr_priv->iflist[i]->net == net))return i;
@@ -249,8 +248,6 @@ int brcmf_ifname2idx(struct brcmf_info *drvr_priv, char *name) {int i =BRCMF_MAX_IFS ; -ASSERT (drvr_priv); -if (name ==NULL || *name =='\0' )return 0 ;
@@ -268,8 +265,6 @@ char *brcmf_ifname(struct brcmf_pub *drvr, int ifidx) {struct brcmf_info *drvr_priv = drvr->info; -ASSERT (drvr_priv); -if (ifidx <0 || ifidx >=BRCMF_MAX_IFS ) {BRCMF_ERROR (("%s: ifidx %d out of range\n" , __func__, ifidx));return "<if_bad>" ;
@@ -297,7 +292,6 @@ static void _brcmf_set_multicast_list(struct brcmf_info *drvr_priv, int ifidx)uint buflen;int ret; -ASSERT (drvr_priv && drvr_priv->iflist[ifidx]); dev = drvr_priv->iflist[ifidx]->net; cnt =netdev_mc_count (dev);
@@ -437,13 +431,12 @@ static int _brcmf_set_mac_address(struct brcmf_info *drvr_priv, int ifidx, u8 *aextern struct net_device *ap_net_dev;#endif +/* Virtual interfaces only ((ifp && ifp->info && ifp->idx == true) */ static void brcmf_op_if (struct brcmf_if *ifp) {struct brcmf_info *drvr_priv;int ret =0 , err =0 ; -ASSERT (ifp && ifp->info && ifp->idx);/* Virtual interfaces only */ - drvr_priv = ifp->info;BRCMF_TRACE (("%s: idx %d, state %d\n" , __func__, ifp->idx, ifp->state));
@@ -509,7 +502,6 @@ static void brcmf_op_if(struct brcmf_if *ifp)break ;default :BRCMF_ERROR (("%s: bad op %d\n" , __func__, ifp->state)); -ASSERT (!ifp->state);break ; }
@@ -601,7 +593,6 @@ static int brcmf_netdev_set_mac_address(struct net_device *dev, void *addr)if (ifidx ==BRCMF_BAD_IF )return -1 ; -ASSERT (drvr_priv->sysioc_tsk);memcpy (&drvr_priv->macvalue, sa->sa_data,ETH_ALEN ); drvr_priv->set_macaddress = true;up (&drvr_priv->sysioc_sem);
@@ -618,7 +609,6 @@ static void brcmf_netdev_set_multicast_list(struct net_device *dev)if (ifidx ==BRCMF_BAD_IF )return ; -ASSERT (drvr_priv->sysioc_tsk); drvr_priv->set_multicast = true;up (&drvr_priv->sysioc_sem); }
@@ -711,7 +701,6 @@ void brcmf_txflowcontrol(struct brcmf_pub *drvr, int ifidx, bool state)BRCMF_TRACE (("%s: Enter\n" , __func__)); drvr->txoff = state; -ASSERT (drvr_priv && drvr_priv->iflist[ifidx]); net = drvr_priv->iflist[ifidx]->net;if (state ==ON )netif_stop_queue (net);
@@ -759,7 +748,6 @@ void brcmf_rx_frame(struct brcmf_pub *drvr, int ifidx, struct sk_buff *skb,if (ifp ==NULL ) ifp = drvr_priv->iflist[0 ]; -ASSERT (ifp); skb->dev = ifp->net; skb->protocol =eth_type_trans (skb, skb->dev);
@@ -778,7 +766,6 @@ void brcmf_rx_frame(struct brcmf_pub *drvr, int ifidx, struct sk_buff *skb,skb_mac_header (skb), &event, &data); -ASSERT (ifidx <BRCMF_MAX_IFS && drvr_priv->iflist[ifidx]);if (drvr_priv->iflist[ifidx] && !drvr_priv->iflist[ifidx]->state) ifp = drvr_priv->iflist[ifidx];
@@ -833,7 +820,6 @@ static struct net_device_stats *brcmf_netdev_get_stats(struct net_device *net)return NULL ; ifp = drvr_priv->iflist[ifidx]; -ASSERT (drvr_priv && ifp);if (drvr_priv->pub.up) {/* Use the protocol to get dongle stats */
@@ -1247,8 +1233,6 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle, char *name,BRCMF_TRACE (("%s: idx %d, handle->%p\n" , __func__, ifidx, handle)); -ASSERT (drvr_priv && (ifidx <BRCMF_MAX_IFS )); - ifp = drvr_priv->iflist[ifidx];if (!ifp) { ifp =kmalloc (sizeof (struct brcmf_if ),GFP_ATOMIC );
@@ -1268,7 +1252,6 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle, char *name,if (handle ==NULL ) { ifp->state =BRCMF_E_IF_ADD ; ifp->idx = ifidx; -ASSERT (drvr_priv->sysioc_tsk);up (&drvr_priv->sysioc_sem); }else ifp->net = (struct net_device *)handle;
@@ -1282,7 +1265,6 @@ void brcmf_del_if(struct brcmf_info *drvr_priv, int ifidx)BRCMF_TRACE (("%s: idx %d\n" , __func__, ifidx)); -ASSERT (drvr_priv && ifidx && (ifidx <BRCMF_MAX_IFS )); ifp = drvr_priv->iflist[ifidx];if (!ifp) {BRCMF_ERROR (("%s: Null interface\n" , __func__));
@@ -1291,7 +1273,6 @@ void brcmf_del_if(struct brcmf_info *drvr_priv, int ifidx) ifp->state =BRCMF_E_IF_DEL ; ifp->idx = ifidx; -ASSERT (drvr_priv->sysioc_tsk);up (&drvr_priv->sysioc_sem); }
@@ -1399,8 +1380,6 @@ int brcmf_bus_start(struct brcmf_pub *drvr)/* Room for "event_msgs" + '\0' + bitvec */ char iovbuf[BRCMF_EVENTING_MASK_LEN +12 ]; -ASSERT (drvr_priv); -BRCMF_TRACE (("%s:\n" , __func__));/* Bring up the bus */
@@ -1475,12 +1454,7 @@ int brcmf_net_attach(struct brcmf_pub *drvr, int ifidx)BRCMF_TRACE (("%s: ifidx %d\n" , __func__, ifidx)); -ASSERT (drvr_priv && drvr_priv->iflist[ifidx]); - net = drvr_priv->iflist[ifidx]->net; -ASSERT (net); - -ASSERT (!net->netdev_ops); net->netdev_ops = &brcmf_netdev_ops_pri;/*
@@ -1557,7 +1531,6 @@ void brcmf_detach(struct brcmf_pub *drvr)brcmf_del_if (drvr_priv, i); ifp = drvr_priv->iflist[0 ]; -ASSERT (ifp);if (ifp->net->netdev_ops == &brcmf_netdev_ops_pri) {brcmf_netdev_stop (ifp->net);unregister_netdev (ifp->net);
@@ -1685,14 +1658,10 @@ static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktd {int bcmerror =0 ; -ASSERT (drvr_priv !=NULL ); - bcmerror =brcmf_c_host_event (drvr_priv, ifidx, pktdata, event, data);if (bcmerror !=0 )return bcmerror; -ASSERT (drvr_priv->iflist[*ifidx] !=NULL ); -ASSERT (drvr_priv->iflist[*ifidx]->net !=NULL );if (drvr_priv->iflist[*ifidx]->net)brcmf_cfg80211_event (drvr_priv->iflist[*ifidx]->net, event, *data);
Signature · 1 line
1.7.4.1
PATCH 9/31 staging: brcm80211: removed asserts from dhd_sdio.c
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 76 +++++++------------------ 1 files changed, 21 insertions(+), 55 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +21 -55
@@ -772,8 +772,6 @@ static bool forcealign;uint datalign; \ datalign = (unsigned long )((_p)->data); \ datalign =roundup (datalign, (_align)) - datalign; \ -ASSERT (datalign < (_align)); \ -ASSERT ((_p)->len >= ((_len) + datalign)); \if (datalign) \skb_pull ((_p), datalign); \__skb_trim ((_p), (_len)); \
@@ -1286,17 +1284,16 @@ static int brcmf_sdbrcm_txpkt(struct brcmf_bus *bus, struct sk_buff *pkt, uint c free_pkt = true; pkt = new; frame = (u8 *) (pkt->data); -ASSERT (((unsigned long )frame %BRCMF_SDALIGN ) ==0 ); +/* precondition: (frame % BRCMF_SDALIGN) == 0) */ pad =0 ; }else {skb_push (pkt, pad); frame = (u8 *) (pkt->data); - -ASSERT ((pad +SDPCM_HDRLEN ) <= (int )(pkt->len)); +/* precondition: pad + SDPCM_HDRLEN <= pkt->len */ memset (frame,0 , pad +SDPCM_HDRLEN ); } } -ASSERT (pad <BRCMF_SDALIGN ); +/* precondition: pad < BRCMF_SDALIGN */ /* Hardware tag: 2 byte len followed by 2 byte ~len check (all LE) */ len = (u16) (pkt->len);
@@ -1344,7 +1341,6 @@ static int brcmf_sdbrcm_txpkt(struct brcmf_bus *bus, struct sk_buff *pkt, uint c ret =brcmf_sdbrcm_send_buf (bus,brcmf_sdcard_cur_sbwad (card),SDIO_FUNC_2 ,F2SYNC , frame, len, pkt,NULL ,NULL ); bus->f2txdata++; -ASSERT (ret != -BCME_PENDING );if (ret <0 ) {/* On failure, abort the command
@@ -1416,7 +1412,7 @@ int brcmf_sdbrcm_bus_txdata(struct brcmf_bus *bus, struct sk_buff *pkt)/* Add space for the header */ skb_push (pkt,SDPCM_HDRLEN ); -ASSERT (IS_ALIGNED ((unsigned long )(pkt->data),2 )); +/* precondition: IS_ALIGNED((unsigned long)(pkt->data), 2) */ prec =PRIO2PREC ((pkt->priority &PRIOMASK ));
@@ -1580,7 +1576,7 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen) msglen += doff;memset (frame,0 , doff +SDPCM_HDRLEN ); } -ASSERT (doff <BRCMF_SDALIGN ); +/* precondition: doff < BRCMF_SDALIGN */ } doff +=SDPCM_HDRLEN ;
@@ -1597,7 +1593,7 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen)if (forcealign && (len & (ALIGNMENT -1 ))) len =roundup (len,ALIGNMENT ); -ASSERT (IS_ALIGNED ((unsigned long )frame,2 )); +/* precondition: IS_ALIGNED((unsigned long)frame, 2) */ /* Need to lock here to protect txseq and SDIO tx calls */ brcmf_sdbrcm_sdlock (bus);
@@ -1660,8 +1656,6 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen)brcmf_sdcard_cur_sbwad (card),SDIO_FUNC_2 , F2SYNC, frame, len, NULL, NULL, NULL); -ASSERT (ret != -BCME_PENDING ); -if (ret <0 ) {/* On failure, abort the command and terminate the frame */
@@ -2559,8 +2553,6 @@ brcmf_sdbrcm_doiovar(struct brcmf_bus *bus, const struct brcmu_iovar *vi, u32 acbool set = (actionid ==IOV_SVAL (IOV_MEMBYTES )); -ASSERT (plen >=2 *sizeof (int )); - address = (u32 ) int_val;memcpy (&int_val, (char *)params +sizeof (int_val),sizeof (int_val));
@@ -3037,14 +3029,16 @@ brcmf_sdbrcm_bus_iovar_op(struct brcmf_pub *drvr, const char *name,BRCMF_TRACE (("%s: Enter\n" , __func__)); -ASSERT (name); -ASSERT (len >=0 ); +if (name ==NULL || len <=0 ) +return -EINVAL ; -/* Get MUST have return space */ -ASSERT (set || (arg && len)); +/* Set does not take qualifiers */ +if (set && (params || plen)) +return -EINVAL ; -/* Set does NOT take qualifiers */ -ASSERT (!set || (!params && !plen)); +/* Get must have return space;*/ +if (!set && !(arg && len)) +return -EINVAL ;/* Look up var locally; if not found pass to host driver */ vi =brcmu_iovar_lookup (brcmf_sdio_iovars, name);
@@ -3219,7 +3213,6 @@ int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr, bool enforce_mutex)return -1 ; } -ASSERT (bus->drvr);if (!bus->drvr)return 0 ;
@@ -3408,7 +3401,6 @@ brcmf_sdbrcm_read_control(struct brcmf_bus *bus, u8 *hdr, uint len, uint doff)if ((bus->bus ==SPI_BUS ) && (!bus->usebufpool)) goto gotpkt; -ASSERT (bus->rxbuf);/* Set rxctl for frame (w/optional alignment) */ bus->rxctl = bus->rxbuf;if (brcmf_alignctl) {
@@ -3418,7 +3410,6 @@ brcmf_sdbrcm_read_control(struct brcmf_bus *bus, u8 *hdr, uint len, uint doff) bus->rxctl += (BRCMF_SDALIGN - pad); bus->rxctl -= firstread; } -ASSERT (bus->rxctl >= bus->rxbuf);/* Copy the already-read portion over */ memcpy (bus->rxctl, hdr, firstread);
@@ -3471,7 +3462,6 @@ brcmf_sdbrcm_read_control(struct brcmf_bus *bus, u8 *hdr, uint len, uint doff)F2SYNC , (bus->rxctl + firstread), rdlen, NULL, NULL, NULL); bus->f2rxdata++; -ASSERT (sdret != -BCME_PENDING );/* Control frame failures need retransmission */ if (sdret <0 ) {
@@ -3569,12 +3559,9 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) num, sublen));break ; } -ASSERT (!(pnext->prev));if (!pfirst) { -ASSERT (!plast); pfirst = plast = pnext; }else { -ASSERT (plast); plast->next = pnext; plast = pnext; }
@@ -3659,7 +3646,6 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) errcode =-1 ; } bus->f2rxdata++; -ASSERT (errcode != -BCME_PENDING );/* On failure, kill the superframe, allow a couple retries */ if (errcode <0 ) {
@@ -3833,8 +3819,8 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) __func__, num, pfirst, pfirst->data, pfirst->len, sublen, chan, seq)); -ASSERT ((chan ==SDPCM_DATA_CHANNEL ) - || (chan ==SDPCM_EVENT_CHANNEL )); +/* precondition: chan == SDPCM_DATA_CHANNEL || +chan == SDPCM_EVENT_CHANNEL */ if (rxseq != seq) { BRCMF_GLOM(("%s: rx_seq %d, expected %d\n",
@@ -3858,7 +3844,6 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq)if (plast) { plast->next = pnext; }else { -ASSERT (save_pfirst == pfirst); save_pfirst = pnext; }continue ;
@@ -3871,7 +3856,6 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq)if (plast) { plast->next = pnext; }else { -ASSERT (save_pfirst == pfirst); save_pfirst = pnext; }continue ;
@@ -3937,8 +3921,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)BRCMF_TRACE (("%s: Enter\n" , __func__)); -ASSERT (maxframes); -#ifdef SDTEST /* Allow pktgen to override maxframes */ if (bus->pktgen_count && (bus->pktgen_mode ==BRCMF_PKTGEN_RECV )) {
@@ -4018,7 +4000,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished) (BRCMF_SDALIGN - pad); bus->rxctl -= firstread; } -ASSERT (bus->rxctl >= bus->rxbuf); rxbuf = bus->rxctl;/* Read the entire frame */ sdret = brcmf_sdcard_recv_buf(card,
@@ -4027,7 +4008,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished) rxbuf, rdlen, NULL, NULL, NULL); bus->f2rxdata++; -ASSERT (sdret != -BCME_PENDING );/* Control frame failures need retransmission */
@@ -4060,7 +4040,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)if (bus->bus ==SPI_BUS ) bus->usebufpool = true; -ASSERT (!(pkt->prev));PKTALIGN (pkt, rdlen,BRCMF_SDALIGN ); rxbuf = (u8 *) (pkt->data);/* Read the entire frame */
@@ -4070,7 +4049,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished) rxbuf, rdlen, pkt, NULL, NULL); bus->f2rxdata++; -ASSERT (sdret != -BCME_PENDING );if (sdret <0 ) { BRCMF_ERROR(("%s (nextlen): read %d"
@@ -4254,7 +4232,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)SDIO_FUNC_2 ,F2SYNC , bus->rxhdr, firstread, NULL, NULL, NULL); bus->f2rxhdrs++; -ASSERT (sdret != -BCME_PENDING );if (sdret <0 ) { BRCMF_ERROR(("%s: RXHEADER FAILED: %d\n", __func__,
@@ -4309,7 +4286,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)" min %d seq %d\n" , __func__, doff, len, SDPCM_HDRLEN, seq)); bus->rx_badhdr++; -ASSERT (0 );brcmf_sdbrcm_rxfail (bus, false, false);continue ; }
@@ -4360,10 +4336,9 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)continue ; } -ASSERT ((chan ==SDPCM_DATA_CHANNEL ) - || (chan ==SDPCM_EVENT_CHANNEL ) - || (chan ==SDPCM_TEST_CHANNEL ) - || (chan ==SDPCM_GLOM_CHANNEL )); +/* precondition: chan is either SDPCM_DATA_CHANNEL, +SDPCM_EVENT_CHANNEL, SDPCM_TEST_CHANNEL or +SDPCM_GLOM_CHANNEL */ /* Length to read */ rdlen = (len > firstread) ? (len - firstread) :0 ;
@@ -4404,10 +4379,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)continue ; } -ASSERT (!(pkt->prev)); -/* Leave room for what we already read, and align remainder */ -ASSERT (firstread < pkt->len);skb_pull (pkt, firstread);PKTALIGN (pkt, rdlen,BRCMF_SDALIGN );
@@ -4417,7 +4389,6 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)SDIO_FUNC_2 ,F2SYNC , ((u8 *) (pkt->data)), rdlen, pkt, NULL, NULL); bus->f2rxdata++; -ASSERT (sdret != -BCME_PENDING );if (sdret <0 ) { BRCMF_ERROR(("%s: read %d %s bytes failed: %d\n",
@@ -4458,7 +4429,6 @@ deliver: }#endif __skb_trim (pkt, len); -ASSERT (doff ==SDPCM_HDRLEN );skb_pull (pkt,SDPCM_HDRLEN ); bus->glomd = pkt; }else {
@@ -4621,8 +4591,6 @@ static bool brcmf_sdbrcm_dpc(struct brcmf_bus *bus)BRCMF_ERROR (("%s: error reading DEVCTL: %d\n" , __func__, err)); bus->drvr->busstate = BRCMF_BUS_DOWN; - }else { -ASSERT (devctl &SBSDIO_DEVCTL_CA_INT_ONLY ); }#endif /* BCMDBG */
@@ -4768,7 +4736,6 @@ clkwait: ret =brcmf_sdbrcm_send_buf (bus,brcmf_sdcard_cur_sbwad (card),SDIO_FUNC_2 ,F2SYNC , (u8 *) bus->ctrl_frame_buf, (u32 ) bus->ctrl_frame_len,NULL ,NULL ,NULL ); -ASSERT (ret != -BCME_PENDING );if (ret <0 ) {/* On failure, abort the command and
@@ -5364,8 +5331,8 @@ static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,BRCMF_TRACE (("%s: Enter\n" , __func__));BRCMF_INFO (("%s: venid 0x%04x devid 0x%04x\n" , __func__, venid, devid)); -/* We make assumptions about address window mappings */ -ASSERT (regsva ==SI_ENUM_BASE ); +/* We make an assumption about address window mappings: +* regsva == SI_ENUM_BASE*/ /* SDIO car passes venid and devid based on CIS parsing -- but * low-power start
@@ -5803,7 +5770,6 @@ static void brcmf_sdbrcm_disconnect(void *ptr)BRCMF_TRACE (("%s: Enter\n" , __func__));if (bus) { -ASSERT (bus->drvr);brcmf_sdbrcm_release (bus); }
Signature · 1 line
1.7.4.1
PATCH 10/31 staging: brcm80211: removed remains of assert mechanism in fullmac
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/dhd.h | 9 ---- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 50 ------------------------ 2 files changed, 0 insertions(+), 59 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd.h +0 -9
@@ -703,7 +703,6 @@ extern uint brcmf_pktgen_len;#define BRCMF_MAX_PKTGEN_LEN 1800#endif -extern u32 g_assert_type;extern const struct bcmevent_name bcmevent_names[];extern const int bcmevent_names_size;
@@ -815,14 +814,6 @@ extern void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg);extern void brcmf_c_pktfilter_offload_enable (struct brcmf_pub *drvr,char *arg,int enable,int master_mode); -#ifdef BCMDBG -#define ASSERT (exp) \ - do { if (!(exp)) osl_assert(#exp, __FILE__, __LINE__); } while (0) -extern void osl_assert (char *exp,char *file,int line); -#else -#define ASSERT (exp) do {} while (0) -#endif /* defined(BCMDBG) */ -/* Linux network driver ioctl encoding */ struct brcmf_c_ioctl {uint cmd;/* common ioctl definition */
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +0 -50
59 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 11/31 staging: brcm80211: replaced various typedefs in softmac
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
typedefs are undesirable according to documentation/CodingStyle.
--- drivers/staging/brcm80211/brcmsmac/aiutils.c | 134 +++++----- drivers/staging/brcm80211/brcmsmac/aiutils.h | 2 +- drivers/staging/brcm80211/brcmsmac/alloc.c | 30 +- drivers/staging/brcm80211/brcmsmac/ampdu.c | 73 +++--- drivers/staging/brcm80211/brcmsmac/ampdu.h | 2 +- drivers/staging/brcm80211/brcmsmac/antsel.c | 8 +- drivers/staging/brcm80211/brcmsmac/bmac.c | 20 +- drivers/staging/brcm80211/brcmsmac/bmac.h | 2 +- drivers/staging/brcm80211/brcmsmac/channel.c | 205 +++++++------- drivers/staging/brcm80211/brcmsmac/channel.h | 15 +- drivers/staging/brcm80211/brcmsmac/d11.h | 6 +- drivers/staging/brcm80211/brcmsmac/dma.c | 300 ++++++++++---------- drivers/staging/brcm80211/brcmsmac/dma.h | 8 +- drivers/staging/brcm80211/brcmsmac/mac80211_if.h | 2 +- drivers/staging/brcm80211/brcmsmac/main.c | 117 ++++---- drivers/staging/brcm80211/brcmsmac/main.h | 61 +++-- drivers/staging/brcm80211/brcmsmac/nicpci.c | 103 ++++---- drivers/staging/brcm80211/brcmsmac/otp.c | 45 ++-- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 32 +- drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h | 6 +- drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | 85 +++--- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 239 ++++++++-------- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h | 2 +- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 293 ++++++++++---------- .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.c | 29 +- .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.h | 28 +- drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.c | 18 +- drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h | 8 +- drivers/staging/brcm80211/brcmsmac/phy_shim.c | 68 +++--- drivers/staging/brcm80211/brcmsmac/phy_shim.h | 64 ++-- drivers/staging/brcm80211/brcmsmac/pub.h | 21 +- drivers/staging/brcm80211/brcmsmac/rate.c | 24 +- drivers/staging/brcm80211/brcmsmac/rate.h | 58 ++-- drivers/staging/brcm80211/brcmsmac/scb.h | 5 +- drivers/staging/brcm80211/brcmsmac/srom.c | 26 +- drivers/staging/brcm80211/brcmsmac/types.h | 87 +----- 36 files changed, 1110 insertions(+), 1116 deletions(-)
drivers/staging/brcm80211/brcmsmac/aiutils.c +67 -67
@@ -239,7 +239,7 @@/* resetctrl */ #define AIRC_RESET 1 -typedef volatile struct _aidmp { +struct aidmp {u32 oobselina30;/* 0x000 */ u32 oobselina74;/* 0x004 */ u32 PAD[6 ];
@@ -355,7 +355,7 @@ typedef volatile struct _aidmp {u32 componentid1;/* 0xff4 */ u32 componentid2;/* 0xff8 */ u32 componentid3;/* 0xffc */ -} aidmp_t; +};/* EROM parsing */
@@ -429,14 +429,14 @@ get_asd(struct si_pub *sih, u32 **eromptr, uint sp, uint ad, uint st,return asd; } -static void ai_hwfixup (si_info_t *sii) +static void ai_hwfixup (struct si_info *sii) { }/* parse the enumeration rom to identify all cores */ void ai_scan (struct si_pub *sih,void *regs) { -si_info_t *sii =SI_INFO (sih); +struct si_info *sii =SI_INFO (sih);chipcregs_t *cc = (chipcregs_t *) regs;u32 erombase, *eromptr, *eromlim;
@@ -639,7 +639,7 @@ void ai_scan(struct si_pub *sih, void *regs)*/ void *ai_setcoreidx (struct si_pub *sih,uint coreidx) { -si_info_t *sii =SI_INFO (sih); +struct si_info *sii =SI_INFO (sih);u32 addr = sii->coresba[coreidx];u32 wrap = sii->wrapba[coreidx];void *regs;
@@ -694,7 +694,7 @@ int ai_numaddrspaces(struct si_pub *sih)/* Return the address of the nth address space in the current core */ u32 ai_addrspace (struct si_pub *sih,uint asidx) { -si_info_t *sii; +struct si_info *sii;uint cidx; sii =SI_INFO (sih);
@@ -713,7 +713,7 @@ u32 ai_addrspace(struct si_pub *sih, uint asidx)/* Return the size of the nth address space in the current core */ u32 ai_addrspacesize (struct si_pub *sih,uint asidx) { -si_info_t *sii; +struct si_info *sii;uint cidx; sii =SI_INFO (sih);
@@ -731,8 +731,8 @@ u32 ai_addrspacesize(struct si_pub *sih, uint asidx)uint ai_flag (struct si_pub *sih) { -si_info_t *sii; -aidmp_t *ai; +struct si_info *sii; +struct aidmp *ai; sii =SI_INFO (sih);if (BCM47162_DMP ()) {
@@ -750,7 +750,7 @@ void ai_setint(struct si_pub *sih, int siflag)uint ai_corevendor (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii;u32 cia; sii =SI_INFO (sih);
@@ -760,7 +760,7 @@ uint ai_corevendor(struct si_pub *sih)uint ai_corerev (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii;u32 cib; sii =SI_INFO (sih);
@@ -770,8 +770,8 @@ uint ai_corerev(struct si_pub *sih)bool ai_iscoreup (struct si_pub *sih) { -si_info_t *sii; -aidmp_t *ai; +struct si_info *sii; +struct aidmp *ai; sii =SI_INFO (sih); ai = sii->curwrap;
@@ -783,8 +783,8 @@ bool ai_iscoreup(struct si_pub *sih)void ai_core_cflags_wo (struct si_pub *sih,u32 mask,u32 val) { -si_info_t *sii; -aidmp_t *ai; +struct si_info *sii; +struct aidmp *ai;u32 w; sii =SI_INFO (sih);
@@ -805,8 +805,8 @@ void ai_core_cflags_wo(struct si_pub *sih, u32 mask, u32 val)u32 ai_core_cflags (struct si_pub *sih,u32 mask,u32 val) { -si_info_t *sii; -aidmp_t *ai; +struct si_info *sii; +struct aidmp *ai;u32 w; sii =SI_INFO (sih);
@@ -828,8 +828,8 @@ u32 ai_core_cflags(struct si_pub *sih, u32 mask, u32 val)u32 ai_core_sflags (struct si_pub *sih,u32 mask,u32 val) { -si_info_t *sii; -aidmp_t *ai; +struct si_info *sii; +struct aidmp *ai;u32 w; sii =SI_INFO (sih);
@@ -850,19 +850,19 @@ u32 ai_core_sflags(struct si_pub *sih, u32 mask, u32 val)/* *************** from siutils.c ************** */ /* local prototypes */ -static si_info_t *ai_doattach (si_info_t *sii,void *regs, +static struct si_info *ai_doattach (struct si_info *sii,void *regs,uint bustype,void *sdh,char **vars,uint *varsz); -static bool ai_buscore_prep (si_info_t *sii,uint bustype); -static bool ai_buscore_setup (si_info_t *sii,chipcregs_t *cc,uint bustype, +static bool ai_buscore_prep (struct si_info *sii,uint bustype); +static bool ai_buscore_setup (struct si_info *sii,chipcregs_t *cc,uint bustype,u32 savewin,uint *origidx,void *regs); -static void ai_nvram_process (si_info_t *sii,char *pvars); +static void ai_nvram_process (struct si_info *sii,char *pvars);/* dev path concatenation util */ static char *ai_devpathvar (struct si_pub *sih,char *var,int len,const char *name); -static bool _ai_clkctl_cc (si_info_t *sii,uint mode); -static bool ai_ispcie (si_info_t *sii); +static bool _ai_clkctl_cc (struct si_info *sii,uint mode); +static bool ai_ispcie (struct si_info *sii);/* global variable to indicate reservation/release of gpio's */ static u32 ai_gpioreservation;
@@ -879,10 +879,10 @@ static u32 ai_gpioreservation;struct si_pub *ai_attach (void *regs,uint bustype,void *sdh,char **vars,uint *varsz) { -si_info_t *sii; +struct si_info *sii; -/* alloc si_info_t */ - sii =kmalloc (sizeof (si_info_t),GFP_ATOMIC ); +/* alloc struct si_info */ + sii =kmalloc (sizeof (struct si_info ),GFP_ATOMIC );if (sii ==NULL ) {SI_ERROR (("si_attach: malloc failed!\n" ));return NULL ;
@@ -900,9 +900,9 @@ struct si_pub *ai_attach(void *regs, uint bustype, }/* global kernel resource */ -static si_info_t ksii; +static struct si_info ksii; -static bool ai_buscore_prep (si_info_t *sii,uint bustype) +static bool ai_buscore_prep (struct si_info *sii,uint bustype) {/* kludge to enable the clock on the 4306 which lacks a slowclock */ if (bustype ==PCI_BUS && !ai_ispcie (sii))
@@ -910,7 +910,7 @@ static bool ai_buscore_prep(si_info_t *sii, uint bustype)return true; } -static bool ai_buscore_setup (si_info_t *sii,chipcregs_t *cc,uint bustype, +static bool ai_buscore_setup (struct si_info *sii,chipcregs_t *cc,uint bustype,u32 savewin,uint *origidx,void *regs) {bool pci, pcie;
@@ -1019,7 +1019,7 @@ static bool ai_buscore_setup(si_info_t *sii, chipcregs_t *cc, uint bustype,return true; } -static __used void ai_nvram_process (si_info_t *sii,char *pvars) +static __used void ai_nvram_process (struct si_info *sii,char *pvars) {uint w =0 ;
@@ -1068,7 +1068,7 @@ static __used void ai_nvram_process(si_info_t *sii, char *pvars) sii->pub.boardflags =getintvar (pvars,"boardflags" ); } -static si_info_t *ai_doattach (si_info_t *sii, +static struct si_info *ai_doattach (struct si_info *sii,void *regs,uint bustype,void *pbus,char **vars,uint *varsz) {
@@ -1079,7 +1079,7 @@ static si_info_t *ai_doattach(si_info_t *sii,uint socitype;uint origidx; -memset ((unsigned char *) sii,0 ,sizeof (si_info_t)); +memset ((unsigned char *) sii,0 ,sizeof (struct si_info )); savewin =0 ;
@@ -1241,7 +1241,7 @@ static si_info_t *ai_doattach(si_info_t *sii,/* may be called with core in reset */ void ai_detach (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii;uint idx;struct si_pub *si_local =NULL ;
@@ -1275,7 +1275,7 @@ ai_register_intr_callback(struct si_pub *sih, void *intrsoff_fn,void *intrsrestore_fn, void *intrsenabled_fn, void *intr_arg) { - si_info_t *sii; + struct si_info *sii; sii =SI_INFO (sih); sii->intr_arg = intr_arg;
@@ -1290,7 +1290,7 @@ ai_register_intr_callback(struct si_pub *sih, void *intrsoff_fn,void ai_deregister_intr_callback (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih); sii->intrsoff_fn =NULL ;
@@ -1298,7 +1298,7 @@ void ai_deregister_intr_callback(struct si_pub *sih)uint ai_coreid (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);return sii->coreid[sii->curidx];
@@ -1306,7 +1306,7 @@ uint ai_coreid(struct si_pub *sih)uint ai_coreidx (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);return sii->curidx;
@@ -1320,7 +1320,7 @@ bool ai_backplane64(struct si_pub *sih)/* return index of coreid or BADIDX if not found */ uint ai_findcoreidx (struct si_pub *sih,uint coreid,uint coreunit) { -si_info_t *sii; +struct si_info *sii;uint found;uint i;
@@ -1360,7 +1360,7 @@ void *ai_switch_core(struct si_pub *sih, uint coreid, uint *origidx, uint *intr_val) {void *cc; -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -1384,7 +1384,7 @@ void *ai_switch_core(struct si_pub *sih, uint coreid, uint *origidx,/* restore coreidx and restore interrupt */ void ai_restore_core (struct si_pub *sih,uint coreid,uint intr_val) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih); if (SI_FAST(sii)
@@ -1397,7 +1397,7 @@ void ai_restore_core(struct si_pub *sih, uint coreid, uint intr_val)void ai_write_wrapperreg (struct si_pub *sih,u32 offset,u32 val) { -si_info_t *sii =SI_INFO (sih); +struct si_info *sii =SI_INFO (sih);u32 *w = (u32 *) sii->curwrap;W_REG (w + (offset /4 ), val);return ;
@@ -1421,7 +1421,7 @@ uint ai_corereg(struct si_pub *sih, uint coreidx, uint regoff, uint mask,uint w;uint intr_val =0 ;bool fast = false; -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -1500,9 +1500,9 @@ uint ai_corereg(struct si_pub *sih, uint coreidx, uint regoff, uint mask,void ai_core_disable (struct si_pub *sih,u32 bits) { -si_info_t *sii; +struct si_info *sii;u32 dummy; -aidmp_t *ai; +struct aidmp *ai; sii =SI_INFO (sih);
@@ -1527,8 +1527,8 @@ void ai_core_disable(struct si_pub *sih, u32 bits)*/ void ai_core_reset (struct si_pub *sih,u32 bits,u32 resetbits) { -si_info_t *sii; -aidmp_t *ai; +struct si_info *sii; +struct aidmp *ai;u32 dummy; sii =SI_INFO (sih);
@@ -1554,7 +1554,7 @@ void ai_core_reset(struct si_pub *sih, u32 bits, u32 resetbits) }/* return the slow clock source - LPO, XTAL, or PCI */ -static uint ai_slowclk_src (si_info_t *sii) +static uint ai_slowclk_src (struct si_info *sii) {chipcregs_t *cc;u32 val;
@@ -1578,7 +1578,7 @@ static uint ai_slowclk_src(si_info_t *sii)* return the ILP (slowclock) min or max frequency * precondition: we've established the chip has dynamic clk control */ -static uint ai_slowclk_freq (si_info_t *sii,bool max_freq,chipcregs_t *cc) +static uint ai_slowclk_freq (struct si_info *sii,bool max_freq,chipcregs_t *cc) {u32 slowclk;uint div;
@@ -1612,7 +1612,7 @@ static uint ai_slowclk_freq(si_info_t *sii, bool max_freq, chipcregs_t *cc)return 0 ; } -static void ai_clkctl_setdelay (si_info_t *sii,void *chipcregs) +static void ai_clkctl_setdelay (struct si_info *sii,void *chipcregs) {chipcregs_t *cc = (chipcregs_t *) chipcregs;uint slowmaxfreq, pll_delay, slowclk;
@@ -1644,7 +1644,7 @@ static void ai_clkctl_setdelay(si_info_t *sii, void *chipcregs)/* initialize power control delay registers */ void ai_clkctl_init (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii;uint origidx =0 ;chipcregs_t *cc;bool fast;
@@ -1682,7 +1682,7 @@ void ai_clkctl_init(struct si_pub *sih)*/ u16 ai_clkctl_fast_pwrup_delay (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii;uint origidx =0 ;chipcregs_t *cc;uint slowminfreq;
@@ -1730,7 +1730,7 @@ u16 ai_clkctl_fast_pwrup_delay(struct si_pub *sih)/* turn primary xtal and/or pll off/on */ int ai_clkctl_xtal (struct si_pub *sih,uint what,bool on) { -si_info_t *sii; +struct si_info *sii;u32 in, out, outen; sii =SI_INFO (sih);
@@ -1807,7 +1807,7 @@ int ai_clkctl_xtal(struct si_pub *sih, uint what, bool on)*/ bool ai_clkctl_cc (struct si_pub *sih,uint mode) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -1822,7 +1822,7 @@ bool ai_clkctl_cc(struct si_pub *sih, uint mode) }/* clk control mechanism through chipcommon, no policy checking */ -static bool _ai_clkctl_cc (si_info_t *sii,uint mode) +static bool _ai_clkctl_cc (struct si_info *sii,uint mode) {uint origidx =0 ;chipcregs_t *cc;
@@ -2001,7 +2001,7 @@ static char *ai_devpathvar(struct si_pub *sih, char *var, int len, }/* return true if PCIE capability exists in the pci config space */ -static bool ai_ispcie (si_info_t *sii) +static bool ai_ispcie (struct si_info *sii) {u8 cap_ptr;
@@ -2019,7 +2019,7 @@ static bool ai_ispcie(si_info_t *sii)bool ai_pci_war16165 (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -2028,7 +2028,7 @@ bool ai_pci_war16165(struct si_pub *sih)void ai_pci_up (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -2047,7 +2047,7 @@ void ai_pci_up(struct si_pub *sih)/* Unconfigure and/or apply various WARs when system is going to sleep mode */ void ai_pci_sleep (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -2057,7 +2057,7 @@ void ai_pci_sleep(struct si_pub *sih)/* Unconfigure and/or apply various WARs when going down */ void ai_pci_down (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -2078,7 +2078,7 @@ void ai_pci_down(struct si_pub *sih)*/ void ai_pci_setup (struct si_pub *sih,uint coremask) { -si_info_t *sii; +struct si_info *sii;void *regs =NULL ;u32 siflag =0 , w;uint idx =0 ;
@@ -2130,7 +2130,7 @@ int ai_pci_fixcfg(struct si_pub *sih)uint origidx;void *regs =NULL ; -si_info_t *sii =SI_INFO (sih); +struct si_info *sii =SI_INFO (sih);/* Fixup PI in SROM shadow area to enable the correct PCI core access */ /* save the current index */
@@ -2170,7 +2170,7 @@ u32 ai_gpiocontrol(struct si_pub *sih, u32 mask, u32 val, u8 priority)void ai_chipcontrl_epa4331 (struct si_pub *sih,bool on) { -si_info_t *sii; +struct si_info *sii;chipcregs_t *cc;uint origidx;u32 val;
@@ -2204,7 +2204,7 @@ void ai_chipcontrl_epa4331(struct si_pub *sih, bool on)/* Enable BT-COEX & Ex-PA for 4313 */ void ai_epa_4313war (struct si_pub *sih) { -si_info_t *sii; +struct si_info *sii;chipcregs_t *cc;uint origidx;
@@ -2224,7 +2224,7 @@ void ai_epa_4313war(struct si_pub *sih)bool ai_deviceremoved (struct si_pub *sih) {u32 w; -si_info_t *sii; +struct si_info *sii; sii =SI_INFO (sih);
@@ -2241,7 +2241,7 @@ bool ai_deviceremoved(struct si_pub *sih)bool ai_is_sprom_available (struct si_pub *sih) {if (sih->ccrev >=31 ) { -si_info_t *sii; +struct si_info *sii;uint origidx;chipcregs_t *cc;u32 sromctrl;
drivers/staging/brcm80211/brcmsmac/aiutils.h +1 -1
@@ -278,7 +278,7 @@#define BCM5357_CHIP_ID 0x5357/* 5357 chipcommon chipid */ -#define SI_INFO (sih) ((si_info_t *)sih) +#define SI_INFO (sih) ((struct si_info *)sih)#define GOODCOREADDR (x, b) \ (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \
drivers/staging/brcm80211/brcmsmac/alloc.c +15 -15
@@ -22,12 +22,12 @@static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc (uint unit);static void brcms_c_bsscfg_mfree (struct brcms_c_bsscfg *cfg); -static struct wlc_pub *brcms_c_pub_malloc (uint unit, +static struct brcms_pub *brcms_c_pub_malloc (uint unit,uint *err,uint devid); -static void brcms_c_pub_mfree (struct wlc_pub *pub); -static void brcms_c_tunables_init (wlc_tunables_t *tunables,uint devid); +static void brcms_c_pub_mfree (struct brcms_pub *pub); +static void brcms_c_tunables_init (struct brcms_tunables *tunables,uint devid); -static void brcms_c_tunables_init (wlc_tunables_t *tunables,uint devid) +static void brcms_c_tunables_init (struct brcms_tunables *tunables,uint devid) { tunables->ntxd =NTXD ; tunables->nrxd =NRXD ;
@@ -45,17 +45,17 @@ static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid) tunables->txsbnd =TXSBND ; } -static struct wlc_pub *brcms_c_pub_malloc (uint unit,uint *err,uint devid) +static struct brcms_pub *brcms_c_pub_malloc (uint unit,uint *err,uint devid) { -struct wlc_pub *pub; +struct brcms_pub *pub; - pub =kzalloc (sizeof (struct wlc_pub ),GFP_ATOMIC ); + pub =kzalloc (sizeof (struct brcms_pub ),GFP_ATOMIC );if (pub ==NULL ) { *err =1001 ; goto fail; } - pub->tunables =kzalloc (sizeof (wlc_tunables_t),GFP_ATOMIC ); + pub->tunables =kzalloc (sizeof (struct brcms_tunables ),GFP_ATOMIC );if (pub->tunables ==NULL ) { *err =1028 ; goto fail;
@@ -77,7 +77,7 @@ static struct wlc_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid)return NULL ; } -static void brcms_c_pub_mfree (struct wlc_pub *pub) +static void brcms_c_pub_mfree (struct brcms_pub *pub) {if (pub ==NULL )return ;
@@ -95,7 +95,7 @@ static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit)if (cfg ==NULL ) goto fail; - cfg->current_bss =kzalloc (sizeof (wlc_bss_info_t),GFP_ATOMIC ); + cfg->current_bss =kzalloc (sizeof (struct brcms_bss_info ),GFP_ATOMIC );if (cfg->current_bss ==NULL ) goto fail;
@@ -175,7 +175,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) goto fail; } - wlc->default_bss =kzalloc (sizeof (wlc_bss_info_t),GFP_ATOMIC ); + wlc->default_bss =kzalloc (sizeof (struct brcms_bss_info ),GFP_ATOMIC );if (wlc->default_bss ==NULL ) { *err =1010 ; goto fail;
@@ -189,16 +189,16 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)brcms_c_bsscfg_ID_assign (wlc, wlc->cfg); wlc->wsec_def_keys[0 ] = -kzalloc (sizeof (wsec_key_t) *WLC_DEFAULT_KEYS ,GFP_ATOMIC ); +kzalloc (sizeof (struct wsec_key ) *WLC_DEFAULT_KEYS ,GFP_ATOMIC );if (wlc->wsec_def_keys[0 ] ==NULL ) { *err =1015 ; goto fail; }else {int i;for (i =1 ; i <WLC_DEFAULT_KEYS ; i++) { - wlc->wsec_def_keys[i] = (wsec_key_t *) + wlc->wsec_def_keys[i] = (struct wsec_key *) ((unsigned long )wlc->wsec_def_keys[0 ] + - (sizeof (wsec_key_t) * i)); + (sizeof (struct wsec_key ) * i)); } }
@@ -237,7 +237,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) } wlc->corestate->macstat_snapshot = -kzalloc (sizeof (macstat_t),GFP_ATOMIC ); +kzalloc (sizeof (struct macstat ),GFP_ATOMIC );if (wlc->corestate->macstat_snapshot ==NULL ) { *err =1027 ; goto fail;
drivers/staging/brcm80211/brcmsmac/ampdu.c +38 -35
209 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/ampdu.h +1 -1
@@ -23,7 +23,7 @@ extern int brcms_c_sendampdu(struct ampdu_info *ampdu,struct brcms_c_txq_info *qi, struct sk_buff **aggp, int prec);extern void brcms_c_ampdu_dotxstatus (struct ampdu_info *ampdu,struct scb *scb, -struct sk_buff *p,tx_status_t *txs); +struct sk_buff *p,struct tx_status *txs);extern void brcms_c_ampdu_macaddr_upd (struct brcms_c_info *wlc);extern void brcms_c_ampdu_shm_upd (struct ampdu_info *ampdu);
drivers/staging/brcm80211/brcmsmac/antsel.c +4 -4
@@ -51,11 +51,11 @@/* static functions */ static int brcms_c_antsel_cfgupd (struct antsel_info *asi, -wlc_antselcfg_t *antsel); +struct brcms_antselcfg *antsel);static u8 brcms_c_antsel_id2antcfg (struct antsel_info *asi,u8 id);static u16 brcms_c_antsel_antcfg2antsel (struct antsel_info *asi,u8 ant_cfg);static void brcms_c_antsel_init_cfg (struct antsel_info *asi, -wlc_antselcfg_t *antsel, +struct brcms_antselcfg *antsel,bool auto_sel);const u16 mimo_2x4_div_antselpat_tbl[] = {
@@ -160,7 +160,7 @@ void brcms_c_antsel_init(struct antsel_info *asi)/* boardlevel antenna selection: init antenna selection structure */ static void -brcms_c_antsel_init_cfg (struct antsel_info *asi,wlc_antselcfg_t *antsel, +brcms_c_antsel_init_cfg (struct antsel_info *asi,struct brcms_antselcfg *antsel,bool auto_sel) {if (asi->antsel_type == ANTSEL_2x3) {
@@ -282,7 +282,7 @@ static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)/* boardlevel antenna selection: ucode interface control */ static int brcms_c_antsel_cfgupd (struct antsel_info *asi, -wlc_antselcfg_t *antsel) +struct brcms_antselcfg *antsel) {struct brcms_c_info *wlc = asi->wlc;u8 ant_cfg;
drivers/staging/brcm80211/brcmsmac/bmac.c +11 -9
@@ -83,8 +83,8 @@ static void brcms_ucode_download(struct brcms_c_hw_info *wlc);static void brcms_c_ucode_txant_set (struct brcms_c_hw_info *wlc_hw);/* used by brcms_c_dpc() */ -static bool brcms_b_dotxstatus (struct brcms_c_hw_info *wlc,tx_status_t *txs, -u32 s2); +static bool brcms_b_dotxstatus (struct brcms_c_hw_info *wlc, +struct tx_status *txs,u32 s2);static bool brcms_b_txstatus (struct brcms_c_hw_info *wlc,bool bound,bool *fatal);static bool brcms_b_recv (struct brcms_c_hw_info *wlc_hw,uint fifo,bool bound);
@@ -246,7 +246,7 @@ brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound)struct sk_buff *tail =NULL ;uint n =0 ;uint bound_limit = bound ? wlc_hw->wlc->pub->tunables->rxbnd :-1 ; -wlc_d11rxhdr_t *wlc_rxhdr =NULL ; +struct brcms_d11rxhdr *wlc_rxhdr =NULL ;BCMMSG (wlc_hw->wlc->wiphy,"wl%d\n" , wlc_hw->unit);/* gather received frames */
@@ -272,7 +272,7 @@ brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound) head = head->prev; p->prev =NULL ; - wlc_rxhdr = (wlc_d11rxhdr_t *) p->data; + wlc_rxhdr = (struct brcms_d11rxhdr *) p->data;/* compute the RSSI from d11rxhdr and record it in wlc_rxd11hr */ wlc_phy_rssi_compute (wlc_hw->band->pi, wlc_rxhdr);
@@ -457,7 +457,8 @@ brcms_b_set_chanspec(struct brcms_c_hw_info *wlc_hw, chanspec_t chanspec, } } -int brcms_b_state_get (struct brcms_c_hw_info *wlc_hw,brcms_b_state_t *state) +int brcms_b_state_get (struct brcms_c_hw_info *wlc_hw, +struct brcms_b_state *state) { state->machwcap = wlc_hw->machwcap;
@@ -472,7 +473,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)u16 pio_mhf2 =0 ;struct brcms_c_hw_info *wlc_hw = wlc->hw;uint unit = wlc_hw->unit; -wlc_tunables_t *tune = wlc->pub->tunables; +struct brcms_tunables *tune = wlc->pub->tunables;struct wiphy *wiphy = wlc->wiphy;/* name and offsets for dma_attach */
@@ -589,7 +590,7 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,uint err =0 ;uint j;bool wme = false; -shared_phy_params_t sha_params; +struct shared_phy_params sha_params;struct wiphy *wiphy = wlc->wiphy; BCMMSG(wlc->wiphy, "wl%d: vendor 0x%x device 0x%x\n", unit, vendor,
@@ -2959,7 +2960,8 @@ bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc) }static bool -brcms_b_dotxstatus (struct brcms_c_hw_info *wlc_hw,tx_status_t *txs,u32 s2) +brcms_b_dotxstatus (struct brcms_c_hw_info *wlc_hw,struct tx_status *txs, +u32 s2) {/* discard intermediate indications for ucode with one legitimate case: * e.g. if "useRTS" is set. ucode did a successful rts/cts exchange, but the subsequent
@@ -2983,7 +2985,7 @@ brcms_b_txstatus(struct brcms_c_hw_info *wlc_hw, bool bound, bool *fatal)bool morepending = false;struct brcms_c_info *wlc = wlc_hw->wlc;d11regs_t *regs; -tx_status_t txstatus, *txs; +struct tx_status txstatus, *txs;u32 s1, s2;uint n =0 ;/*
drivers/staging/brcm80211/brcmsmac/bmac.h +1 -1
@@ -119,7 +119,7 @@ extern u16 brcms_b_get_txant(struct brcms_c_hw_info *wlc_hw);extern void brcms_b_antsel_type_set (struct brcms_c_hw_info *wlc_hw,u8 antsel_type);extern int brcms_b_state_get (struct brcms_c_hw_info *wlc_hw, -brcms_b_state_t *state); +struct brcms_b_state *state);extern void brcms_b_write_shm (struct brcms_c_hw_info *wlc_hw,uint offset,u16 v);extern u16 brcms_b_read_shm (struct brcms_c_hw_info *wlc_hw,uint offset);
drivers/staging/brcm80211/brcmsmac/channel.c +108 -97
491 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/channel.h +9 -6
@@ -103,18 +103,21 @@ struct country_info {const u8 locale_mimo_5G;/* 5G mimo info */ }; -extern wlc_cm_info_t *brcms_c_channel_mgr_attach (struct brcms_c_info *wlc); -extern void brcms_c_channel_mgr_detach (wlc_cm_info_t *wlc_cm); +extern struct brcms_cm_info * +brcms_c_channel_mgr_attach (struct brcms_c_info *wlc); -extern u8 brcms_c_channel_locale_flags_in_band (wlc_cm_info_t *wlc_cm, +extern void brcms_c_channel_mgr_detach (struct brcms_cm_info *wlc_cm); + +extern u8 brcms_c_channel_locale_flags_in_band (struct brcms_cm_info *wlc_cm,uint bandunit); -extern bool brcms_c_valid_chanspec_db (wlc_cm_info_t *wlc_cm,chanspec_t chspec); +extern bool brcms_c_valid_chanspec_db (struct brcms_cm_info *wlc_cm, +chanspec_t chspec); -extern void brcms_c_channel_reg_limits (wlc_cm_info_t *wlc_cm, +extern void brcms_c_channel_reg_limits (struct brcms_cm_info *wlc_cm,chanspec_t chanspec,struct txpwr_limits *txpwr); -extern void brcms_c_channel_set_chanspec (wlc_cm_info_t *wlc_cm, +extern void brcms_c_channel_set_chanspec (struct brcms_cm_info *wlc_cm,chanspec_t chanspec,u8 local_constraint_qdbm);
drivers/staging/brcm80211/brcmsmac/d11.h +3 -3
@@ -1308,11 +1308,11 @@ struct d11rxhdr {u16 RxChan;/* gain code, channel radio code, and phy type */ } __attribute__((packed)); -#define RXHDR_LEN 24/* sizeof d11rxhdr_t */ +#define RXHDR_LEN 24/* sizeof struct d11rxhdr */ #define FRAMELEN (h) ((h)->RxFrameSize) -struct wlc_d11rxhdr { -d11rxhdr_t rxhdr; +struct brcms_d11rxhdr { +struct d11rxhdr rxhdr;u32 tsf_l;/* TSF_L reading */ s8 rssi;/* computed instanteneous rssi in BMAC */ s8 rxpwr0;/* obsoleted, place holder for legacy ROM code. use rxpwr[] */
drivers/staging/brcm80211/brcmsmac/dma.c +153 -147
813 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/dma.h +4 -4
@@ -82,11 +82,11 @@ typedef bool(*di_rxenable_t) (struct dma_pub *dmah);typedef bool (*di_rxenabled_t ) (struct dma_pub *dmah);typedef void *(*di_rx_t ) (struct dma_pub *dmah);typedef bool (*di_rxfill_t ) (struct dma_pub *dmah); -typedef void (*di_txreclaim_t ) (struct dma_pub *dmah,txd_range_t range); +typedef void (*di_txreclaim_t ) (struct dma_pub *dmah,enum txd_range range);typedef void (*di_rxreclaim_t ) (struct dma_pub *dmah);typedef unsigned long (*di_getvar_t ) (struct dma_pub *dmah,const char *name); -typedef void *(*di_getnexttxp_t ) (struct dma_pub *dmah,txd_range_t range); +typedef void *(*di_getnexttxp_t ) (struct dma_pub *dmah,enum txd_range range);typedef void *(*di_getnextrxp_t ) (struct dma_pub *dmah,bool forceall);typedef void *(*di_peeknexttxp_t ) (struct dma_pub *dmah);typedef void *(*di_peeknextrxp_t ) (struct dma_pub *dmah);
@@ -161,7 +161,7 @@ struct di_fcn_s {*/ /* export structure */ struct dma_pub { -const di_fcn_t *di_fn;/* DMA function pointers */ +const struct di_fcn_s *di_fn;/* DMA function pointers */ uint txavail;/* # free tx descriptors */ uint dmactrlflags;/* dma control flags */
@@ -177,7 +177,7 @@ extern struct dma_pub *dma_attach(char *name, struct si_pub *sih, uint nrxd, uint rxbufsize, int rxextheadroom, uint nrxpost, uint rxoffset, uint *msg_level); -extern const di_fcn_t dma64proc; +extern const struct di_fcn_s dma64proc;#define dma_detach (di) (dma64proc.detach(di))#define dma_txreset (di) (dma64proc.txreset(di))
drivers/staging/brcm80211/brcmsmac/mac80211_if.h +1 -1
@@ -56,7 +56,7 @@ struct brcms_firmware { };struct brcms_info { -struct wlc_pub *pub;/* pointer to public wlc state */ +struct brcms_pub *pub;/* pointer to public wlc state */ void *wlc;/* pointer to private common os-independent data */ u32 magic;
drivers/staging/brcm80211/brcmsmac/main.c +62 -55
393 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/main.h +33 -28
174 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/nicpci.c +52 -51
177 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/otp.c +23 -22
45 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +16 -16
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +47 -38
85 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +118 -121
239 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +146 -147
293 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c +15 -14
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.h +15 -13
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.c +9 -9
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h +4 -4
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy_shim.c +34 -34
68 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy_shim.h +32 -32
64 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/pub.h +11 -10
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/rate.c +14 -10
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/rate.h +30 -28
58 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/scb.h +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/srom.c +14 -12
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/types.h +12 -75
87 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.4.1
Part of the diff is not shown here. View the raw message.
PATCH 12/31 staging: brcm80211: replaced typedef phy_info_t by struct brcms_phy
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 249 +++++++------ drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | 248 +++++++------ drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 342 +++++++++--------- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h | 2 +- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 431 +++++++++++----------- drivers/staging/brcm80211/brcmsmac/types.h | 2 +- 6 files changed, 648 insertions(+), 626 deletions(-)
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +126 -123
@@ -121,29 +121,31 @@ const u8 ofdm_rate_lookup[] = {#define PHY_WREG_LIMIT 24 -static void wlc_set_phy_uninitted (phy_info_t *pi); -static u32 wlc_phy_get_radio_ver (phy_info_t *pi); +static void wlc_set_phy_uninitted (struct brcms_phy *pi); +static u32 wlc_phy_get_radio_ver (struct brcms_phy *pi);static void wlc_phy_timercb_phycal (void *arg); -static bool wlc_phy_noise_calc_phy (phy_info_t *pi,u32 *cmplx_pwr, +static bool wlc_phy_noise_calc_phy (struct brcms_phy *pi,u32 *cmplx_pwr,s8 *pwr_ant); -static void wlc_phy_cal_perical_mphase_schedule (phy_info_t *pi,uint delay); -static void wlc_phy_noise_cb (phy_info_t *pi,u8 channel,s8 noise_dbm); +static void wlc_phy_cal_perical_mphase_schedule (struct brcms_phy *pi, +uint delay); + +static void wlc_phy_noise_cb (struct brcms_phy *pi,u8 channel,s8 noise_dbm);static void wlc_phy_noise_sample_request (wlc_phy_t *pih,u8 reason,u8 ch); -static void wlc_phy_txpower_reg_limit_calc (phy_info_t *pi, +static void wlc_phy_txpower_reg_limit_calc (struct brcms_phy *pi,struct txpwr_limits *tp,chanspec_t ); -static bool wlc_phy_cal_txpower_recalc_sw (phy_info_t *pi); +static bool wlc_phy_cal_txpower_recalc_sw (struct brcms_phy *pi); -static s8 wlc_user_txpwr_antport_to_rfport (phy_info_t *pi,uint chan, +static s8 wlc_user_txpwr_antport_to_rfport (struct brcms_phy *pi,uint chan,u32 band,u8 rate); -static void wlc_phy_upd_env_txpwr_rate_limits (phy_info_t *pi,u32 band); -static s8 wlc_phy_env_measure_vbat (phy_info_t *pi); -static s8 wlc_phy_env_measure_temperature (phy_info_t *pi); +static void wlc_phy_upd_env_txpwr_rate_limits (struct brcms_phy *pi,u32 band); +static s8 wlc_phy_env_measure_vbat (struct brcms_phy *pi); +static s8 wlc_phy_env_measure_temperature (struct brcms_phy *pi); -char *phy_getvar (phy_info_t *pi,const char *name) +char *phy_getvar (struct brcms_phy *pi,const char *name) {char *vars = pi->vars;char *s;
@@ -167,7 +169,7 @@ char *phy_getvar(phy_info_t *pi, const char *name)return NULL ; } -int phy_getintvar (phy_info_t *pi,const char *name) +int phy_getintvar (struct brcms_phy *pi,const char *name) {char *val;
@@ -180,19 +182,19 @@ int phy_getintvar(phy_info_t *pi, const char *name)void wlc_phyreg_enter (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;wlapi_bmac_ucode_wake_override_phyreg_set (pi->sh->physhim); }void wlc_phyreg_exit (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;wlapi_bmac_ucode_wake_override_phyreg_clear (pi->sh->physhim); }void wlc_radioreg_enter (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;wlapi_bmac_mctrl (pi->sh->physhim,MCTL_LOCK_RADIO ,MCTL_LOCK_RADIO );udelay (10 );
@@ -200,7 +202,7 @@ void wlc_radioreg_enter(wlc_phy_t *pih)void wlc_radioreg_exit (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;volatile u16 dummy; dummy =R_REG (&pi->regs->phyversion);
@@ -208,7 +210,7 @@ void wlc_radioreg_exit(wlc_phy_t *pih)wlapi_bmac_mctrl (pi->sh->physhim,MCTL_LOCK_RADIO ,0 ); } -u16 read_radio_reg (phy_info_t *pi,u16 addr) +u16 read_radio_reg (struct brcms_phy *pi,u16 addr) {u16 data;
@@ -258,7 +260,7 @@ u16 read_radio_reg(phy_info_t *pi, u16 addr)return data; } -void write_radio_reg (phy_info_t *pi,u16 addr,u16 val) +void write_radio_reg (struct brcms_phy *pi,u16 addr,u16 val) {if (NORADIO_ENAB (pi->pubpi))return ;
@@ -282,7 +284,7 @@ void write_radio_reg(phy_info_t *pi, u16 addr, u16 val) } } -static u32 read_radio_id (phy_info_t *pi) +static u32 read_radio_id (struct brcms_phy *pi) {u32 id;
@@ -310,7 +312,7 @@ static u32 read_radio_id(phy_info_t *pi)return id; } -void and_radio_reg (phy_info_t *pi,u16 addr,u16 val) +void and_radio_reg (struct brcms_phy *pi,u16 addr,u16 val) {u16 rval;
@@ -321,7 +323,7 @@ void and_radio_reg(phy_info_t *pi, u16 addr, u16 val)write_radio_reg (pi, addr, (rval & val)); } -void or_radio_reg (phy_info_t *pi,u16 addr,u16 val) +void or_radio_reg (struct brcms_phy *pi,u16 addr,u16 val) {u16 rval;
@@ -332,7 +334,7 @@ void or_radio_reg(phy_info_t *pi, u16 addr, u16 val)write_radio_reg (pi, addr, (rval | val)); } -void xor_radio_reg (phy_info_t *pi,u16 addr,u16 mask) +void xor_radio_reg (struct brcms_phy *pi,u16 addr,u16 mask) {u16 rval;
@@ -343,7 +345,7 @@ void xor_radio_reg(phy_info_t *pi, u16 addr, u16 mask)write_radio_reg (pi, addr, (rval ^ mask)); } -void mod_radio_reg (phy_info_t *pi,u16 addr,u16 mask,u16 val) +void mod_radio_reg (struct brcms_phy *pi,u16 addr,u16 mask,u16 val) {u16 rval;
@@ -354,12 +356,12 @@ void mod_radio_reg(phy_info_t *pi, u16 addr, u16 mask, u16 val)write_radio_reg (pi, addr, (rval & ~mask) | (val & mask)); } -void write_phy_channel_reg (phy_info_t *pi,uint val) +void write_phy_channel_reg (struct brcms_phy *pi,uint val) {W_REG (&pi->regs->phychannel, val); } -u16 read_phy_reg (phy_info_t *pi,u16 addr) +u16 read_phy_reg (struct brcms_phy *pi,u16 addr) {d11regs_t *regs;
@@ -371,7 +373,7 @@ u16 read_phy_reg(phy_info_t *pi, u16 addr)return R_REG (®s->phyregdata); } -void write_phy_reg (phy_info_t *pi,u16 addr,u16 val) +void write_phy_reg (struct brcms_phy *pi,u16 addr,u16 val) {d11regs_t *regs;
@@ -394,7 +396,7 @@ void write_phy_reg(phy_info_t *pi, u16 addr, u16 val)#endif } -void and_phy_reg (phy_info_t *pi,u16 addr,u16 val) +void and_phy_reg (struct brcms_phy *pi,u16 addr,u16 val) {d11regs_t *regs;
@@ -406,7 +408,7 @@ void and_phy_reg(phy_info_t *pi, u16 addr, u16 val) pi->phy_wreg =0 ; } -void or_phy_reg (phy_info_t *pi,u16 addr,u16 val) +void or_phy_reg (struct brcms_phy *pi,u16 addr,u16 val) {d11regs_t *regs;
@@ -418,7 +420,7 @@ void or_phy_reg(phy_info_t *pi, u16 addr, u16 val) pi->phy_wreg =0 ; } -void mod_phy_reg (phy_info_t *pi,u16 addr,u16 mask,u16 val) +void mod_phy_reg (struct brcms_phy *pi,u16 addr,u16 mask,u16 val) {d11regs_t *regs;
@@ -431,7 +433,7 @@ void mod_phy_reg(phy_info_t *pi, u16 addr, u16 mask, u16 val) pi->phy_wreg =0 ; } -static void WLBANDINITFN (wlc_set_phy_uninitted ) (phy_info_t *pi) +static void WLBANDINITFN (wlc_set_phy_uninitted ) (struct brcms_phy *pi) {int i, j;
@@ -508,7 +510,7 @@ struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp)wlc_phy_t *wlc_phy_attach (struct shared_phy *sh,void *regs,int bandtype,char *vars,struct wiphy *wiphy) { -phy_info_t *pi; +struct brcms_phy *pi;u32 sflags =0 ;uint phyversion;u32 idcode;
@@ -533,7 +535,7 @@ wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype,return &pi->pubpi_ro; } - pi =kzalloc (sizeof (phy_info_t),GFP_ATOMIC ); + pi =kzalloc (sizeof (struct brcms_phy ),GFP_ATOMIC );if (pi ==NULL ) {return NULL ; }
@@ -679,7 +681,7 @@ wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype,void wlc_phy_detach (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (pih) {if (--pi->refcnt) {
@@ -707,7 +709,7 @@ boolwlc_phy_get_phyversion (wlc_phy_t *pih, u16 *phytype, u16 *phyrev, u16 *radioid, u16 *radiover) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; *phytype = (u16 ) pi->pubpi.phy_type; *phyrev = (u16 ) pi->pubpi.phy_rev; *radioid = pi->pubpi.radioid;
@@ -718,19 +720,19 @@ wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype, u16 *phyrev,bool wlc_phy_get_encore (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;return pi->pubpi.abgphy_encore; }u32 wlc_phy_get_coreflags (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;return pi->pubpi.coreflags; }static void wlc_phy_timercb_phycal (void *arg) { -phy_info_t *pi = (phy_info_t *) arg; +struct brcms_phy *pi = (struct brcms_phy *) arg;uint delay =5 ;if (PHY_PERICAL_MPHASE_PENDING (pi)) {
@@ -753,7 +755,7 @@ static void wlc_phy_timercb_phycal(void *arg)void wlc_phy_anacore (wlc_phy_t *pih,bool on) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (ISNPHY (pi)) {if (on) {
@@ -790,7 +792,7 @@ void wlc_phy_anacore(wlc_phy_t *pih, bool on)u32 wlc_phy_clk_bwbits (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;u32 phy_bw_clkbits =0 ;
@@ -815,14 +817,14 @@ u32 wlc_phy_clk_bwbits(wlc_phy_t *pih)void WLBANDINITFN (wlc_phy_por_inform ) (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; pi->phy_init_por = true; }void wlc_phy_edcrs_lock (wlc_phy_t *pih,bool lock) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; pi->edcrs_threshold_lock = lock;
@@ -834,14 +836,14 @@ void wlc_phy_edcrs_lock(wlc_phy_t *pih, bool lock)void wlc_phy_initcal_enable (wlc_phy_t *pih,bool initcal) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; pi->do_initcal = initcal; }void wlc_phy_hw_clk_state_upd (wlc_phy_t *pih,bool newstate) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (!pi || !pi->sh)return ;
@@ -851,7 +853,7 @@ void wlc_phy_hw_clk_state_upd(wlc_phy_t *pih, bool newstate)void wlc_phy_hw_state_upd (wlc_phy_t *pih,bool newstate) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (!pi || !pi->sh)return ;
@@ -863,7 +865,7 @@ void WLBANDINITFN(wlc_phy_init) (wlc_phy_t *pih, chanspec_t chanspec) {u32 mc;initfn_t phy_init =NULL ; -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (pi->init_in_progress)return ;
@@ -917,7 +919,7 @@ void WLBANDINITFN(wlc_phy_init) (wlc_phy_t *pih, chanspec_t chanspec)void wlc_phy_cal_init (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;initfn_t cal_init =NULL ; if (WARN((R_REG(&pi->regs->maccontrol) & MCTL_EN_MAC) != 0,
@@ -935,7 +937,7 @@ void wlc_phy_cal_init(wlc_phy_t *pih)int wlc_phy_down (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;int callbacks =0 ; if (pi->phycal_timer
@@ -948,7 +950,7 @@ int wlc_phy_down(wlc_phy_t *pih)return callbacks; } -static u32 wlc_phy_get_radio_ver (phy_info_t *pi) +static u32 wlc_phy_get_radio_ver (struct brcms_phy *pi) {u32 ver;
@@ -958,7 +960,7 @@ static u32 wlc_phy_get_radio_ver(phy_info_t *pi) }void -wlc_phy_table_addr (phy_info_t *pi,uint tbl_id,uint tbl_offset, +wlc_phy_table_addr (struct brcms_phy *pi,uint tbl_id,uint tbl_offset,u16 tblAddr,u16 tblDataHi,u16 tblDataLo) {write_phy_reg (pi, tblAddr, (tbl_id <<10 ) | tbl_offset);
@@ -974,7 +976,7 @@ wlc_phy_table_addr(phy_info_t *pi, uint tbl_id, uint tbl_offset, } } -void wlc_phy_table_data_write (phy_info_t *pi,uint width,u32 val) +void wlc_phy_table_data_write (struct brcms_phy *pi,uint width,u32 val) { if ((pi->sh->chip == BCM43224_CHIP_ID) && (pi->sh->chiprev == 1) &&
@@ -997,7 +999,7 @@ void wlc_phy_table_data_write(phy_info_t *pi, uint width, u32 val) }void -wlc_phy_write_table (phy_info_t *pi,const struct phytbl_info *ptbl_info, +wlc_phy_write_table (struct brcms_phy *pi,const struct phytbl_info *ptbl_info,u16 tblAddr,u16 tblDataHi,u16 tblDataLo) {uint idx;
@@ -1037,7 +1039,7 @@ wlc_phy_write_table(phy_info_t *pi, const struct phytbl_info *ptbl_info, }void -wlc_phy_read_table (phy_info_t *pi,const struct phytbl_info *ptbl_info, +wlc_phy_read_table (struct brcms_phy *pi,const struct phytbl_info *ptbl_info,u16 tblAddr,u16 tblDataHi,u16 tblDataLo) {uint idx;
@@ -1075,7 +1077,7 @@ wlc_phy_read_table(phy_info_t *pi, const struct phytbl_info *ptbl_info, }uint -wlc_phy_init_radio_regs_allbands (phy_info_t *pi, +wlc_phy_init_radio_regs_allbands (struct brcms_phy *pi,struct radio_20xx_regs *radioregs) {uint i =0 ;
@@ -1093,7 +1095,7 @@ wlc_phy_init_radio_regs_allbands(phy_info_t *pi, }uint -wlc_phy_init_radio_regs (phy_info_t *pi,struct radio_regs *radioregs, +wlc_phy_init_radio_regs (struct brcms_phy *pi,struct radio_regs *radioregs,u16 core_offset) {uint i =0 ;
@@ -1126,7 +1128,7 @@ wlc_phy_init_radio_regs(phy_info_t *pi, struct radio_regs *radioregs,return i; } -void wlc_phy_do_dummy_tx (phy_info_t *pi,bool ofdm,bool pa_on) +void wlc_phy_do_dummy_tx (struct brcms_phy *pi,bool ofdm,bool pa_on) {#define DUMMY_PKT_LEN 20d11regs_t *regs = pi->regs;
@@ -1206,7 +1208,7 @@ void wlc_phy_do_dummy_tx(phy_info_t *pi, bool ofdm, bool pa_on)void wlc_phy_hold_upd (wlc_phy_t *pih,mbool id,bool set) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (set) {mboolset (pi->measure_hold, id);
@@ -1219,7 +1221,7 @@ void wlc_phy_hold_upd(wlc_phy_t *pih, mbool id, bool set)void wlc_phy_mute_upd (wlc_phy_t *pih,bool mute,mbool flags) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (mute) {mboolset (pi->measure_hold,PHY_HOLD_FOR_MUTE );
@@ -1234,7 +1236,7 @@ void wlc_phy_mute_upd(wlc_phy_t *pih, bool mute, mbool flags)void wlc_phy_clear_tssi (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (ISNPHY (pi)) {return ;
@@ -1246,14 +1248,14 @@ void wlc_phy_clear_tssi(wlc_phy_t *pih) } } -static bool wlc_phy_cal_txpower_recalc_sw (phy_info_t *pi) +static bool wlc_phy_cal_txpower_recalc_sw (struct brcms_phy *pi) {return false; }void wlc_phy_switch_radio (wlc_phy_t *pih,bool on) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (NORADIO_ENAB (pi->pubpi))return ;
@@ -1296,35 +1298,35 @@ void wlc_phy_switch_radio(wlc_phy_t *pih, bool on)u16 wlc_phy_bw_state_get (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;return pi->bw; }void wlc_phy_bw_state_set (wlc_phy_t *ppi,u16 bw) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; pi->bw = bw; }void wlc_phy_chanspec_radio_set (wlc_phy_t *ppi,chanspec_t newch) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; pi->radio_chanspec = newch; }chanspec_t wlc_phy_chanspec_get (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;return pi->radio_chanspec; }void wlc_phy_chanspec_set (wlc_phy_t *ppi,chanspec_t chanspec) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;u16 m_cur_channel;chansetfn_t chanspec_set =NULL ;
@@ -1357,7 +1359,7 @@ int wlc_phy_chanspec_freq2bandrange_lpssn(uint freq)return range; } -int wlc_phy_chanspec_bandrange_get (phy_info_t *pi,chanspec_t chanspec) +int wlc_phy_chanspec_bandrange_get (struct brcms_phy *pi,chanspec_t chanspec) {int range =-1 ;uint channel =CHSPEC_CHANNEL (chanspec);
@@ -1374,7 +1376,7 @@ int wlc_phy_chanspec_bandrange_get(phy_info_t *pi, chanspec_t chanspec)void wlc_phy_chanspec_ch14_widefilter_set (wlc_phy_t *ppi,bool wide_filter) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; pi->channel_14_wide_filter = wide_filter;
@@ -1393,7 +1395,7 @@ int wlc_phy_channel2freq(uint channel)void wlc_phy_chanspec_band_validch (wlc_phy_t *ppi,uint band,chanvec_t *channels) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;uint i;uint channel;
@@ -1414,7 +1416,7 @@ wlc_phy_chanspec_band_validch(wlc_phy_t *ppi, uint band, chanvec_t *channels)chanspec_t wlc_phy_chanspec_band_firstch (wlc_phy_t *ppi,uint band) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;uint i;uint channel;chanspec_t chspec;
@@ -1459,7 +1461,7 @@ chanspec_t wlc_phy_chanspec_band_firstch(wlc_phy_t *ppi, uint band)int wlc_phy_txpower_get (wlc_phy_t *ppi,uint *qdbm,bool *override) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; *qdbm = pi->tx_user_target[0 ];if (override !=NULL )
@@ -1470,7 +1472,7 @@ int wlc_phy_txpower_get(wlc_phy_t *ppi, uint *qdbm, bool *override)void wlc_phy_txpower_target_set (wlc_phy_t *ppi,struct txpwr_limits *txpwr) {bool mac_enabled = false; -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;memcpy (&pi->tx_user_target[TXP_FIRST_CCK ], &txpwr->cck[0 ],WLC_NUM_RATES_CCK );
@@ -1518,7 +1520,7 @@ void wlc_phy_txpower_target_set(wlc_phy_t *ppi, struct txpwr_limits *txpwr)int wlc_phy_txpower_set (wlc_phy_t *ppi,uint qdbm,bool override) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;int i;if (qdbm >127 )
@@ -1555,7 +1557,7 @@ void wlc_phy_txpower_sromlimit(wlc_phy_t *ppi, uint channel, u8 *min_pwr, u8 *max_pwr, int txp_rate_idx) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;uint i; *min_pwr = pi->min_txpower *WLC_TXPWR_DB_FACTOR ;
@@ -1605,7 +1607,7 @@ void wlc_phy_txpower_sromlimit_max_get(wlc_phy_t *ppi, uint chan, u8 *max_txpwr, u8 *min_txpwr) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;u8 tx_pwr_max =0 ;u8 tx_pwr_min =255 ;u8 max_num_rate;
@@ -1641,19 +1643,19 @@ wlc_phy_txpower_boardlimit_band(wlc_phy_t *ppi, uint bandunit, s32 *max_pwr,u8 wlc_phy_txpower_get_target_min (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;return pi->tx_power_min; }u8 wlc_phy_txpower_get_target_max (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;return pi->tx_power_max; } -void wlc_phy_txpower_recalc_target (phy_info_t *pi) +void wlc_phy_txpower_recalc_target (struct brcms_phy *pi) {u8 maxtxpwr, mintxpwr, rate, pactrl;uint target_chan;
@@ -1772,7 +1774,7 @@ void wlc_phy_txpower_recalc_target(phy_info_t *pi) }void -wlc_phy_txpower_reg_limit_calc (phy_info_t *pi,struct txpwr_limits *txpwr, +wlc_phy_txpower_reg_limit_calc (struct brcms_phy *pi,struct txpwr_limits *txpwr,chanspec_t chanspec) {u8 tmp_txpwr_limit[2 *WLC_NUM_RATES_OFDM ];
@@ -1926,21 +1928,21 @@ wlc_phy_txpower_reg_limit_calc(phy_info_t *pi, struct txpwr_limits *txpwr,void wlc_phy_txpwr_percent_set (wlc_phy_t *ppi,u8 txpwr_percent) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; pi->txpwr_percent = txpwr_percent; }void wlc_phy_machwcap_set (wlc_phy_t *ppi,u32 machwcap) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; pi->sh->machwcap = machwcap; }void wlc_phy_runbist_config (wlc_phy_t *ppi,bool start_end) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;u16 rxc; rxc =0 ;
@@ -1972,7 +1974,7 @@ void wlc_phy_txpower_limit_set(wlc_phy_t *ppi, struct txpwr_limits *txpwr, chanspec_t chanspec) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;wlc_phy_txpower_reg_limit_calc (pi, txpwr, chanspec);
@@ -1996,19 +1998,19 @@ wlc_phy_txpower_limit_set(wlc_phy_t *ppi, struct txpwr_limits *txpwr,void wlc_phy_ofdm_rateset_war (wlc_phy_t *pih,bool war) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; pi->ofdm_rateset_war = war; }void wlc_phy_bf_preempt_enable (wlc_phy_t *pih,bool bf_preempt) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; pi->bf_preempt_4306 = bf_preempt; } -void wlc_phy_txpower_update_shm (phy_info_t *pi) +void wlc_phy_txpower_update_shm (struct brcms_phy *pi) {int j;if (ISNPHY (pi)) {
@@ -2061,7 +2063,7 @@ void wlc_phy_txpower_update_shm(phy_info_t *pi)bool wlc_phy_txpower_hw_ctrl_get (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;if (ISNPHY (pi)) {return pi->nphy_txpwrctrl;
@@ -2072,7 +2074,7 @@ bool wlc_phy_txpower_hw_ctrl_get(wlc_phy_t *ppi)void wlc_phy_txpower_hw_ctrl_set (wlc_phy_t *ppi,bool hwpwrctrl) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;bool cur_hwpwrctrl = pi->hwpwrctrl;bool suspend;
@@ -2108,7 +2110,7 @@ void wlc_phy_txpower_hw_ctrl_set(wlc_phy_t *ppi, bool hwpwrctrl) } } -void wlc_phy_txpower_ipa_upd (phy_info_t *pi) +void wlc_phy_txpower_ipa_upd (struct brcms_phy *pi) {if (NREV_GE (pi->pubpi.phy_rev,3 )) {
@@ -2120,9 +2122,9 @@ void wlc_phy_txpower_ipa_upd(phy_info_t *pi) } } -static u32 wlc_phy_txpower_est_power_nphy (phy_info_t *pi); +static u32 wlc_phy_txpower_est_power_nphy (struct brcms_phy *pi); -static u32 wlc_phy_txpower_est_power_nphy (phy_info_t *pi) +static u32 wlc_phy_txpower_est_power_nphy (struct brcms_phy *pi) {s16 tx0_status, tx1_status;u16 estPower1, estPower2;
@@ -2174,7 +2176,7 @@ static u32 wlc_phy_txpower_est_power_nphy(phy_info_t *pi)void wlc_phy_txpower_get_current (wlc_phy_t *ppi,tx_power_t *power,uint channel) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;uint rate, num_rates;u8 min_pwr, max_pwr;
@@ -2271,21 +2273,21 @@ wlc_phy_txpower_get_current(wlc_phy_t *ppi, tx_power_t *power, uint channel)void wlc_phy_antsel_type_set (wlc_phy_t *ppi,u8 antsel_type) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi; pi->antsel_type = antsel_type; }bool wlc_phy_test_ison (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;return pi->phytest_on; }void wlc_phy_ant_rxdiv_set (wlc_phy_t *ppi,u8 val) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;bool suspend; pi->sh->rx_antdiv = val;
@@ -2331,7 +2333,7 @@ void wlc_phy_ant_rxdiv_set(wlc_phy_t *ppi, u8 val) }static bool -wlc_phy_noise_calc_phy (phy_info_t *pi,u32 *cmplx_pwr,s8 *pwr_ant) +wlc_phy_noise_calc_phy (struct brcms_phy *pi,u32 *cmplx_pwr,s8 *pwr_ant) {s8 cmplx_pwr_dbm[PHY_CORE_MAX ];u8 i;
@@ -2359,7 +2361,7 @@ wlc_phy_noise_calc_phy(phy_info_t *pi, u32 *cmplx_pwr, s8 *pwr_ant)static void wlc_phy_noise_sample_request (wlc_phy_t *pih,u8 reason,u8 ch) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;s8 noise_dbm =PHY_NOISE_FIXED_VAL_NPHY ;bool sampling_in_progress = (pi->phynoise_state !=0 );bool wait_for_intr = true;
@@ -2500,7 +2502,7 @@ void wlc_phy_noise_sample_request_external(wlc_phy_t *pih)wlc_phy_noise_sample_request (pih,PHY_NOISE_SAMPLE_EXTERNAL , channel); } -static void wlc_phy_noise_cb (phy_info_t *pi,u8 channel,s8 noise_dbm) +static void wlc_phy_noise_cb (struct brcms_phy *pi,u8 channel,s8 noise_dbm) {if (!pi->phynoise_state)return ;
@@ -2521,7 +2523,7 @@ static void wlc_phy_noise_cb(phy_info_t *pi, u8 channel, s8 noise_dbm) } -static s8 wlc_phy_noise_read_shmem (phy_info_t *pi) +static s8 wlc_phy_noise_read_shmem (struct brcms_phy *pi) {u32 cmplx_pwr[PHY_CORE_MAX ];s8 noise_dbm_ant[PHY_CORE_MAX ];
@@ -2564,7 +2566,7 @@ static s8 wlc_phy_noise_read_shmem(phy_info_t *pi)void wlc_phy_noise_sample_intr (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;u16 jssi_aux;u8 channel =0 ;s8 noise_dbm =PHY_NOISE_FIXED_VAL_NPHY ;
@@ -2679,7 +2681,7 @@ void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx)struct d11rxhdr *rxh = &wlc_rxhdr->rxhdr;int rssi =le16_to_cpu (rxh->PhyRxStatus_1) &PRXS1_JSSI_MASK ;uint radioid = pih->radioid; -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (NORADIO_ENAB (pi->pubpi)) { rssi =WLC_RSSI_INVALID ;
@@ -2694,7 +2696,7 @@ void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx)if (ISLCNPHY (pi)) {u8 gidx = (le16_to_cpu (rxh->PhyRxStatus_2) &0xFC00 ) >>10 ; -struct phy_info_lcnphy *pi_lcn = pi->u.pi_lcnphy; +struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;if (rssi >127 ) rssi -=256 ;
@@ -2734,8 +2736,8 @@ void wlc_phy_freqtrack_end(wlc_phy_t *pih)void wlc_phy_set_deaf (wlc_phy_t *ppi,bool user_flag) { -phy_info_t *pi; - pi = (phy_info_t *) ppi; +struct brcms_phy *pi; + pi = (struct brcms_phy *) ppi;if (ISLCNPHY (pi))wlc_lcnphy_deaf_mode (pi, true);
@@ -2745,7 +2747,7 @@ void wlc_phy_set_deaf(wlc_phy_t *ppi, bool user_flag)void wlc_phy_watchdog (wlc_phy_t *pih) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;bool delay_phy_cal = false; pi->sh->now++;
@@ -2810,7 +2812,7 @@ void wlc_phy_watchdog(wlc_phy_t *pih)void wlc_phy_BSSinit (wlc_phy_t *pih,bool bonlyap,int rssi) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;uint i;uint k;
@@ -2906,7 +2908,7 @@ void wlc_phy_cordic(fixed theta, cs32 *val) val[0 ].q = val[0 ].q * signx; } -void wlc_phy_cal_perical_mphase_reset (phy_info_t *pi) +void wlc_phy_cal_perical_mphase_reset (struct brcms_phy *pi) {wlapi_del_timer (pi->sh->physhim, pi->phycal_timer);
@@ -2915,7 +2917,8 @@ void wlc_phy_cal_perical_mphase_reset(phy_info_t *pi) pi->mphase_txcal_cmdidx =0 ; } -static void wlc_phy_cal_perical_mphase_schedule (phy_info_t *pi,uint delay) +static void +wlc_phy_cal_perical_mphase_schedule (struct brcms_phy *pi,uint delay) { if ((pi->nphy_perical != PHY_PERICAL_MPHASE) &&
@@ -2933,7 +2936,7 @@ void wlc_phy_cal_perical(wlc_phy_t *pih, u8 reason)s16 nphy_currtemp =0 ;s16 delta_temp =0 ;bool do_periodic_cal = true; -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;if (!ISNPHY (pi))return ;
@@ -3008,7 +3011,7 @@ void wlc_phy_cal_perical(wlc_phy_t *pih, u8 reason) } } -void wlc_phy_cal_perical_mphase_restart (phy_info_t *pi) +void wlc_phy_cal_perical_mphase_restart (struct brcms_phy *pi) { pi->mphase_cal_phase_id =MPHASE_CAL_STATE_INIT ; pi->mphase_txcal_cmdidx =0 ;
@@ -3028,7 +3031,7 @@ u8 wlc_phy_nbits(s32 value)void wlc_phy_stf_chain_init (wlc_phy_t *pih,u8 txchain,u8 rxchain) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; pi->sh->hw_phytxchain = txchain; pi->sh->hw_phyrxchain = rxchain;
@@ -3039,7 +3042,7 @@ void wlc_phy_stf_chain_init(wlc_phy_t *pih, u8 txchain, u8 rxchain)void wlc_phy_stf_chain_set (wlc_phy_t *pih,u8 txchain,u8 rxchain) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; pi->sh->phytxchain = txchain;
@@ -3051,7 +3054,7 @@ void wlc_phy_stf_chain_set(wlc_phy_t *pih, u8 txchain, u8 rxchain)void wlc_phy_stf_chain_get (wlc_phy_t *pih,u8 *txchain,u8 *rxchain) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; *txchain = pi->sh->phytxchain; *rxchain = pi->sh->phyrxchain;
@@ -3061,7 +3064,7 @@ u8 wlc_phy_stf_chain_active_get(wlc_phy_t *pih) {s16 nphy_currtemp;u8 active_bitmap; -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih; active_bitmap = (pi->phy_txcore_heatedup) ?0x31 :0x33 ;
@@ -3091,7 +3094,7 @@ u8 wlc_phy_stf_chain_active_get(wlc_phy_t *pih)s8 wlc_phy_stf_ssmode_get (wlc_phy_t *pih,chanspec_t chanspec) { -phy_info_t *pi = (phy_info_t *) pih; +struct brcms_phy *pi = (struct brcms_phy *) pih;u8 siso_mcs_id, cdd_mcs_id; siso_mcs_id =
@@ -3113,7 +3116,7 @@ const u8 *wlc_phy_get_ofdm_rate_lookup(void)return ofdm_rate_lookup; } -void wlc_lcnphy_epa_switch (phy_info_t *pi,bool mode) +void wlc_lcnphy_epa_switch (struct brcms_phy *pi,bool mode) {if ((pi->sh->chip ==BCM4313_CHIP_ID ) && (pi->sh->boardflags &BFL_FEM )) {
@@ -3151,7 +3154,7 @@ void wlc_lcnphy_epa_switch(phy_info_t *pi, bool mode) }static s8 -wlc_user_txpwr_antport_to_rfport (phy_info_t *pi,uint chan,u32 band, +wlc_user_txpwr_antport_to_rfport (struct brcms_phy *pi,uint chan,u32 band,u8 rate) {s8 offset =0 ;
@@ -3161,7 +3164,7 @@ wlc_user_txpwr_antport_to_rfport(phy_info_t *pi, uint chan, u32 band,return offset; } -static s8 wlc_phy_env_measure_vbat (phy_info_t *pi) +static s8 wlc_phy_env_measure_vbat (struct brcms_phy *pi) {if (ISLCNPHY (pi))return wlc_lcnphy_vbatsense (pi,0 );
@@ -3169,7 +3172,7 @@ static s8 wlc_phy_env_measure_vbat(phy_info_t *pi)return 0 ; } -static s8 wlc_phy_env_measure_temperature (phy_info_t *pi) +static s8 wlc_phy_env_measure_temperature (struct brcms_phy *pi) {if (ISLCNPHY (pi))return wlc_lcnphy_tempsense_degree (pi,0 );
@@ -3177,7 +3180,7 @@ static s8 wlc_phy_env_measure_temperature(phy_info_t *pi)return 0 ; } -static void wlc_phy_upd_env_txpwr_rate_limits (phy_info_t *pi,u32 band) +static void wlc_phy_upd_env_txpwr_rate_limits (struct brcms_phy *pi,u32 band) {u8 i;s8 temp, vbat;
@@ -3196,13 +3199,13 @@ void wlc_phy_ldpc_override_set(wlc_phy_t *ppi, bool ldpc) }void -wlc_phy_get_pwrdet_offsets (phy_info_t *pi,s8 *cckoffset,s8 *ofdmoffset) +wlc_phy_get_pwrdet_offsets (struct brcms_phy *pi,s8 *cckoffset,s8 *ofdmoffset) { *cckoffset =0 ; *ofdmoffset =0 ; } -s8 wlc_phy_upd_rssi_offset (phy_info_t *pi,s8 rssi,chanspec_t chanspec) +s8 wlc_phy_upd_rssi_offset (struct brcms_phy *pi,s8 rssi,chanspec_t chanspec) {return rssi;
@@ -3210,7 +3213,7 @@ s8 wlc_phy_upd_rssi_offset(phy_info_t *pi, s8 rssi, chanspec_t chanspec)bool wlc_phy_txpower_ipa_ison (wlc_phy_t *ppi) { -phy_info_t *pi = (phy_info_t *) ppi; +struct brcms_phy *pi = (struct brcms_phy *) ppi;if (ISNPHY (pi))return wlc_phy_n_txpower_ipa_ison (pi);
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +126 -122
396 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +176 -166
1,071 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h +1 -1
@@ -19,7 +19,7 @@#include <types.h> -struct phy_info_lcnphy { +struct brcms_phy_lcnphy {int lcnphy_txrf_sp_9_override;u8 lcnphy_full_cal_channel;u8 lcnphy_cal_counter;
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +218 -213
615 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/types.h +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.4.1
Part of the diff is not shown here. View the raw message.
PATCH 13/31 staging: brcm80211: replaced typedef wlc_phy_t with struct brcms_phy_pub
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmsmac/bmac.c | 2 +- drivers/staging/brcm80211/brcmsmac/main.h | 4 +- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 170 +++++++++++----------- drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h | 155 +++++++++++--------- drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | 21 ++-- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 21 ++-- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 49 ++++--- drivers/staging/brcm80211/brcmsmac/stf.c | 2 +- drivers/staging/brcm80211/brcmsmac/types.h | 1 - 9 files changed, 223 insertions(+), 202 deletions(-)
drivers/staging/brcm80211/brcmsmac/bmac.c +1 -1
@@ -1796,7 +1796,7 @@ void brcms_b_macphyclk_set(struct brcms_c_hw_info *wlc_hw, bool clk)void brcms_b_phy_reset (struct brcms_c_hw_info *wlc_hw) { -wlc_phy_t *pih = wlc_hw->band->pi; +struct brcms_phy_pub *pih = wlc_hw->band->pi;u32 phy_bw_clkbits;bool phy_in_reset = false;
drivers/staging/brcm80211/brcmsmac/main.h +2 -2
@@ -369,7 +369,7 @@ struct brcms_c_band {u16 phyrev;u16 radioid;u16 radiorev; -wlc_phy_t *pi;/* pointer to phy specific information */ +struct brcms_phy_pub *pi;/* pointer to phy specific information */ bool abgphy_encore;u8 gmode;/* currently active gmode */
@@ -475,7 +475,7 @@ struct brcms_c_hwband {u16 phyrev;u16 radioid;u16 radiorev; -wlc_phy_t *pi;/* pointer to phy specific information */ +struct brcms_phy_pub *pi;/* pointer to phy specific information */ bool abgphy_encore; };
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +88 -82
628 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +83 -72
190 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +11 -10
@@ -565,7 +565,7 @@ struct shared_phy {bool _rifs_phy; }; -struct phy_pub { +struct brcms_phy_pub {uint phy_type;uint phy_rev;u8 phy_corenum;
@@ -594,7 +594,7 @@ struct phy_func_ptr { };struct brcms_phy { -wlc_phy_t pubpi_ro; +struct brcms_phy_pub pubpi_ro;struct shared_phy *sh;struct phy_func_ptr pi_fptr;void *pi_ptr;
@@ -607,7 +607,7 @@ struct brcms_phy {d11regs_t *regs;struct brcms_phy *next;char *vars; -wlc_phy_t pubpi; +struct brcms_phy_pub pubpi;bool do_initcal;bool phytest_on;
@@ -1002,10 +1002,10 @@ extern void xor_radio_reg(struct brcms_phy *pi, u16 addr, u16 mask);extern void write_radio_reg (struct brcms_phy *pi,u16 addr,u16 val); -extern void wlc_phyreg_enter (wlc_phy_t *pih); -extern void wlc_phyreg_exit (wlc_phy_t *pih); -extern void wlc_radioreg_enter (wlc_phy_t *pih); -extern void wlc_radioreg_exit (wlc_phy_t *pih); +extern void wlc_phyreg_enter (struct brcms_phy_pub *pih); +extern void wlc_phyreg_exit (struct brcms_phy_pub *pih); +extern void wlc_radioreg_enter (struct brcms_phy_pub *pih); +extern void wlc_radioreg_exit (struct brcms_phy_pub *pih); extern void wlc_phy_read_table(struct brcms_phy *pi, const struct phytbl_info *ptbl_info,
@@ -1125,7 +1125,7 @@ extern void wlc_lcnphy_tx_pwr_update_npt(struct brcms_phy *pi);extern s32 wlc_lcnphy_tssi2dbm (s32 tssi,s32 a1,s32 b0,s32 b1);extern void wlc_lcnphy_get_tssi (struct brcms_phy *pi,s8 *ofdm_pwr,s8 *cck_pwr); -extern void wlc_lcnphy_tx_power_adjustment (wlc_phy_t *ppi); +extern void wlc_lcnphy_tx_power_adjustment (struct brcms_phy_pub *ppi);extern s32 wlc_lcnphy_rx_signal_power (struct brcms_phy *pi,s32 gain_index);
@@ -1185,8 +1185,9 @@ extern void wlc_phy_rx_iq_coeffs_nphy(struct brcms_phy *pi, u8 write, struct nphy_iq_comp *comp);extern void wlc_phy_aci_and_noise_reduction_nphy (struct brcms_phy *pi); -extern void wlc_phy_rxcore_setstate_nphy (wlc_phy_t *pih,u8 rxcore_bitmask); -extern u8 wlc_phy_rxcore_getstate_nphy (wlc_phy_t *pih); +extern void wlc_phy_rxcore_setstate_nphy (struct brcms_phy_pub *pih, +u8 rxcore_bitmask); +extern u8 wlc_phy_rxcore_getstate_nphy (struct brcms_phy_pub *pih);extern void wlc_phy_txpwrctrl_enable_nphy (struct brcms_phy *pi,u8 ctrl_type);extern void wlc_phy_txpwr_fixpower_nphy (struct brcms_phy *pi);
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +11 -10
@@ -991,7 +991,7 @@ static bool wlc_lcnphy_rx_iq_est(struct brcms_phy *pi, u16 num_samps,static bool wlc_lcnphy_calc_rx_iq_comp (struct brcms_phy *pi,u16 num_samps);static u16 wlc_lcnphy_get_pa_gain (struct brcms_phy *pi);static void wlc_lcnphy_afe_clk_init (struct brcms_phy *pi,u8 mode); -extern void wlc_lcnphy_tx_pwr_ctrl_init (wlc_phy_t *ppi); +extern void wlc_lcnphy_tx_pwr_ctrl_init (struct brcms_phy_pub *ppi);static void wlc_lcnphy_radio_2064_channel_tune_4313 (struct brcms_phy *pi,u8 channel);
@@ -1210,7 +1210,7 @@ void wlc_phy_chanspec_set_lcnphy(struct brcms_phy *pi, chanspec_t chanspec) {u8 channel =CHSPEC_CHANNEL (chanspec); -wlc_phy_chanspec_radio_set ((wlc_phy_t *) pi, chanspec); +wlc_phy_chanspec_radio_set ((struct brcms_phy_pub *) pi, chanspec);wlc_lcnphy_set_chanspec_tweaks (pi, pi->radio_chanspec);
@@ -2067,7 +2067,7 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi, } -static void wlc_lcnphy_idle_tssi_est (wlc_phy_t *ppi) +static void wlc_lcnphy_idle_tssi_est (struct brcms_phy_pub *ppi) {bool suspend, tx_gain_override_old;struct lcnphy_txgains old_gains;
@@ -2275,7 +2275,7 @@ static void wlc_lcnphy_vbat_temp_sense_setup(struct brcms_phy *pi, u8 mode)udelay (999 ); } -void WLBANDINITFN (wlc_lcnphy_tx_pwr_ctrl_init ) (wlc_phy_t *ppi) +void WLBANDINITFN (wlc_lcnphy_tx_pwr_ctrl_init ) (struct brcms_phy_pub *ppi) {struct lcnphy_txgains tx_gains;u8 bbmult;
@@ -3501,7 +3501,7 @@ static void wlc_lcnphy_periodic_cal(struct brcms_phy *pi)if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled (pi)) { -wlc_lcnphy_idle_tssi_est ((wlc_phy_t *) pi); +wlc_lcnphy_idle_tssi_est ((struct brcms_phy_pub *) pi); b0 = pi->txpa_2g[0 ]; b1 = pi->txpa_2g[1 ];
@@ -3563,7 +3563,8 @@ void wlc_lcnphy_calib_modes(struct brcms_phy *pi, uint mode)break ;case LCNPHY_PERICAL_TEMPBASED_TXPWRCTRL :if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled (pi)) -wlc_lcnphy_tx_power_adjustment ((wlc_phy_t *) pi); +wlc_lcnphy_tx_power_adjustment ( + (struct brcms_phy_pub *) pi);break ; } }
@@ -3649,7 +3650,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct brcms_phy *pi, chanspec_t chanspec)write_phy_reg (pi,0x44a ,0x80 ); } -void wlc_lcnphy_tx_power_adjustment (wlc_phy_t *ppi) +void wlc_lcnphy_tx_power_adjustment (struct brcms_phy_pub *ppi) {s8 index;u16 index2;
@@ -3705,9 +3706,9 @@ void WLBANDINITFN(wlc_phy_init_lcnphy) (struct brcms_phy *pi)wlc_lcnphy_radio_init (pi);if (CHSPEC_IS2G (pi->radio_chanspec)) -wlc_lcnphy_tx_pwr_ctrl_init ((wlc_phy_t *) pi); +wlc_lcnphy_tx_pwr_ctrl_init ((struct brcms_phy_pub *) pi); -wlc_phy_chanspec_set ((wlc_phy_t *) pi, pi->radio_chanspec); +wlc_phy_chanspec_set ((struct brcms_phy_pub *) pi, pi->radio_chanspec);si_pmu_regcontrol (pi->sh->sih,0 ,0xf ,0x9 );
@@ -4808,7 +4809,7 @@ static bool wlc_phy_txpwr_srom_read_lcnphy(struct brcms_phy *pi) pi_lcn->lcnphy_freqoffset_corr = (u8 )PHY_GETINTVAR (pi,"freqoffset_corr" );if ((u8 )getintvar (pi->vars,"aa2g" ) >1 ) -wlc_phy_ant_rxdiv_set ((wlc_phy_t *) pi, +wlc_phy_ant_rxdiv_set ((struct brcms_phy_pub *) pi, (u8 )getintvar (pi->vars,"aa2g" )); }
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +26 -23
167 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/stf.c +1 -1
@@ -72,7 +72,7 @@ static void brcms_c_stf_stbc_rx_ht_update(struct brcms_c_info *wlc, int val)/* every WLC_TEMPSENSE_PERIOD seconds temperature check to decide whether to turn on/off txchain */ void brcms_c_tempsense_upd (struct brcms_c_info *wlc) { -wlc_phy_t *pi = wlc->band->pi; +struct brcms_phy_pub *pi = wlc->band->pi;uint active_chains, txchain;/* Check if the chip is too hot. Disable one Tx chain, if it is */
drivers/staging/brcm80211/brcmsmac/types.h +0 -1
@@ -385,7 +385,6 @@ typedef struct brcms_rateset wlc_rateset_t;typedef u32 ratespec_t ;typedef struct tx_power tx_power_t ;typedef struct chanvec chanvec_t ; -typedef struct phy_pub wlc_phy_t ;typedef s32 fixed ;typedef struct _cs32 cs32 ;typedef volatile union pmqreg pmqreg_t ;
Signature · 1 line
1.7.4.1
PATCH 14/31 staging: brcm80211: replaced typedef tx_power_t by struct brcms_tx_power
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 4 ++-- drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h | 2 +- drivers/staging/brcm80211/brcmsmac/phy_shim.h | 2 +- drivers/staging/brcm80211/brcmsmac/stf.c | 2 +- drivers/staging/brcm80211/brcmsmac/types.h | 1 - 5 files changed, 5 insertions(+), 6 deletions(-)
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +2 -2
@@ -2179,7 +2179,7 @@ static u32 wlc_phy_txpower_est_power_nphy(struct brcms_phy *pi) }void -wlc_phy_txpower_get_current (struct brcms_phy_pub *ppi,tx_power_t *power, +wlc_phy_txpower_get_current (struct brcms_phy_pub *ppi,struct tx_power *power,uint channel) {struct brcms_phy *pi = (struct brcms_phy *) ppi;
@@ -2187,7 +2187,7 @@ wlc_phy_txpower_get_current(struct brcms_phy_pub *ppi, tx_power_t *power,u8 min_pwr, max_pwr;#if WL_TX_POWER_RATES !=TXP_NUM_RATES -#error "tx_power_t struct out of sync with this fn" +#error "struct tx_power out of sync with this fn"#endif if (ISNPHY (pi)) {
drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +1 -1
@@ -270,7 +270,7 @@ extern void wlc_phy_mute_upd(struct brcms_phy_pub *ppi, bool val, mbool flags);extern void wlc_phy_antsel_type_set (struct brcms_phy_pub *ppi,u8 antsel_type);extern void wlc_phy_txpower_get_current (struct brcms_phy_pub *ppi, -tx_power_t *power,uint channel); +struct tx_power *power,uint channel);extern void wlc_phy_initcal_enable (struct brcms_phy_pub *pih,bool initcal);extern bool wlc_phy_test_ison (struct brcms_phy_pub *ppi);
drivers/staging/brcm80211/brcmsmac/phy_shim.h +1 -1
@@ -98,7 +98,7 @@/* sslpnphy specifics */ #define WL_TX_POWER_MCS20_SISO_FIRST_SSN 12/* Index for first 20MHz MCS SISO rate */ -/* tx_power_t.flags bits */ +/* struct tx_power::flags bits */ #define WL_TX_POWER_F_ENABLED 1#define WL_TX_POWER_F_HW 2#define WL_TX_POWER_F_MIMO 4
drivers/staging/brcm80211/brcmsmac/stf.c +1 -1
@@ -97,7 +97,7 @@ void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc, u16 *ss_algo_channel, chanspec_t chanspec) { - tx_power_t power; + struct tx_power power;u8 siso_mcs_id, cdd_mcs_id, stbc_mcs_id;/* Clear previous settings */
drivers/staging/brcm80211/brcmsmac/types.h +0 -1
@@ -383,7 +383,6 @@ typedef volatile struct dma32diag dma32diag_t;typedef volatile struct dma64regs dma64regs_t ;typedef struct brcms_rateset wlc_rateset_t ;typedef u32 ratespec_t ; -typedef struct tx_power tx_power_t ;typedef struct chanvec chanvec_t ;typedef s32 fixed ;typedef struct _cs32 cs32 ;
Signature · 1 line
1.7.4.1
PATCH 15/31 staging: brcm80211: renamed structures in softmac
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
Several structures contained a '_c_' in their name that does not add any information.
--- drivers/staging/brcm80211/brcmsmac/alloc.c | 36 ++-- drivers/staging/brcm80211/brcmsmac/ampdu.c | 4 +- drivers/staging/brcm80211/brcmsmac/ampdu.h | 2 +- drivers/staging/brcm80211/brcmsmac/bmac.c | 290 ++++++++++++------------ drivers/staging/brcm80211/brcmsmac/bmac.h | 96 ++++---- drivers/staging/brcm80211/brcmsmac/channel.c | 6 +- drivers/staging/brcm80211/brcmsmac/main.c | 84 ++++---- drivers/staging/brcm80211/brcmsmac/main.h | 81 +++---- drivers/staging/brcm80211/brcmsmac/phy_shim.c | 4 +- drivers/staging/brcm80211/brcmsmac/phy_shim.h | 2 +- drivers/staging/brcm80211/brcmsmac/stf.c | 2 +- drivers/staging/brcm80211/brcmsmac/stf.h | 2 +- drivers/staging/brcm80211/brcmsmac/types.h | 6 +- 13 files changed, 304 insertions(+), 311 deletions(-)
drivers/staging/brcm80211/brcmsmac/alloc.c +18 -18
@@ -20,8 +20,8 @@#include "main.h" #include "alloc.h" -static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc (uint unit); -static void brcms_c_bsscfg_mfree (struct brcms_c_bsscfg *cfg); +static struct brcms_bss_cfg *brcms_c_bsscfg_malloc (uint unit); +static void brcms_c_bsscfg_mfree (struct brcms_bss_cfg *cfg);static struct brcms_pub *brcms_c_pub_malloc (uint unit,uint *err,uint devid);static void brcms_c_pub_mfree (struct brcms_pub *pub);
@@ -87,11 +87,11 @@ static void brcms_c_pub_mfree(struct brcms_pub *pub)kfree (pub); } -static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc (uint unit) +static struct brcms_bss_cfg *brcms_c_bsscfg_malloc (uint unit) { -struct brcms_c_bsscfg *cfg; +struct brcms_bss_cfg *cfg; - cfg =kzalloc (sizeof (struct brcms_c_bsscfg ),GFP_ATOMIC ); + cfg =kzalloc (sizeof (struct brcms_bss_cfg ),GFP_ATOMIC );if (cfg ==NULL ) goto fail;
@@ -106,7 +106,7 @@ static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit)return NULL ; } -static void brcms_c_bsscfg_mfree (struct brcms_c_bsscfg *cfg) +static void brcms_c_bsscfg_mfree (struct brcms_bss_cfg *cfg) {if (cfg ==NULL )return ;
@@ -117,7 +117,7 @@ static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg) }static void brcms_c_bsscfg_ID_assign (struct brcms_c_info *wlc, -struct brcms_c_bsscfg *bsscfg) +struct brcms_bss_cfg *bsscfg) { bsscfg->ID = wlc->next_bsscfg_ID; wlc->next_bsscfg_ID++;
@@ -144,9 +144,9 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) } wlc->pub->wlc = wlc; -/* allocate struct brcms_c_hw_info state structure */ +/* allocate struct brcms_hardware state structure */ - wlc->hw =kzalloc (sizeof (struct brcms_c_hw_info ),GFP_ATOMIC ); + wlc->hw =kzalloc (sizeof (struct brcms_hardware ),GFP_ATOMIC );if (wlc->hw ==NULL ) { *err =1005 ; goto fail;
@@ -154,7 +154,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) wlc->hw->wlc = wlc; wlc->hw->bandstate[0 ] = -kzalloc (sizeof (struct brcms_c_hwband ) *MAXBANDS ,GFP_ATOMIC ); +kzalloc (sizeof (struct brcms_hw_band ) *MAXBANDS ,GFP_ATOMIC );if (wlc->hw->bandstate[0 ] ==NULL ) { *err =1006 ; goto fail;
@@ -162,9 +162,9 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)int i;for (i =1 ; i <MAXBANDS ; i++) { - wlc->hw->bandstate[i] = (struct brcms_c_hwband *) + wlc->hw->bandstate[i] = (struct brcms_hw_band *) ((unsigned long )wlc->hw->bandstate[0 ] + - (sizeof (struct brcms_c_hwband ) * i)); + (sizeof (struct brcms_hw_band ) * i)); } }
@@ -202,21 +202,21 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) } } - wlc->protection =kzalloc (sizeof (struct brcms_c_protection ), + wlc->protection =kzalloc (sizeof (struct brcms_protection ),GFP_ATOMIC );if (wlc->protection ==NULL ) { *err =1016 ; goto fail; } - wlc->stf =kzalloc (sizeof (struct brcms_c_stf ),GFP_ATOMIC ); + wlc->stf =kzalloc (sizeof (struct brcms_stf ),GFP_ATOMIC );if (wlc->stf ==NULL ) { *err =1017 ; goto fail; } wlc->bandstate[0 ] = -kzalloc (sizeof (struct brcms_c_band )*MAXBANDS ,GFP_ATOMIC ); +kzalloc (sizeof (struct brcms_band )*MAXBANDS ,GFP_ATOMIC );if (wlc->bandstate[0 ] ==NULL ) { *err =1025 ; goto fail;
@@ -224,13 +224,13 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)int i;for (i =1 ; i <MAXBANDS ; i++) { - wlc->bandstate[i] = (struct brcms_c_band *) + wlc->bandstate[i] = (struct brcms_band *) ((unsigned long )wlc->bandstate[0 ] - + (sizeof (struct brcms_c_band )*i)); + + (sizeof (struct brcms_band )*i)); } } - wlc->corestate =kzalloc (sizeof (struct brcms_c_core ),GFP_ATOMIC ); + wlc->corestate =kzalloc (sizeof (struct brcms_core ),GFP_ATOMIC );if (wlc->corestate ==NULL ) { *err =1026 ; goto fail;
drivers/staging/brcm80211/brcmsmac/ampdu.c +2 -2
@@ -436,7 +436,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, }int -brcms_c_sendampdu (struct ampdu_info *ampdu,struct brcms_c_txq_info *qi, +brcms_c_sendampdu (struct ampdu_info *ampdu,struct brcms_txq_info *qi,struct sk_buff **pdu,int prec) {struct brcms_c_info *wlc;
@@ -1204,7 +1204,7 @@ static void dma_cb_fn_ampdu(void *txi, void *arg_a)void brcms_c_ampdu_flush (struct brcms_c_info *wlc,struct ieee80211_sta *sta,u16 tid) { -struct brcms_c_txq_info *qi = wlc->pkt_queue; +struct brcms_txq_info *qi = wlc->pkt_queue;struct pktq *pq = &qi->q;int prec;struct cb_del_ampdu_pars ampdu_pars;
drivers/staging/brcm80211/brcmsmac/ampdu.h +1 -1
@@ -20,7 +20,7 @@extern struct ampdu_info *brcms_c_ampdu_attach (struct brcms_c_info *wlc);extern void brcms_c_ampdu_detach (struct ampdu_info *ampdu);extern int brcms_c_sendampdu (struct ampdu_info *ampdu, -struct brcms_c_txq_info *qi, +struct brcms_txq_info *qi,struct sk_buff **aggp,int prec);extern void brcms_c_ampdu_dotxstatus (struct ampdu_info *ampdu,struct scb *scb,struct sk_buff *p,struct tx_status *txs);
drivers/staging/brcm80211/brcmsmac/bmac.c +145 -145
961 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/bmac.h +48 -48
152 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/channel.c +3 -3
@@ -869,7 +869,7 @@ brcms_c_channels_init(struct brcms_cm_info *wlc_cm, {struct brcms_c_info *wlc = wlc_cm->wlc;uint i, j; -struct brcms_c_band *band; +struct brcms_band *band;const struct locale_info *li;chanvec_t sup_chan;const struct locale_mimo_info *li_mimo;
@@ -970,7 +970,7 @@ static void brcms_c_quiet_channels_reset(struct brcms_cm_info *wlc_cm) {struct brcms_c_info *wlc = wlc_cm->wlc;uint i, j; -struct brcms_c_band *band; +struct brcms_band *band;const chanvec_t *chanvec;memset (&wlc_cm->quiet_channels,0 ,sizeof (chanvec_t));
@@ -1262,7 +1262,7 @@ brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm, chanspec_t chanspec,int maxpwr;int delta;const struct country_info *country; -struct brcms_c_band *band; +struct brcms_band *band;const struct locale_info *li;int conducted_max;int conducted_ofdm_max;
drivers/staging/brcm80211/brcmsmac/main.c +42 -42
311 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/main.h +37 -44
240 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy_shim.c +2 -2
@@ -30,12 +30,12 @@/* PHY SHIM module specific state */ struct phy_shim_info { -struct brcms_c_hw_info *wlc_hw;/* pointer to main wlc_hw structure */ +struct brcms_hardware *wlc_hw;/* pointer to main wlc_hw structure */ void *wlc;/* pointer to main wlc structure */ void *wl;/* pointer to os-specific private state */ }; -struct phy_shim_info *wlc_phy_shim_attach (struct brcms_c_hw_info *wlc_hw, +struct phy_shim_info *wlc_phy_shim_attach (struct brcms_hardware *wlc_hw,void *wl,void *wlc) {struct phy_shim_info *physhim =NULL ;
drivers/staging/brcm80211/brcmsmac/phy_shim.h +1 -1
@@ -108,7 +108,7 @@#define WLC_N_TXRX_CHAIN0 0#define WLC_N_TXRX_CHAIN1 1 -extern struct phy_shim_info *wlc_phy_shim_attach (struct brcms_c_hw_info *wlc_hw, +extern struct phy_shim_info *wlc_phy_shim_attach (struct brcms_hardware *wlc_hw,void *wl,void *wlc);extern void wlc_phy_shim_detach (struct phy_shim_info *physhim);
drivers/staging/brcm80211/brcmsmac/stf.c +1 -1
@@ -290,7 +290,7 @@ int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val, bool force) }/* update wlc->stf->ss_opmode which represents the operational stf_ss mode we're using */ -int brcms_c_stf_ss_update (struct brcms_c_info *wlc,struct brcms_c_band *band) +int brcms_c_stf_ss_update (struct brcms_c_info *wlc,struct brcms_band *band) {int ret_code =0 ;u8 prev_stf_ss;
drivers/staging/brcm80211/brcmsmac/stf.h +1 -1
@@ -27,7 +27,7 @@ extern void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc,u16 *ss_algo_channel, chanspec_t chanspec);extern int brcms_c_stf_ss_update (struct brcms_c_info *wlc, -struct brcms_c_band *band); +struct brcms_band *band);extern void brcms_c_stf_phy_txant_upd (struct brcms_c_info *wlc);extern int brcms_c_stf_txchain_set (struct brcms_c_info *wlc,s32 int_val,bool force);
drivers/staging/brcm80211/brcmsmac/types.h +3 -3
@@ -358,12 +358,12 @@ struct ieee80211_sta;struct ieee80211_tx_queue_params ;struct brcms_info ;struct brcms_c_info ; -struct brcms_c_hw_info ; +struct brcms_hardware ;struct brcms_c_if ;struct brcmu_iovar ;struct brcmu_strbuf ; -struct brcms_c_txq_info ; -struct brcms_c_band ; +struct brcms_txq_info ; +struct brcms_band ;struct dma_pub ;struct si_pub ;struct tx_status ;
Signature · 1 line
1.7.4.1
PATCH 16/31 staging: brcm80211: remove checkpatch warnings 'suspect code indent'
In reply to Arend van SprielThe driver sources contained a couple of checkpatch warnings of the given class. These have been cleaned up.
--- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 3 +-- drivers/staging/brcm80211/brcmsmac/bmac.c | 4 ---- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 3 +-- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 5 +---- 4 files changed, 3 insertions(+), 12 deletions(-)
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +1 -2
@@ -3605,8 +3605,7 @@ brcmf_enq_event(struct brcmf_cfg80211_priv *cfg_priv, u32 event, e->etype = event;memcpy (&e->emsg, msg,sizeof (struct brcmf_event_msg )); -if (data) { - } +brcmf_lock_eq (cfg_priv);list_add_tail (&e->eq_list, &cfg_priv->eq_list);brcmf_unlock_eq (cfg_priv);
drivers/staging/brcm80211/brcmsmac/bmac.c +0 -4
@@ -318,10 +318,6 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded)brcms_c_update_beacon (wlc); } -/* PMQ entry addition */ -if (macintstatus &MI_PMQ ) { - } -/* tx status */ if (macintstatus &MI_TFS ) {if (brcms_b_txstatus (wlc->hw, bounded, &fatal))
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +1 -2
@@ -2249,8 +2249,7 @@ wlc_phy_txpower_get_current(struct brcms_phy_pub *ppi, struct tx_power *power, power->tx_power_max_rate_ind[0 ] = pi->tx_power_max_rate_ind; power->tx_power_max_rate_ind[1 ] = pi->tx_power_max_rate_ind; - }else if (!pi->hwpwrctrl) { - }else if (pi->sh->up) { + }else if (pi->hwpwrctrl && pi->sh->up) {wlc_phyreg_enter (ppi);if (ISLCNPHY (pi)) {
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +1 -4
@@ -20996,10 +20996,8 @@ s16 wlc_phy_tempsense_nphy(struct brcms_phy *pi)write_radio_reg (pi,RADIO_2056_SYN_TEMPPROCSENSE ,0x01 );wlc_phy_poll_rssi_nphy (pi,NPHY_RSSI_SEL_IQ , radio_temp,1 ); -if (NREV_GE (pi->pubpi.phy_rev,7 )) { - }else { +if (NREV_LT (pi->pubpi.phy_rev,7 ))write_radio_reg (pi,RADIO_2056_SYN_TEMPPROCSENSE ,0x05 ); - }wlc_phy_poll_rssi_nphy (pi,NPHY_RSSI_SEL_IQ , radio_temp2,1 );if (NREV_GE (pi->pubpi.phy_rev,7 )) {
@@ -24578,7 +24576,6 @@ static void wlc_phy_calc_rx_iq_comp_nphy(struct brcms_phy *pi, u8 core_mask) } new_comp = old_comp; - }else if (cal_retry >0 ) { }wlc_phy_rx_iq_coeffs_nphy (pi,1 , &new_comp);
Signature · 1 line
1.7.4.1
PATCH 17/31 staging: brcm80211: made name lookup arrays more const
In reply to Arend van SprielThe checkpatch script gave a hint that some character string arrays probably should have an additional const keyword. This patch changes the static const char * arrays to static const char * const arrays as suggested getting rid of two checkpatch warnings.
--- drivers/staging/brcm80211/brcmsmac/main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/brcm80211/brcmsmac/main.c +2 -2
@@ -278,7 +278,7 @@ static bool in_send_q;#define wme_shmemacindex (ac) wme_ac2fifo[ac]#ifdef BCMDBG -static const char *fifo_names[] = { +static const char *const fifo_names[] = {"AC_BK" ,"AC_BE" ,"AC_VI" ,"AC_VO" ,"BCMC" ,"ATIM" };#else static const char fifo_names[6 ][0 ];
@@ -2831,7 +2831,7 @@ static void brcms_c_wme_retries_write(struct brcms_c_info *wlc) }#ifdef BCMDBG -static const char *supr_reason[] = { +static const char *const supr_reason[] = {"None" ,"PMQ Entry" ,"Flush request" ,"Previous frag failure" ,"Channel mismatch" , "Lifetime Expiry", "Underflow"
Signature · 1 line
1.7.4.1
PATCH 18/31 staging: brcm80211: remove checkpatch warnings from phy_n.c
In reply to Arend van SprielThe source file phy_n.c had couple of checkpatch warnings that have been fixed in this patch.
--- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 51 ++++++++++------------- 1 files changed, 22 insertions(+), 29 deletions(-)
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +22 -29
@@ -14705,12 +14705,10 @@ void WLBANDINITFN(wlc_phy_init_nphy) (struct brcms_phy *pi) tx_pwrctrl_tbl =wlc_phy_get_ipa_gaintbl_nphy (pi); }else {if (CHSPEC_IS5G (pi->radio_chanspec)) { - if NREV_IS - (pi->pubpi.phy_rev,3 ) { +if (NREV_IS (pi->pubpi.phy_rev,3 )) { tx_pwrctrl_tbl = nphy_tpc_5GHz_txgain_rev3; - } else if NREV_IS - (pi->pubpi.phy_rev,4 ) { + }else if (NREV_IS (pi->pubpi.phy_rev,4 )) { tx_pwrctrl_tbl = (pi->srom_fem5g.extpagain ==3 ) ? nphy_tpc_5GHz_txgain_HiPwrEPA :
@@ -22515,21 +22513,21 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi) } } }else { +uint phyrev = pi->pubpi.phy_rev; + base_idx[0 ] = (read_phy_reg (pi,0x1ed ) >>8 ) &0x7f ; base_idx[1 ] = (read_phy_reg (pi,0x1ee ) >>8 ) &0x7f ;for (core_no =0 ; core_no <2 ; core_no++) { -if (NREV_GE (pi->pubpi.phy_rev,3 )) { +if (NREV_GE (phyrev,3 )) {if (PHY_IPA (pi)) { tx_pwrctrl_tbl =wlc_phy_get_ipa_gaintbl_nphy (pi); }else {if (CHSPEC_IS5G (pi->radio_chanspec)) { - if NREV_IS - (pi->pubpi.phy_rev,3 ) { +if (NREV_IS (phyrev,3 )) { tx_pwrctrl_tbl = nphy_tpc_5GHz_txgain_rev3; - } else if NREV_IS - (pi->pubpi.phy_rev,4 ) { + }else if (NREV_IS (phyrev,4 )) { tx_pwrctrl_tbl = (pi->srom_fem5g. extpagain ==
@@ -22542,8 +22540,7 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi) nphy_tpc_5GHz_txgain_rev5; } }else { -if (NREV_GE - (pi->pubpi.phy_rev,7 )) { +if (NREV_GE (phyrev,7 )) {if (pi->pubpi. radiorev ==3 ) { tx_pwrctrl_tbl =
@@ -22556,9 +22553,7 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi) } }else { -if (NREV_GE - (pi->pubpi.phy_rev, -5 ) +if (NREV_GE (phyrev,5 ) && (pi->srom_fem2g. extpagain ==3 )) {
@@ -22571,8 +22566,7 @@ struct nphy_txgains wlc_phy_get_tx_gain_nphy(struct brcms_phy *pi) } } } - if NREV_GE - (pi->pubpi.phy_rev,7 ) { +if (NREV_GE (phyrev,7 )) { target_gain.ipa[core_no] = (tx_pwrctrl_tbl[base_idx[core_no]] >>16 ) &0x7 ;
@@ -27449,20 +27443,20 @@ void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi) pi->nphy_txpwrindex[PHY_CORE_1 ].index_internal_save = txpi[1 ];for (core =0 ; core < pi->pubpi.phy_corenum; core++) { -if (NREV_GE (pi->pubpi.phy_rev,3 )) { +uint phyrev = pi->pubpi.phy_rev; + +if (NREV_GE (phyrev,3 )) {if (PHY_IPA (pi)) {u32 *tx_gaintbl =wlc_phy_get_ipa_gaintbl_nphy (pi); txgain = tx_gaintbl[txpi[core]]; }else {if (CHSPEC_IS5G (pi->radio_chanspec)) { - if NREV_IS - (pi->pubpi.phy_rev,3 ) { +if (NREV_IS (phyrev,3 )) { txgain = nphy_tpc_5GHz_txgain_rev3 [txpi[core]]; - } else if NREV_IS - (pi->pubpi.phy_rev,4 ) { + }else if (NREV_IS (phyrev,4 )) { txgain = (pi->srom_fem5g.extpagain == 3) ?
@@ -27476,7 +27470,7 @@ void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi) [txpi[core]]; } }else { -if (NREV_GE (pi->pubpi.phy_rev,5 ) && +if (NREV_GE (phyrev,5 ) && (pi->srom_fem2g.extpagain ==3 )) { txgain = nphy_tpc_txgain_HiPwrEPA
@@ -27492,20 +27486,19 @@ void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi) txgain = nphy_tpc_txgain[txpi[core]]; } -if (NREV_GE (pi->pubpi.phy_rev,3 )) { +if (NREV_GE (phyrev,3 )) rad_gain = (txgain >>16 ) & ((1 << (32 -16 +1 )) -1 ); - }else { +else rad_gain = (txgain >>16 ) & ((1 << (28 -16 +1 )) -1 ); - } -if (NREV_GE (pi->pubpi.phy_rev,7 )) { +if (NREV_GE (phyrev,7 )) dac_gain = (txgain >>8 ) & ((1 << (10 -8 +1 )) -1 ); - }else { +else dac_gain = (txgain >>8 ) & ((1 << (13 -8 +1 )) -1 ); - } + bbmult = (txgain >>0 ) & ((1 << (7 -0 +1 )) -1 ); -if (NREV_GE (pi->pubpi.phy_rev,3 )) { +if (NREV_GE (phyrev,3 )) {mod_phy_reg (pi, ((core ==PHY_CORE_0 ) ?0x8f :0xa5 ), (0x1 <<8 ), (0x1 <<8 )); }else {
Signature · 1 line
1.7.4.1
PATCH 19/31 staging: brcm80211: replaced Broadcom specific acronym WLC
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
WLC (caps) was replaced, wlc (small caps) has not been replaced yet.
--- drivers/staging/brcm80211/brcmfmac/dhd.h | 2 +- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 40 +- drivers/staging/brcm80211/brcmsmac/alloc.c | 15 +- drivers/staging/brcm80211/brcmsmac/ampdu.c | 44 +- drivers/staging/brcm80211/brcmsmac/antsel.c | 13 +- drivers/staging/brcm80211/brcmsmac/bmac.c | 138 +++--- drivers/staging/brcm80211/brcmsmac/channel.c | 206 ++++---- drivers/staging/brcm80211/brcmsmac/channel.h | 44 +- drivers/staging/brcm80211/brcmsmac/d11.h | 12 +- drivers/staging/brcm80211/brcmsmac/mac80211_if.c | 26 +- drivers/staging/brcm80211/brcmsmac/mac80211_if.h | 2 +- drivers/staging/brcm80211/brcmsmac/main.c | 595 +++++++++++----------- drivers/staging/brcm80211/brcmsmac/main.h | 155 +++--- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 106 ++-- drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h | 44 +- drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | 2 +- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 6 +- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 31 +- drivers/staging/brcm80211/brcmsmac/phy_shim.c | 4 +- drivers/staging/brcm80211/brcmsmac/phy_shim.h | 10 +- drivers/staging/brcm80211/brcmsmac/pub.h | 165 +++---- drivers/staging/brcm80211/brcmsmac/rate.c | 129 +++--- drivers/staging/brcm80211/brcmsmac/rate.h | 32 +- drivers/staging/brcm80211/brcmsmac/stf.c | 37 +- drivers/staging/brcm80211/brcmsmac/types.h | 30 +- drivers/staging/brcm80211/include/brcmu_wifi.h | 37 +- drivers/staging/brcm80211/include/defs.h | 26 +- 27 files changed, 995 insertions(+), 956 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd.h +1 -1
@@ -590,7 +590,7 @@ struct brcmf_pub {char *pktfilter[100 ];int pktfilter_count; -u8 country_code[WLC_CNTRY_BUF_SZ ]; +u8 country_code[BRCM_CNTRY_BUF_SZ ];char eventmask[BRCMF_EVENTING_MASK_LEN ]; };
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +20 -20
@@ -363,18 +363,18 @@ do { \ }static struct ieee80211_rate __wl_rates[] = { -RATETAB_ENT (WLC_RATE_1M ,0 ), -RATETAB_ENT (WLC_RATE_2M ,IEEE80211_RATE_SHORT_PREAMBLE ), -RATETAB_ENT (WLC_RATE_5M5 ,IEEE80211_RATE_SHORT_PREAMBLE ), -RATETAB_ENT (WLC_RATE_11M ,IEEE80211_RATE_SHORT_PREAMBLE ), -RATETAB_ENT (WLC_RATE_6M ,0 ), -RATETAB_ENT (WLC_RATE_9M ,0 ), -RATETAB_ENT (WLC_RATE_12M ,0 ), -RATETAB_ENT (WLC_RATE_18M ,0 ), -RATETAB_ENT (WLC_RATE_24M ,0 ), -RATETAB_ENT (WLC_RATE_36M ,0 ), -RATETAB_ENT (WLC_RATE_48M ,0 ), -RATETAB_ENT (WLC_RATE_54M ,0 ), +RATETAB_ENT (BRCM_RATE_1M ,0 ), +RATETAB_ENT (BRCM_RATE_2M ,IEEE80211_RATE_SHORT_PREAMBLE ), +RATETAB_ENT (BRCM_RATE_5M5 ,IEEE80211_RATE_SHORT_PREAMBLE ), +RATETAB_ENT (BRCM_RATE_11M ,IEEE80211_RATE_SHORT_PREAMBLE ), +RATETAB_ENT (BRCM_RATE_6M ,0 ), +RATETAB_ENT (BRCM_RATE_9M ,0 ), +RATETAB_ENT (BRCM_RATE_12M ,0 ), +RATETAB_ENT (BRCM_RATE_18M ,0 ), +RATETAB_ENT (BRCM_RATE_24M ,0 ), +RATETAB_ENT (BRCM_RATE_36M ,0 ), +RATETAB_ENT (BRCM_RATE_48M ,0 ), +RATETAB_ENT (BRCM_RATE_54M ,0 ), };#define wl_a_rates (__wl_rates + 4)
@@ -895,7 +895,7 @@ static s32 brcmf_set_frag(struct net_device *dev, u32 frag_threshold)static s32 brcmf_set_retry (struct net_device *dev,u32 retry,bool l) {s32 err =0 ; -u32 cmd = (l ?WLC_SET_LRL :WLC_SET_SRL ); +u32 cmd = (l ?BRCM_SET_LRL :BRCM_SET_SRL ); retry =cpu_to_le32 (retry); err =brcmf_dev_ioctl (dev, cmd, &retry,sizeof (retry));
@@ -1025,7 +1025,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,else bcnprd =cpu_to_le32 (100 ); - err =brcmf_dev_ioctl (dev,WLC_SET_BCNPRD , &bcnprd,sizeof (bcnprd)); + err =brcmf_dev_ioctl (dev,BRCM_SET_BCNPRD , &bcnprd,sizeof (bcnprd));if (unlikely (err)) {WL_ERR ("WLC_SET_BCNPRD failed (%d)\n" , err); goto done;
@@ -1068,7 +1068,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,/* set channel for starter */ target_channel =cpu_to_le32 (cfg_priv->channel); - err =brcmf_dev_ioctl (dev,WLC_SET_CHANNEL , + err =brcmf_dev_ioctl (dev,BRCM_SET_CHANNEL , &target_channel,sizeof (target_channel));if (unlikely (err)) {WL_ERR ("WLC_SET_CHANNEL failed (%d)\n" , err);
@@ -2039,7 +2039,7 @@ brcmf_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,/* addr param is always NULL. ignore it */ /* Get current rateset */ - err =brcmf_dev_ioctl (dev,WLC_GET_CURR_RATESET , &rateset, + err =brcmf_dev_ioctl (dev,BRCM_GET_CURR_RATESET , &rateset,sizeof (rateset));if (unlikely (err)) {WL_ERR ("could not get current rateset (%d)\n" , err);
@@ -3755,7 +3755,7 @@ brcmf_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) } roamtrigger[0 ] =WL_ROAM_TRIGGER_LEVEL ; - roamtrigger[1 ] =WLC_BAND_ALL ; + roamtrigger[1 ] =BRCM_BAND_ALL ; err =brcmf_dev_ioctl (ndev,BRCMF_C_SET_ROAM_TRIGGER , (void *)roamtrigger,sizeof (roamtrigger));if (unlikely (err)) {
@@ -3764,7 +3764,7 @@ brcmf_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) } roam_delta[0 ] =WL_ROAM_DELTA ; - roam_delta[1 ] =WLC_BAND_ALL ; + roam_delta[1 ] =BRCM_BAND_ALL ; err =brcmf_dev_ioctl (ndev,BRCMF_C_SET_ROAM_DELTA , (void *)roam_delta,sizeof (roam_delta));if (unlikely (err)) {
@@ -3865,8 +3865,8 @@ static s32 wl_update_wiphybands(struct brcmf_cfg80211_priv *cfg_priv)s8 phy;s32 err =0 ; - err =brcmf_dev_ioctl (cfg_to_ndev (cfg_priv),WLC_GET_PHYLIST , &phy_list, -sizeof (phy_list)); + err =brcmf_dev_ioctl (cfg_to_ndev (cfg_priv),BRCM_GET_PHYLIST , + &phy_list,sizeof (phy_list));if (unlikely (err)) {WL_ERR ("error (%d)\n" , err);return err;
drivers/staging/brcm80211/brcmsmac/alloc.c +8 -7
@@ -36,11 +36,11 @@ static void brcms_c_tunables_init(struct brcms_tunables *tunables, uint devid) tunables->maxscb =MAXSCB ; tunables->ampdunummpdu =AMPDU_NUM_MPDU ; tunables->maxpktcb =MAXPKTCB ; - tunables->maxucodebss =WLC_MAX_UCODE_BSS ; - tunables->maxucodebss4 =WLC_MAX_UCODE_BSS4 ; + tunables->maxucodebss =BRCMS_MAX_UCODE_BSS ; + tunables->maxucodebss4 =BRCMS_MAX_UCODE_BSS4 ; tunables->maxbss =MAXBSS ; - tunables->datahiwat =WLC_DATAHIWAT ; - tunables->ampdudatahiwat =WLC_AMPDUDATAHIWAT ; + tunables->datahiwat =BRCMS_DATAHIWAT ; + tunables->ampdudatahiwat =BRCMS_AMPDUDATAHIWAT ; tunables->rxbnd =RXBND ; tunables->txsbnd =TXSBND ; }
@@ -169,7 +169,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) } wlc->modulecb = -kzalloc (sizeof (struct modulecb ) *WLC_MAXMODULES ,GFP_ATOMIC ); +kzalloc (sizeof (struct modulecb ) *BRCMS_MAXMODULES ,GFP_ATOMIC );if (wlc->modulecb ==NULL ) { *err =1009 ; goto fail;
@@ -189,13 +189,14 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)brcms_c_bsscfg_ID_assign (wlc, wlc->cfg); wlc->wsec_def_keys[0 ] = -kzalloc (sizeof (struct wsec_key ) *WLC_DEFAULT_KEYS ,GFP_ATOMIC ); +kzalloc (sizeof (struct wsec_key ) *BRCMS_DEFAULT_KEYS , +GFP_ATOMIC );if (wlc->wsec_def_keys[0 ] ==NULL ) { *err =1015 ; goto fail; }else {int i; -for (i =1 ; i <WLC_DEFAULT_KEYS ; i++) { +for (i =1 ; i <BRCMS_DEFAULT_KEYS ; i++) { wlc->wsec_def_keys[i] = (struct wsec_key *) ((unsigned long )wlc->wsec_def_keys[0 ] + (sizeof (struct wsec_key ) * i));
drivers/staging/brcm80211/brcmsmac/ampdu.c +22 -22
121 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/antsel.c +7 -6
@@ -31,11 +31,12 @@#define ANT_SELCFG_RX_DEF 3/* default rx antenna configuration */ /* useful macros */ -#define WLC_ANTSEL_11N_0 (ant) ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf) -#define WLC_ANTSEL_11N_1 (ant) (((ant) & ANT_SELCFG_MASK) & 0xf) -#define WLC_ANTIDX_11N (ant) (((WLC_ANTSEL_11N_0(ant)) << 2) + (WLC_ANTSEL_11N_1(ant))) -#define WLC_ANT_ISAUTO_11N (ant) (((ant) & ANT_SELCFG_AUTO) == ANT_SELCFG_AUTO) -#define WLC_ANTSEL_11N (ant) ((ant) & ANT_SELCFG_MASK) +#define BRCMS_ANTSEL_11N_0 (ant) ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf) +#define BRCMS_ANTSEL_11N_1 (ant) (((ant) & ANT_SELCFG_MASK) & 0xf) +#define BRCMS_ANTIDX_11N (ant) (((BRCMS_ANTSEL_11N_0(ant)) << 2) +\ + (BRCMS_ANTSEL_11N_1(ant))) +#define BRCMS_ANT_ISAUTO_11N (ant) (((ant) & ANT_SELCFG_AUTO) == ANT_SELCFG_AUTO) +#define BRCMS_ANTSEL_11N (ant) ((ant) & ANT_SELCFG_MASK)/* antenna switch */ /* defines for no boardlevel antenna diversity */
@@ -263,7 +264,7 @@ static u8 brcms_c_antsel_id2antcfg(struct antsel_info *asi, u8 id)/* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */ static u16 brcms_c_antsel_antcfg2antsel (struct antsel_info *asi,u8 ant_cfg) { -u8 idx =WLC_ANTIDX_11N (WLC_ANTSEL_11N (ant_cfg)); +u8 idx =BRCMS_ANTIDX_11N (BRCMS_ANTSEL_11N (ant_cfg));u16 mimo_antsel =0 ;if (asi->antsel_type == ANTSEL_2x4) {
drivers/staging/brcm80211/brcmsmac/bmac.c +69 -69
422 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/channel.c +107 -99
549 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/channel.h +27 -19
76 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/d11.h +6 -6
@@ -681,17 +681,17 @@ struct cck_phy_hdr {#define MIMO_PLCP_40MHZ 0x80/* 40 Hz frame */ #define MIMO_PLCP_AMPDU 0x08/* ampdu */ -#define WLC_GET_CCK_PLCP_LEN (plcp) (plcp[4] + (plcp[5] << 8)) -#define WLC_GET_MIMO_PLCP_LEN (plcp) (plcp[1] + (plcp[2] << 8)) -#define WLC_SET_MIMO_PLCP_LEN (plcp, len) \ +#define BRCMS_GET_CCK_PLCP_LEN (plcp) (plcp[4] + (plcp[5] << 8)) +#define BRCMS_GET_MIMO_PLCP_LEN (plcp) (plcp[1] + (plcp[2] << 8)) +#define BRCMS_SET_MIMO_PLCP_LEN (plcp, len) \ do { \ plcp[1] = len & 0xff; \ plcp[2] = ((len >> 8) & 0xff); \ } while (0); -#define WLC_SET_MIMO_PLCP_AMPDU (plcp) (plcp[3] |= MIMO_PLCP_AMPDU) -#define WLC_CLR_MIMO_PLCP_AMPDU (plcp) (plcp[3] &= ~MIMO_PLCP_AMPDU) -#define WLC_IS_MIMO_PLCP_AMPDU (plcp) (plcp[3] & MIMO_PLCP_AMPDU) +#define BRCMS_SET_MIMO_PLCP_AMPDU (plcp) (plcp[3] |= MIMO_PLCP_AMPDU) +#define BRCMS_CLR_MIMO_PLCP_AMPDU (plcp) (plcp[3] &= ~MIMO_PLCP_AMPDU) +#define BRCMS_IS_MIMO_PLCP_AMPDU (plcp) (plcp[3] & MIMO_PLCP_AMPDU)/* The dot11a PLCP header is 5 bytes. To simplify the software (so that we * don't need e.g. different tx DMA headers for 11a and 11b), the PLCP header has
drivers/staging/brcm80211/brcmsmac/mac80211_if.c +13 -13
@@ -248,7 +248,7 @@ ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,switch (type) {case NL80211_CHAN_HT20 :case NL80211_CHAN_NO_HT : - err =brcms_c_set (wl->wlc,WLC_SET_CHANNEL , chan->hw_value); + err =brcms_c_set (wl->wlc,BRCM_SET_CHANNEL , chan->hw_value);break ;case NL80211_CHAN_HT40MINUS :case NL80211_CHAN_HT40PLUS :
@@ -310,13 +310,13 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed) }if (changed &IEEE80211_CONF_CHANGE_RETRY_LIMITS ) {if (brcms_c_set - (wl->wlc,WLC_SET_SRL , + (wl->wlc,BRCM_SET_SRL , conf->short_frame_max_tx_count) <0 ) {wiphy_err (wiphy,"%s: Error setting srl\n" , __func__); err = -EIO ; goto config_out; } -if (brcms_c_set (wl->wlc,WLC_SET_LRL , +if (brcms_c_set (wl->wlc,BRCM_SET_LRL , conf->long_frame_max_tx_count) <0 ) {wiphy_err (wiphy,"%s: Error setting lrl\n" , __func__); err = -EIO ;
@@ -355,7 +355,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,else val =0 ;LOCK (wl); -brcms_c_set (wl->wlc,WLC_SET_SHORTSLOT_OVERRIDE , val); +brcms_c_set (wl->wlc,BRCMS_SET_SHORTSLOT_OVERRIDE , val);UNLOCK (wl); }
@@ -364,11 +364,11 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,u16 mode = info->ht_operation_mode;LOCK (wl); -brcms_c_protection_upd (wl->wlc,WLC_PROT_N_CFG , +brcms_c_protection_upd (wl->wlc,BRCMS_PROT_N_CFG , mode &IEEE80211_HT_OP_MODE_PROTECTION ); -brcms_c_protection_upd (wl->wlc,WLC_PROT_N_NONGF , +brcms_c_protection_upd (wl->wlc,BRCMS_PROT_N_NONGF , mode &IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT ); -brcms_c_protection_upd (wl->wlc,WLC_PROT_N_OBSS , +brcms_c_protection_upd (wl->wlc,BRCMS_PROT_N_OBSS , mode &IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT );UNLOCK (wl); }
@@ -381,7 +381,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,/* retrieve the current rates */ LOCK (wl); - error =brcms_c_ioctl (wl->wlc,WLC_GET_CURR_RATESET , + error =brcms_c_ioctl (wl->wlc,BRCM_GET_CURR_RATESET , &rs,sizeof (rs),NULL );UNLOCK (wl);if (error) {
@@ -402,13 +402,13 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,/* update the rate set */ LOCK (wl); -brcms_c_ioctl (wl->wlc,WLC_SET_RATESET , &rs,sizeof (rs),NULL ); +brcms_c_ioctl (wl->wlc,BRCM_SET_RATESET , &rs,sizeof (rs),NULL );UNLOCK (wl); }if (changed &BSS_CHANGED_BEACON_INT ) {/* Beacon interval changed */ LOCK (wl); -brcms_c_set (wl->wlc,WLC_SET_BCNPRD , info->beacon_int); +brcms_c_set (wl->wlc,BRCM_SET_BCNPRD , info->beacon_int);UNLOCK (wl); }if (changed &BSS_CHANGED_BSSID ) {
@@ -1045,7 +1045,7 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw) hw->wiphy->bands[IEEE80211_BAND_2GHZ ] =NULL ; hw->wiphy->bands[IEEE80211_BAND_5GHZ ] =NULL ; -if (brcms_c_get (wl->wlc,WLC_GET_PHYLIST , (int *)&phy_list) <0 ) +if (brcms_c_get (wl->wlc,BRCM_GET_PHYLIST , (int *)&phy_list) <0 )wiphy_err (hw->wiphy,"Phy list failed\n" );if (phy_list[0 ] =='n' || phy_list[0 ] =='c' ) {
@@ -1382,9 +1382,9 @@ static void brcms_set_basic_rate(struct wl_rateset *rs, u16 rate, bool is_br)continue ;if (is_br) - rs->rates[i] |=WLC_RATE_FLAG ; + rs->rates[i] |=BRCMS_RATE_FLAG ;else - rs->rates[i] &=WLC_RATE_MASK ; + rs->rates[i] &=BRCMS_RATE_MASK ;return ; } }
drivers/staging/brcm80211/brcmsmac/mac80211_if.h +1 -1
@@ -21,7 +21,7 @@#include <linux/interrupt.h> /* softmac ioctl definitions */ -#define WLC_SET_SHORTSLOT_OVERRIDE 146 +#define BRCMS_SET_SHORTSLOT_OVERRIDE 146/* BMAC Note: High-only driver is no longer working in softirq context as it needs to block and
drivers/staging/brcm80211/brcmsmac/main.c +297 -298
1,554 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/main.h +85 -70
155 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +52 -54
106 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +22 -22
44 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +15 -16
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy_shim.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/phy_shim.h +5 -5
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/pub.h +79 -86
165 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/rate.c +68 -61
129 lines not on this page · raw message
drivers/staging/brcm80211/brcmsmac/rate.h +17 -15
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/stf.c +19 -18
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmsmac/types.h +18 -12
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/include/brcmu_wifi.h +19 -18
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/include/defs.h +13 -13
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.4.1
Part of the diff is not shown here. View the raw message.
PATCH 20/31 staging: brcm80211: deleted two fullmac source files
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
Having both a 'generic' as a 'linux' specific variant of a file makes no sense in a Linux environment. Merged bcmsdh_sdmmc_linux.c into bcmsdh_sdmmc.c, and bcmsdh_linux.c into bcmsdh.c.
--- drivers/staging/brcm80211/brcmfmac/Makefile | 4 +- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 150 +++++++++++- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 178 ------------- drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 246 ++++++++++++++++++- .../brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c | 260 -------------------- 5 files changed, 394 insertions(+), 444 deletions(-) delete mode 100644 drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c delete mode 100644 drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c
drivers/staging/brcm80211/brcmfmac/Makefile +1 -3
@@ -33,9 +33,7 @@ DHDOFILES = \ dhd_sdio.o \ dhd_linux.o \ bcmsdh.o \ - bcmsdh_linux.o \ - bcmsdh_sdmmc.o \ - bcmsdh_sdmmc_linux.o + bcmsdh_sdmmc.o obj-$(CONFIG_BRCMFMAC) += brcmfmac.o brcmfmac-objs += $(DHDOFILES)
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +149 -1
188 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c deleted +0 -178
178 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +244 -2
281 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c deleted +0 -260
260 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 21/31 staging: brcm80211: merged dngl_stats.h into dhd.h
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 1 - drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 1 - drivers/staging/brcm80211/brcmfmac/dhd.h | 12 ++++++++ drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | 1 - drivers/staging/brcm80211/brcmfmac/dhd_common.c | 1 - drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 1 - drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 1 - drivers/staging/brcm80211/brcmfmac/dngl_stats.h | 32 --------------------- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 1 - 9 files changed, 12 insertions(+), 39 deletions(-) delete mode 100644 drivers/staging/brcm80211/brcmfmac/dngl_stats.h
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +0 -1
@@ -29,7 +29,6 @@#include <soc.h> #include "bcmsdbus.h" /* common SDIO/controller interface */ #include "sbsdio.h" /* BRCM sdio device core */ -#include "dngl_stats.h" #include "dhd.h" #include "dhd_bus.h" #include "sdio_host.h"
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +0 -1
@@ -31,7 +31,6 @@#include <brcmu_wifi.h> #include "sdio_host.h" #include "bcmsdbus.h" -#include "dngl_stats.h" #include "dhd.h" #include "dhd_dbg.h" #include "wl_cfg80211.h"
drivers/staging/brcm80211/brcmfmac/dhd.h +12 -0
@@ -161,6 +161,18 @@ struct brcmf_event {struct brcmf_event_msg msg; } __packed; +struct dngl_stats { +unsigned long rx_packets;/* total packets received */ +unsigned long tx_packets;/* total packets transmitted */ +unsigned long rx_bytes;/* total bytes received */ +unsigned long tx_bytes;/* total bytes transmitted */ +unsigned long rx_errors;/* bad packets received */ +unsigned long tx_errors;/* packet transmit problems */ +unsigned long rx_dropped;/* packets dropped by dongle */ +unsigned long tx_dropped;/* packets dropped by dongle */ +unsigned long multicast;/* multicast packets received */ +}; +#define BRCMF_E_SET_SSID 0#define BRCMF_E_JOIN 1#define BRCMF_E_START 2
drivers/staging/brcm80211/brcmfmac/dhd_cdc.c +0 -1
@@ -22,7 +22,6 @@#include <brcmu_utils.h> #include <brcmu_wifi.h> -#include "dngl_stats.h" #include "dhd.h" #include "dhd_proto.h" #include "dhd_bus.h"
drivers/staging/brcm80211/brcmfmac/dhd_common.c +0 -1
@@ -21,7 +21,6 @@#include <defs.h> #include <brcmu_wifi.h> #include <brcmu_utils.h> -#include "dngl_stats.h" #include "dhd.h" #include "dhd_bus.h" #include "dhd_proto.h"
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +0 -1
@@ -33,7 +33,6 @@#include <brcmu_utils.h> #include <brcmu_wifi.h> -#include "dngl_stats.h" #include "dhd.h" #include "dhd_bus.h" #include "dhd_proto.h"
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +0 -1
@@ -152,7 +152,6 @@ struct rte_console {#include "sbsdio.h" -#include "dngl_stats.h" #include "dhd.h" #include "dhd_bus.h" #include "dhd_proto.h"
drivers/staging/brcm80211/brcmfmac/dngl_stats.h deleted +0 -32
@@ -1,32 +0,0 @@ -/* -* Copyright (c) 2010 Broadcom Corporation -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef _dngl_stats_h_ -#define _dngl_stats_h_ - -struct dngl_stats { -unsigned long rx_packets;/* total packets received */ -unsigned long tx_packets;/* total packets transmitted */ -unsigned long rx_bytes;/* total bytes received */ -unsigned long tx_bytes;/* total bytes transmitted */ -unsigned long rx_errors;/* bad packets received */ -unsigned long tx_errors;/* packet transmit problems */ -unsigned long rx_dropped;/* packets dropped by dongle */ -unsigned long tx_dropped;/* packets dropped by dongle */ -unsigned long multicast;/* multicast packets received */ -}; - -#endif /* _dngl_stats_h_ */
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +0 -1
@@ -31,7 +31,6 @@#include <brcmu_utils.h> #include <defs.h> #include <brcmu_wifi.h> -#include "dngl_stats.h" #include "dhd.h" #include "wl_cfg80211.h"
Signature · 1 line
1.7.4.1
PATCH 22/31 staging: brcm80211: merged sbsdio.h into sdio_host.h
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 1 - drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 2 - drivers/staging/brcm80211/brcmfmac/sbsdio.h | 277 ------------------------ drivers/staging/brcm80211/brcmfmac/sdio_host.h | 258 ++++++++++++++++++++++ 4 files changed, 258 insertions(+), 280 deletions(-) delete mode 100644 drivers/staging/brcm80211/brcmfmac/sbsdio.h
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +0 -1
@@ -28,7 +28,6 @@#include <brcmu_wifi.h> #include <soc.h> #include "bcmsdbus.h" /* common SDIO/controller interface */ -#include "sbsdio.h" /* BRCM sdio device core */ #include "dhd.h" #include "dhd_bus.h" #include "sdio_host.h"
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +0 -2
@@ -150,8 +150,6 @@ struct rte_console {#endif /* BCMDBG */ #include <chipcommon.h> -#include "sbsdio.h" -#include "dhd.h" #include "dhd_bus.h" #include "dhd_proto.h"
drivers/staging/brcm80211/brcmfmac/sbsdio.h deleted +0 -277
277 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/sdio_host.h +258 -0
267 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 23/31 staging: brcm80211: merged bcmsdbus.h into sdio_host.h
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
--- drivers/staging/brcm80211/brcmfmac/bcmsdbus.h | 190 --------------------- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 1 - drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 51 ++++++- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 1 - drivers/staging/brcm80211/brcmfmac/sdio_host.h | 117 +++++++++++++ 5 files changed, 167 insertions(+), 193 deletions(-) delete mode 100644 drivers/staging/brcm80211/brcmfmac/bcmsdbus.h
drivers/staging/brcm80211/brcmfmac/bcmsdbus.h deleted +0 -190
@@ -1,190 +0,0 @@ -/* -* Copyright (c) 2010 Broadcom Corporation -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef _sdio_api_h_ -#define _sdio_api_h_ - -#include "sdio_host.h" - -#define SDIOH_READ 0/* Read request */ -#define SDIOH_WRITE 1/* Write request */ - -#define SDIOH_DATA_FIX 0/* Fixed addressing */ -#define SDIOH_DATA_INC 1/* Incremental addressing */ - -#define SDIOH_CMD_TYPE_NORMAL 0/* Normal command */ -#define SDIOH_CMD_TYPE_APPEND 1/* Append command */ -#define SDIOH_CMD_TYPE_CUTTHRU 2/* Cut-through command */ - -#define SDIOH_DATA_PIO 0/* PIO mode */ -#define SDIOH_DATA_DMA 1/* DMA mode */ - -/* internal return code */ -#define SUCCESS 0 -#define ERROR 1 - -/* Common msglevel constants */ -#define SDH_ERROR_VAL 0x0001/* Error */ -#define SDH_TRACE_VAL 0x0002/* Trace */ -#define SDH_INFO_VAL 0x0004/* Info */ -#define SDH_DEBUG_VAL 0x0008/* Debug */ -#define SDH_DATA_VAL 0x0010/* Data */ -#define SDH_CTRL_VAL 0x0020/* Control Regs */ -#define SDH_LOG_VAL 0x0040/* Enable bcmlog */ -#define SDH_DMA_VAL 0x0080/* DMA */ - -#ifdef BCMDBG -#define sd_err (x) \ - do { \ - if ((sd_msglevel & SDH_ERROR_VAL) && net_ratelimit()) \ - printk x; \ - } while (0) -#define sd_trace (x) \ - do { \ - if ((sd_msglevel & SDH_TRACE_VAL) && net_ratelimit()) \ - printk x; \ - } while (0) -#define sd_info (x) \ - do { \ - if ((sd_msglevel & SDH_INFO_VAL) && net_ratelimit()) \ - printk x; \ - } while (0) -#define sd_debug (x) \ - do { \ - if ((sd_msglevel & SDH_DEBUG_VAL) && net_ratelimit()) \ - printk x; \ - } while (0) -#define sd_data (x) \ - do { \ - if ((sd_msglevel & SDH_DATA_VAL) && net_ratelimit()) \ - printk x; \ - } while (0) -#define sd_ctrl (x) \ - do { \ - if ((sd_msglevel & SDH_CTRL_VAL) && net_ratelimit()) \ - printk x; \ - } while (0) -#else -#define sd_err (x) -#define sd_trace (x) -#define sd_info (x) -#define sd_debug (x) -#define sd_data (x) -#define sd_ctrl (x) -#endif - -struct brcmf_sdreg { -int func; -int offset; -int value; -}; - -struct sdioh_info { -struct osl_info *osh;/* osh handler */ -bool client_intr_enabled;/* interrupt connnected flag */ -bool intr_handler_valid;/* client driver interrupt handler valid */ -void (*intr_handler)(void *);/* registered interrupt handler */ -void *intr_handler_arg;/* argument to call interrupt handler */ -u16 intmask;/* Current active interrupts */ -void *sdos_info;/* Pointer to per-OS private data */ - -uint irq;/* Client irq */ -int intrcount;/* Client interrupts */ -bool sd_blockmode;/* sd_blockmode == false => 64 Byte Cmd 53s. */ -/* Must be on for sd_multiblock to be effective */ -bool use_client_ints;/* If this is false, make sure to restore */ -int client_block_size[SDIOD_MAX_IOFUNCS ];/* Blocksize */ -u8 num_funcs;/* Supported funcs on client */ -u32 com_cis_ptr; -u32 func_cis_ptr[SDIOD_MAX_IOFUNCS ]; -uint max_dma_len; -uint max_dma_descriptors;/* DMA Descriptors supported by this controller. */ -/* SDDMA_DESCRIPTOR SGList[32]; *//* Scatter/Gather DMA List */ -}; - -struct brcmf_sdmmc_instance { -struct sdioh_info *sd; -struct sdio_func *func[SDIOD_MAX_IOFUNCS ]; -u32 host_claimed; -}; - -/* Allocate/init/free per-OS private data */ -extern int brcmf_sdioh_osinit (struct sdioh_info *sd); -extern void brcmf_sdioh_osfree (struct sdioh_info *sd); - -/* Core interrupt enable/disable of device interrupts */ -extern void brcmf_sdioh_dev_intr_on (struct sdioh_info *sd); -extern void brcmf_sdioh_dev_intr_off (struct sdioh_info *sd); - -/* attach, return handler on success, NULL if failed. -* The handler shall be provided by all subsequent calls. No local cache -* cfghdl points to the starting address of pci device mapped memory -*/ -extern struct sdioh_info *brcmf_sdioh_attach (void *cfghdl,uint irq); -extern int brcmf_sdioh_detach (struct sdioh_info *si); - -extern int -brcmf_sdioh_interrupt_register (struct sdioh_info *si, -void (*sdioh_cb_fn)(void *),void *argh); - -extern int brcmf_sdioh_interrupt_deregister (struct sdioh_info *si); - -/* enable or disable SD interrupt */ -extern int -brcmf_sdioh_interrupt_set (struct sdioh_info *si,bool enable_disable); - -/* read or write one byte using cmd52 */ -extern int -brcmf_sdioh_request_byte (struct sdioh_info *si,uint rw,uint fnc,uint addr, -u8 *byte); - -/* read or write 2/4 bytes using cmd53 */ -extern int -brcmf_sdioh_request_word (struct sdioh_info *si,uint cmd_type, -uint rw,uint fnc,uint addr, -u32 *word,uint nbyte); - -/* read or write any buffer using cmd53 */ -extern int -brcmf_sdioh_request_buffer (struct sdioh_info *si,uint pio_dma, -uint fix_inc,uint rw,uint fnc_num, -u32 addr,uint regwidth, -u32 buflen,u8 *buffer,struct sk_buff *pkt); - -/* get cis data */ -extern int -brcmf_sdioh_cis_read (struct sdioh_info *si,uint fuc,u8 *cis,u32 length); - -extern int -brcmf_sdioh_cfg_read (struct sdioh_info *si,uint fuc,u32 addr,u8 *data); -extern int -brcmf_sdioh_cfg_write (struct sdioh_info *si,uint fuc,u32 addr,u8 *data); - -/* handle iovars */ -extern int brcmf_sdioh_iovar_op (struct sdioh_info *si,const char *name, -void *params,int plen,void *arg,int len,bool set); - -/* Issue abort to the specified function and clear controller as needed */ -extern int brcmf_sdioh_abort (struct sdioh_info *si,uint fnc); - -/* Watchdog timer interface for pm ops */ -extern void brcmf_sdio_wdtmr_enable (bool enable); - -extern uint sd_msglevel;/* Debug message level */ - -extern struct brcmf_sdmmc_instance *gInstance; - -#endif /* _sdio_api_h_ */
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +0 -1
@@ -27,7 +27,6 @@#include <brcmu_utils.h> #include <brcmu_wifi.h> #include <soc.h> -#include "bcmsdbus.h" /* common SDIO/controller interface */ #include "dhd.h" #include "dhd_bus.h" #include "sdio_host.h"
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +50 -1
63 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +0 -1
@@ -32,7 +32,6 @@#include <brcm_hw_ids.h> #include <soc.h> #include "sdio_host.h" -#include "bcmsdbus.h" /* register access macros */ #ifndef __BIG_ENDIAN
drivers/staging/brcm80211/brcmfmac/sdio_host.h +117 -0
130 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 24/31 staging: brcm80211: moved fullmac definitions from .h to .c files
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
And deleted unused definitions. Improves code since it makes clear that the definitions are only used by a specific .c file.
--- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 7 + drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 97 ++++++++++ drivers/staging/brcm80211/brcmfmac/sdio_host.h | 223 ------------------------ 3 files changed, 104 insertions(+), 223 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +7 -0
@@ -58,6 +58,13 @@/* debugging macros */ #define SDLX_MSG (x) +#define SDIOH_CMD_TYPE_NORMAL 0/* Normal command */ +#define SDIOH_CMD_TYPE_APPEND 1/* Append command */ +#define SDIOH_CMD_TYPE_CUTTHRU 2/* Cut-through command */ + +#define SDIOH_DATA_PIO 0/* PIO mode */ +#define SDIOH_DATA_DMA 1/* DMA mode */ +struct brcmf_sdio_card {bool init_success;/* underlying driver successfully attached */ void *sdioh;/* handler for sdioh */
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +97 -0
107 lines not on this page · raw message
drivers/staging/brcm80211/brcmfmac/sdio_host.h +0 -223
241 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 25/31 staging: brcm80211: removed #ifdef SDIOH_API_ACCESS_RETRY_LIMIT
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
SDIOH_API_ACCESS_RETRY_LIMIT is always defined.
--- drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +0 -12
@@ -189,26 +189,20 @@ u8 brcmf_sdcard_cfg_read(struct brcmf_sdio_card *card, uint fnc_num, u32 addr, int *err) {int status; -#ifdef SDIOH_API_ACCESS_RETRY_LIMIT s32 retry =0 ; -#endif u8 data =0 ;if (!card) card = l_card; -#ifdef SDIOH_API_ACCESS_RETRY_LIMIT do {if (retry)/* wait for 1 ms till bus get settled down */ udelay (1000 ); -#endif status =brcmf_sdioh_cfg_read (card->sdioh, fnc_num, addr, (u8 *) &data); -#ifdef SDIOH_API_ACCESS_RETRY_LIMIT }while (status !=0 && (retry++ <SDIOH_API_ACCESS_RETRY_LIMIT )); -#endif if (err) *err = status;
@@ -223,25 +217,19 @@ brcmf_sdcard_cfg_write(struct brcmf_sdio_card *card, uint fnc_num, u32 addr, u8 data, int *err) { int status; -#ifdef SDIOH_API_ACCESS_RETRY_LIMIT s32 retry =0 ; -#endif if (!card) card = l_card; -#ifdef SDIOH_API_ACCESS_RETRY_LIMITdo {if (retry)/* wait for 1 ms till bus get settled down */ udelay (1000 ); -#endif status =brcmf_sdioh_cfg_write (card->sdioh, fnc_num, addr, (u8 *) &data); -#ifdef SDIOH_API_ACCESS_RETRY_LIMIT }while (status !=0 && (retry++ <SDIOH_API_ACCESS_RETRY_LIMIT )); -#endifif (err) *err = status;
Signature · 1 line
1.7.4.1
PATCH 26/31 staging: brcm80211: replace occurrences of __attribute__((packed))
In reply to Arend van SprielOne of the checkpatch warning on this driver is about usage of the __attribute__ keyword. This patch changes this to using the __packed keyword.
--- drivers/staging/brcm80211/brcmsmac/d11.h | 14 +++++++------- drivers/staging/brcm80211/brcmsmac/main.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/brcm80211/brcmsmac/d11.h +7 -7
@@ -625,7 +625,7 @@ struct ofdm_phy_hdr {u8 rlpt[3 ];/* rate, length, parity, tail */ u16 service;u8 pad; -} __attribute__((packed)); +} __packed;#define D11A_PHY_HDR_GRATE (phdr) ((phdr)->rlpt[0] & 0x0f)#define D11A_PHY_HDR_GRES (phdr) (((phdr)->rlpt[0] >> 4) & 0x01)
@@ -660,7 +660,7 @@ struct cck_phy_hdr {u8 service;u16 length;u16 crc; -} __attribute__((packed)); +} __packed;#define D11B_PHY_HDR_LEN 6
@@ -735,7 +735,7 @@ struct d11txh {u8 RTSPhyHeader[D11_PHY_HDR_LEN ];/* 0x2c - 0x2e */ struct ieee80211_rts rts_frame;/* 0x2f - 0x36 */ u16 PAD ;/* 0x37 */ -} __attribute__((packed)); +} __packed;#define D11_TXH_LEN 112/* bytes */
@@ -852,7 +852,7 @@ struct tx_status {u16 sequence;u16 phyerr;u16 ackphyrxsh; -} __attribute__((packed)); +} __packed;#define TXSTATUS_LEN 16
@@ -1245,7 +1245,7 @@ struct shm_acparams {u16 reggap;u16 status;u16 rsvd[8 ]; -} __attribute__((packed)); +} __packed;#define M_EDCF_QLEN (16 * 2)#define WME_STATUS_NEWAC (1 << 8)
@@ -1306,7 +1306,7 @@ struct d11rxhdr {u16 RxStatus2;/* extended MAC Rx status */ u16 RxTSFTime;/* RxTSFTime time of first MAC symbol + M_PHY_PLCPRX_DLY */ u16 RxChan;/* gain code, channel radio code, and phy type */ -} __attribute__((packed)); +} __packed;#define RXHDR_LEN 24/* sizeof struct d11rxhdr */ #define FRAMELEN (h) ((h)->RxFrameSize)
@@ -1319,7 +1319,7 @@ struct brcms_d11rxhdr {s8 rxpwr1;/* obsoleted, place holder for legacy ROM code. use rxpwr[] */ s8 do_rssi_ma;/* do per-pkt sampling for per-antenna ma in HIGH */ s8 rxpwr[WL_RSSI_ANT_MAX ];/* rssi for supported antennas */ -} __attribute__((packed)); +} __packed;/* PhyRxStatus_0: */ #define PRXS0_FT_MASK 0x0003/* NPHY only: CCK, OFDM, preN, N */
drivers/staging/brcm80211/brcmsmac/main.h +2 -2
@@ -438,7 +438,7 @@ struct edcf_acparam {u8 ACI ;u8 ECW ;u16 TXOP ; -} __attribute__((packed)); +} __packed;struct wme_param_ie {u8 oui[3 ];
@@ -448,7 +448,7 @@ struct wme_param_ie {u8 qosinfo;u8 rsvd;struct edcf_acparam acparam[AC_COUNT ]; -} __attribute__((packed)); +} __packed;/* virtual interface */ struct brcms_c_if {
Signature · 1 line
1.7.4.1
PATCH 27/31 staging: brcm80211: remove several externs from dhd_linux.c
In reply to Arend van SprielThe script checkpatch.pl flagged for some extern variables in dhd_linux.c source. Several have been fixed in this patch. Two remaining are in macro conditional code that needs cleanup so they are not resolved here.
--- drivers/staging/brcm80211/brcmfmac/dhd_bus.h | 7 +++++++ drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_bus.h +7 -0
@@ -29,6 +29,13 @@* Exported from brcmf bus module (brcmf_usb, brcmf_sdio) */ +/* dongle ram module parameter */ +extern int brcmf_dongle_memsize; + +/* Tx/Rx bounds module parameters */ +extern uint brcmf_txbound; +extern uint brcmf_rxbound; +/* Watchdog timer interval */ extern uint brcmf_watchdog_ms;
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +0 -3
@@ -113,7 +113,6 @@ module_param(brcmf_pkt_filter_init, uint, 0);uint brcmf_master_mode = true;module_param (brcmf_master_mode, uint,1 ); -extern int brcmf_dongle_memsize;module_param (brcmf_dongle_memsize, int,0 );/* Contorl fw roaming */
@@ -148,8 +147,6 @@ uint brcmf_sdiod_drive_strength = 6;module_param (brcmf_sdiod_drive_strength, uint,0 );/* Tx/Rx bounds */ -extern uint brcmf_txbound; -extern uint brcmf_rxbound;module_param (brcmf_txbound, uint,0 );module_param (brcmf_rxbound, uint,0 );
Signature · 1 line
1.7.4.1
PATCH 28/31 staging: brcm80211: remove external definitions from phy_lcn.c
In reply to Arend van SprielThe source file phy_lcn.c had several external definitions flagged by checkpatch.pl script. The patch fixes those.
--- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 10 ++-------- .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.h | 2 ++ 2 files changed, 4 insertions(+), 8 deletions(-)
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +2 -8
@@ -535,12 +535,6 @@ static const s8 lcnphy_gain_index_offset_for_rssi[] = {-2 }; -extern const u8 spur_tbl_rev0[]; -extern const u32 dot11lcnphytbl_rx_gain_info_sz_rev1; -extern const struct phytbl_info dot11lcnphytbl_rx_gain_info_rev1[]; -extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa; -extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250; -struct chan_info_2064_lcnphy {uint chan;uint freq;
@@ -991,7 +985,7 @@ static bool wlc_lcnphy_rx_iq_est(struct brcms_phy *pi, u16 num_samps,static bool wlc_lcnphy_calc_rx_iq_comp (struct brcms_phy *pi,u16 num_samps);static u16 wlc_lcnphy_get_pa_gain (struct brcms_phy *pi);static void wlc_lcnphy_afe_clk_init (struct brcms_phy *pi,u8 mode); -extern void wlc_lcnphy_tx_pwr_ctrl_init (struct brcms_phy_pub *ppi); +static void wlc_lcnphy_tx_pwr_ctrl_init (struct brcms_phy_pub *ppi);static void wlc_lcnphy_radio_2064_channel_tune_4313 (struct brcms_phy *pi,u8 channel);
@@ -2275,7 +2269,7 @@ static void wlc_lcnphy_vbat_temp_sense_setup(struct brcms_phy *pi, u8 mode)udelay (999 ); } -void WLBANDINITFN (wlc_lcnphy_tx_pwr_ctrl_init ) (struct brcms_phy_pub *ppi) +static void WLBANDINITFN (wlc_lcnphy_tx_pwr_ctrl_init ) (struct brcms_phy_pub *ppi) {struct lcnphy_txgains tx_gains;u8 bbmult;
drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.h +2 -0
@@ -22,6 +22,8 @@ extern const u32 dot11lcnphytbl_rx_gain_info_sz_rev0;extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313;extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_epa;extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_epa_combo; +extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa; +extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250;extern const struct phytbl_info dot11lcnphytbl_info_rev0[];extern const u32 dot11lcnphytbl_info_sz_rev0;
Signature · 1 line
1.7.4.1
PATCH 29/31 staging: brcm80211: remove macro WLBANDINITFN from brcmsmac
In reply to Arend van SprielThe macro WLBANDINITFN does nothing meaningful in the brcmsmac driver and has been removed.
--- drivers/staging/brcm80211/brcmsmac/bmac.c | 12 ++++++------ drivers/staging/brcm80211/brcmsmac/main.c | 4 ++-- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 6 +++--- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 22 +++++++++++----------- drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 8 ++++---- drivers/staging/brcm80211/brcmsmac/types.h | 2 -- 6 files changed, 26 insertions(+), 28 deletions(-)
drivers/staging/brcm80211/brcmsmac/bmac.c +6 -6
@@ -176,7 +176,7 @@ static void brcms_b_update_slot_timing(struct brcms_hardware *wlc_hw, } } -static void WLBANDINITFN (brcms_c_ucode_bsinit ) (struct brcms_hardware *wlc_hw) +static void brcms_c_ucode_bsinit (struct brcms_hardware *wlc_hw) {struct wiphy *wiphy = wlc_hw->wlc->wiphy;
@@ -209,7 +209,7 @@ static void WLBANDINITFN(brcms_c_ucode_bsinit) (struct brcms_hardware *wlc_hw) }/* switch to new band but leave it inactive */ -static u32 WLBANDINITFN (brcms_c_setband_inact ) (struct brcms_c_info *wlc, +static u32 brcms_c_setband_inact (struct brcms_c_info *wlc,uint bandunit) {struct brcms_hardware *wlc_hw = wlc->hw;
@@ -1671,7 +1671,7 @@ brcms_b_write_hw_bcntemplates(struct brcms_hardware *wlc_hw, void *bcn, } } -static void WLBANDINITFN (brcms_b_upd_synthpu ) (struct brcms_hardware *wlc_hw) +static void brcms_b_upd_synthpu (struct brcms_hardware *wlc_hw) {u16 v;struct brcms_c_info *wlc = wlc_hw->wlc;
@@ -1690,7 +1690,7 @@ static void WLBANDINITFN(brcms_b_upd_synthpu) (struct brcms_hardware *wlc_hw)/* band-specific init */ static void -WLBANDINITFN (brcms_b_bsinit ) (struct brcms_c_info *wlc,chanspec_t chanspec) +brcms_b_bsinit (struct brcms_c_info *wlc,chanspec_t chanspec) {struct brcms_hardware *wlc_hw = wlc->hw;
@@ -1833,7 +1833,7 @@ void brcms_b_phy_reset(struct brcms_hardware *wlc_hw)/* switch to and initialize new band */ static void -WLBANDINITFN (brcms_b_setband ) (struct brcms_hardware *wlc_hw,uint bandunit, +brcms_b_setband (struct brcms_hardware *wlc_hw,uint bandunit,chanspec_t chanspec) {struct brcms_c_info *wlc = wlc_hw->wlc;u32 macintmask;
@@ -1870,7 +1870,7 @@ WLBANDINITFN(brcms_b_setband) (struct brcms_hardware *wlc_hw, uint bandunit, }/* low-level band switch utility routine */ -void WLBANDINITFN (brcms_c_setxband ) (struct brcms_hardware *wlc_hw, +void brcms_c_setxband (struct brcms_hardware *wlc_hw,uint bandunit) { BCMMSG(wlc_hw->wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit,
drivers/staging/brcm80211/brcmsmac/main.c +2 -2
@@ -1024,7 +1024,7 @@ static void brcms_c_bandinit_ordered(struct brcms_c_info *wlc, }/* band-specific init */ -static void WLBANDINITFN (brcms_c_bsinit ) (struct brcms_c_info *wlc) +static void brcms_c_bsinit (struct brcms_c_info *wlc) {BCMMSG (wlc->wiphy,"wl%d: bandunit %d\n" , wlc->pub->unit, wlc->band->bandunit);
@@ -1041,7 +1041,7 @@ static void WLBANDINITFN(brcms_c_bsinit) (struct brcms_c_info *wlc) }/* switch to and initialize new band */ -static void WLBANDINITFN (brcms_c_setband ) (struct brcms_c_info *wlc, +static void brcms_c_setband (struct brcms_c_info *wlc,uint bandunit) {int idx;
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +3 -3
@@ -433,7 +433,7 @@ void mod_phy_reg(struct brcms_phy *pi, u16 addr, u16 mask, u16 val) pi->phy_wreg =0 ; } -static void WLBANDINITFN (wlc_set_phy_uninitted ) (struct brcms_phy *pi) +static void wlc_set_phy_uninitted (struct brcms_phy *pi) {int i, j;
@@ -816,7 +816,7 @@ u32 wlc_phy_clk_bwbits(struct brcms_phy_pub *pih)return phy_bw_clkbits; } -void WLBANDINITFN (wlc_phy_por_inform ) (struct brcms_phy_pub *ppi) +void wlc_phy_por_inform (struct brcms_phy_pub *ppi) {struct brcms_phy *pi = (struct brcms_phy *) ppi;
@@ -862,7 +862,7 @@ void wlc_phy_hw_state_upd(struct brcms_phy_pub *pih, bool newstate) pi->sh->up = newstate; } -void WLBANDINITFN (wlc_phy_init ) (struct brcms_phy_pub *pih,chanspec_t chanspec) +void wlc_phy_init (struct brcms_phy_pub *pih,chanspec_t chanspec) {u32 mc;initfn_t phy_init =NULL ;
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +11 -11
@@ -2269,7 +2269,7 @@ static void wlc_lcnphy_vbat_temp_sense_setup(struct brcms_phy *pi, u8 mode)udelay (999 ); } -static void WLBANDINITFN (wlc_lcnphy_tx_pwr_ctrl_init ) (struct brcms_phy_pub *ppi) +static void wlc_lcnphy_tx_pwr_ctrl_init (struct brcms_phy_pub *ppi) {struct lcnphy_txgains tx_gains;u8 bbmult;
@@ -3585,7 +3585,7 @@ void wlc_lcnphy_get_tssi(struct brcms_phy *pi, s8 *ofdm_pwr, s8 *cck_pwr) } } -void WLBANDINITFN (wlc_phy_cal_init_lcnphy ) (struct brcms_phy *pi) +void wlc_phy_cal_init_lcnphy (struct brcms_phy *pi) {return ;
@@ -3677,7 +3677,7 @@ static void wlc_lcnphy_set_rx_iq_comp(struct brcms_phy *pi, u16 a, u16 b) } -void WLBANDINITFN (wlc_phy_init_lcnphy ) (struct brcms_phy *pi) +void wlc_phy_init_lcnphy (struct brcms_phy *pi) {u8 phybw40;struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;
@@ -4213,7 +4213,7 @@ wlc_lcnphy_tx_iqlo_loopback_cleanup(struct brcms_phy *pi, u16 *values_to_save) }static void -WLBANDINITFN (wlc_lcnphy_load_tx_gain_table ) (struct brcms_phy *pi, +wlc_lcnphy_load_tx_gain_table (struct brcms_phy *pi,const struct lcnphy_tx_gain_tbl_entry *gain_table) {u32 j;struct phytbl_info tab;
@@ -4297,7 +4297,7 @@ static void wlc_lcnphy_load_rfpower(struct brcms_phy *pi) } } -static void WLBANDINITFN (wlc_lcnphy_tbl_init ) (struct brcms_phy *pi) +static void wlc_lcnphy_tbl_init (struct brcms_phy *pi) {uint idx;u8 phybw40;
@@ -4392,7 +4392,7 @@ static void WLBANDINITFN(wlc_lcnphy_tbl_init) (struct brcms_phy *pi)wlc_lcnphy_clear_papd_comptable (pi); } -static void WLBANDINITFN (wlc_lcnphy_rev0_baseband_init ) (struct brcms_phy *pi) +static void wlc_lcnphy_rev0_baseband_init (struct brcms_phy *pi) {u16 afectrl1;struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;
@@ -4439,7 +4439,7 @@ static void WLBANDINITFN(wlc_lcnphy_rev0_baseband_init) (struct brcms_phy *pi) } -static void WLBANDINITFN (wlc_lcnphy_rev2_baseband_init ) (struct brcms_phy *pi) +static void wlc_lcnphy_rev2_baseband_init (struct brcms_phy *pi) {if (CHSPEC_IS5G (pi->radio_chanspec)) {mod_phy_reg (pi,0x416 , (0xff <<0 ),80 <<0 );
@@ -4509,7 +4509,7 @@ static void wlc_lcnphy_agc_temp_init(struct brcms_phy *pi) } -static void WLBANDINITFN (wlc_lcnphy_bu_tweaks ) (struct brcms_phy *pi) +static void wlc_lcnphy_bu_tweaks (struct brcms_phy *pi) {if (NORADIO_ENAB (pi->pubpi))return ;
@@ -4564,7 +4564,7 @@ static void WLBANDINITFN(wlc_lcnphy_bu_tweaks) (struct brcms_phy *pi) } } -static void WLBANDINITFN (wlc_lcnphy_baseband_init ) (struct brcms_phy *pi) +static void wlc_lcnphy_baseband_init (struct brcms_phy *pi) {wlc_lcnphy_tbl_init (pi);
@@ -4574,7 +4574,7 @@ static void WLBANDINITFN(wlc_lcnphy_baseband_init) (struct brcms_phy *pi)wlc_lcnphy_bu_tweaks (pi); } -static void WLBANDINITFN (wlc_radio_2064_init ) (struct brcms_phy *pi) +static void wlc_radio_2064_init (struct brcms_phy *pi) {u32 i;struct lcnphy_radio_regs *lcnphyregs =NULL ;
@@ -4635,7 +4635,7 @@ static void WLBANDINITFN(wlc_radio_2064_init) (struct brcms_phy *pi)wlc_lcnphy_rc_cal (pi); } -static void WLBANDINITFN (wlc_lcnphy_radio_init ) (struct brcms_phy *pi) +static void wlc_lcnphy_radio_init (struct brcms_phy *pi) {if (NORADIO_ENAB (pi->pubpi))return ;
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +4 -4
@@ -14216,7 +14216,7 @@ bool wlc_phy_bist_check_phy(struct brcms_phy_pub *pih)return false; } -static void WLBANDINITFN (wlc_phy_bphy_init_nphy ) (struct brcms_phy *pi) +static void wlc_phy_bphy_init_nphy (struct brcms_phy *pi) {u16 addr, val;
@@ -14273,7 +14273,7 @@ wlc_phy_table_read_nphy(struct brcms_phy *pi, u32 id, u32 len, u32 offset, }static void -WLBANDINITFN (wlc_phy_static_table_download_nphy ) (struct brcms_phy *pi) +wlc_phy_static_table_download_nphy (struct brcms_phy *pi) {uint idx;
@@ -14296,7 +14296,7 @@ WLBANDINITFN(wlc_phy_static_table_download_nphy) (struct brcms_phy *pi) } } -static void WLBANDINITFN (wlc_phy_tbl_init_nphy ) (struct brcms_phy *pi) +static void wlc_phy_tbl_init_nphy (struct brcms_phy *pi) {uint idx =0 ;u8 antswctrllut;
@@ -14524,7 +14524,7 @@ static void wlc_phy_txpwrctrl_config_nphy(struct brcms_phy *pi) pi->phy_5g_pwrgain = true; } -void WLBANDINITFN (wlc_phy_init_nphy ) (struct brcms_phy *pi) +void wlc_phy_init_nphy (struct brcms_phy *pi) {u16 val;u16 clip1_ths[2 ];
drivers/staging/brcm80211/brcmsmac/types.h +0 -2
@@ -244,8 +244,6 @@#define RXBND 8/* max # frames to process in brcms_c_recv() */ #define TXSBND 8/* max # tx status to process in wlc_txstatus() */ -#define WLBANDINITFN (_fn) _fn -#define BAND_5G (bt) ((bt) == BRCM_BAND_5G)#define BAND_2G (bt) ((bt) == BRCM_BAND_2G)
Signature · 1 line
1.7.4.1
PATCH 30/31 staging: brcm80211: simpler string handling in brcmf_c_pktfilter_offload_set()
In reply to Arend van SprielFrom: Roland Vossen <[email protected]>
Replaced two functions with strcpy().
--- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_common.c +2 -9
@@ -958,13 +958,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) goto fail; } -memcpy (arg_save, arg,strlen (arg) +1 ); - -if (strlen (arg) >PKTFILTER_BUF_SIZE ) { -BRCMF_ERROR (("Not enough buffer %d < %d\n" , (int )strlen (arg), - (int )sizeof (buf))); - goto fail; - } +strcpy (arg_save, arg); argv[i] =strsep (&arg_save," " );while (argv[i++])
@@ -977,9 +971,8 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) } str ="pkt_filter_add" ; +strcpy (buf, str); str_len =strlen (str); -strncpy (buf, str, str_len); - buf[str_len] ='\0' ; buf_len = str_len +1 ; pkt_filterp = (struct brcmf_pkt_filter *) (buf + str_len +1 );
Signature · 1 line
1.7.4.1
PATCH 31/31 staging: brcm80211: added newlines to some debug macros in bcmsdh_sdmmc.c
In reply to Arend van SprielSome macros were missing a terminating '\n' character. This commit fixes those.
--- drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +4 -4
@@ -220,7 +220,7 @@ static int brcmf_sdioh_enablefuncs(struct sdioh_info *sd)sdio_release_host (gInstance->func[1 ]);if (err_ret) {sd_err (("brcmf_sdioh_enablefuncs: Failed to enable F1 " -"Err: 0x%08x" , err_ret)); +"Err: 0x%08x\n" , err_ret)); }return false;
@@ -671,7 +671,7 @@ brcmf_sdioh_request_byte(struct sdioh_info *sd, uint rw, uint func,if (err_ret)sd_err (("request_byte: " "enable F2 " -"failed:%d" , +"failed:%d\n" , err_ret)); }else {/* Disable Function 2 */
@@ -681,7 +681,7 @@ brcmf_sdioh_request_byte(struct sdioh_info *sd, uint rw, uint func,if (err_ret)sd_err (("request_byte: " "Disab F2 " -"failed:%d" , +"failed:%d\n" , err_ret)); }sdio_release_host (gInstance->func[2 ]);
@@ -789,7 +789,7 @@ brcmf_sdioh_request_word(struct sdioh_info *sd, uint cmd_type, uint rw,sdio_release_host (gInstance->func[func]);if (err_ret) { -sd_err (("brcmf: Failed to %s word, Err: 0x%08x" , +sd_err (("brcmf: Failed to %s word, Err: 0x%08x\n" , rw ?"Write" :"Read" , err_ret)); }
Signature · 1 line
1.7.4.1