Commit 67ad48bc authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: cleaned up prefix for utility functions

Code cleanup. 'bcm' replaced by 'brcmu_', which is shorthand for
'Broadcom Utilities' (the 'brcmutil.ko' library module).
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3918ec2b
...@@ -352,7 +352,7 @@ enum { ...@@ -352,7 +352,7 @@ enum {
IOV_RXCHAIN IOV_RXCHAIN
}; };
const bcm_iovar_t sdioh_iovars[] = { const struct brcmu_iovar sdioh_iovars[] = {
{"sd_msglevel", IOV_MSGLEVEL, 0, IOVT_UINT32, 0}, {"sd_msglevel", IOV_MSGLEVEL, 0, IOVT_UINT32, 0},
{"sd_blocksize", IOV_BLOCKSIZE, 0, IOVT_UINT32, 0},/* ((fn << 16) | {"sd_blocksize", IOV_BLOCKSIZE, 0, IOVT_UINT32, 0},/* ((fn << 16) |
size) */ size) */
...@@ -369,7 +369,7 @@ int ...@@ -369,7 +369,7 @@ int
sdioh_iovar_op(sdioh_info_t *si, const char *name, sdioh_iovar_op(sdioh_info_t *si, const char *name,
void *params, int plen, void *arg, int len, bool set) void *params, int plen, void *arg, int len, bool set)
{ {
const bcm_iovar_t *vi = NULL; const struct brcmu_iovar *vi = NULL;
int bcmerror = 0; int bcmerror = 0;
int val_size; int val_size;
s32 int_val = 0; s32 int_val = 0;
...@@ -386,13 +386,13 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, ...@@ -386,13 +386,13 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
sd_trace(("%s: Enter (%s %s)\n", __func__, (set ? "set" : "get"), sd_trace(("%s: Enter (%s %s)\n", __func__, (set ? "set" : "get"),
name)); name));
vi = bcm_iovar_lookup(sdioh_iovars, name); vi = brcmu_iovar_lookup(sdioh_iovars, name);
if (vi == NULL) { if (vi == NULL) {
bcmerror = -ENOTSUPP; bcmerror = -ENOTSUPP;
goto exit; goto exit;
} }
bcmerror = bcm_iovar_lencheck(vi, arg, len, set); bcmerror = brcmu_iovar_lencheck(vi, arg, len, set);
if (bcmerror != 0) if (bcmerror != 0)
goto exit; goto exit;
...@@ -888,9 +888,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, ...@@ -888,9 +888,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
if (pkt == NULL) { if (pkt == NULL) {
sd_data(("%s: Creating new %s Packet, len=%d\n", sd_data(("%s: Creating new %s Packet, len=%d\n",
__func__, write ? "TX" : "RX", buflen_u)); __func__, write ? "TX" : "RX", buflen_u));
mypkt = bcm_pkt_buf_get_skb(buflen_u); mypkt = brcmu_pkt_buf_get_skb(buflen_u);
if (!mypkt) { if (!mypkt) {
sd_err(("%s: bcm_pkt_buf_get_skb failed: len %d\n", sd_err(("%s: brcmu_pkt_buf_get_skb failed: len %d\n",
__func__, buflen_u)); __func__, buflen_u));
return SDIOH_API_RC_FAIL; return SDIOH_API_RC_FAIL;
} }
...@@ -906,7 +906,7 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, ...@@ -906,7 +906,7 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
if (!write) if (!write)
memcpy(buffer, mypkt->data, buflen_u); memcpy(buffer, mypkt->data, buflen_u);
bcm_pkt_buf_free_skb(mypkt); brcmu_pkt_buf_free_skb(mypkt);
} else if (((u32) (pkt->data) & DMA_ALIGN_MASK) != 0) { } else if (((u32) (pkt->data) & DMA_ALIGN_MASK) != 0) {
/* Case 2: We have a packet, but it is unaligned. */ /* Case 2: We have a packet, but it is unaligned. */
...@@ -915,9 +915,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, ...@@ -915,9 +915,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
sd_data(("%s: Creating aligned %s Packet, len=%d\n", sd_data(("%s: Creating aligned %s Packet, len=%d\n",
__func__, write ? "TX" : "RX", pkt->len)); __func__, write ? "TX" : "RX", pkt->len));
mypkt = bcm_pkt_buf_get_skb(pkt->len); mypkt = brcmu_pkt_buf_get_skb(pkt->len);
if (!mypkt) { if (!mypkt) {
sd_err(("%s: bcm_pkt_buf_get_skb failed: len %d\n", sd_err(("%s: brcmu_pkt_buf_get_skb failed: len %d\n",
__func__, pkt->len)); __func__, pkt->len));
return SDIOH_API_RC_FAIL; return SDIOH_API_RC_FAIL;
} }
...@@ -933,7 +933,7 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, ...@@ -933,7 +933,7 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
if (!write) if (!write)
memcpy(pkt->data, mypkt->data, mypkt->len); memcpy(pkt->data, mypkt->data, mypkt->len);
bcm_pkt_buf_free_skb(mypkt); brcmu_pkt_buf_free_skb(mypkt);
} else { /* case 3: We have a packet and } else { /* case 3: We have a packet and
it is aligned. */ it is aligned. */
sd_data(("%s: Aligned %s Packet, direct DMA\n", sd_data(("%s: Aligned %s Packet, direct DMA\n",
......
...@@ -63,7 +63,7 @@ extern int dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name, ...@@ -63,7 +63,7 @@ extern int dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
bool set); bool set);
/* Add bus dump output to a buffer */ /* Add bus dump output to a buffer */
extern void dhd_bus_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf); extern void dhd_bus_dump(dhd_pub_t *dhdp, struct brcmu_strbuf *strbuf);
/* Clear any bus counters */ /* Clear any bus counters */
extern void dhd_bus_clearcounts(dhd_pub_t *dhdp); extern void dhd_bus_clearcounts(dhd_pub_t *dhdp);
......
...@@ -366,9 +366,9 @@ dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name, ...@@ -366,9 +366,9 @@ dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
return -ENOTSUPP; return -ENOTSUPP;
} }
void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf) void dhd_prot_dump(dhd_pub_t *dhdp, struct brcmu_strbuf *strbuf)
{ {
bcm_bprintf(strbuf, "Protocol CDC: reqid %d\n", dhdp->prot->reqid); brcmu_bprintf(strbuf, "Protocol CDC: reqid %d\n", dhdp->prot->reqid);
} }
void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, struct sk_buff *pktbuf) void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, struct sk_buff *pktbuf)
......
...@@ -485,7 +485,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -485,7 +485,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
bcn_li_dtim = 3; bcn_li_dtim = 3;
else else
bcn_li_dtim = dhd->dtim_skip; bcn_li_dtim = dhd->dtim_skip;
bcm_mkiovar("bcn_li_dtim", (char *)&bcn_li_dtim, brcmu_mkiovar("bcn_li_dtim", (char *)&bcn_li_dtim,
4, iovbuf, sizeof(iovbuf)); 4, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
...@@ -493,7 +493,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -493,7 +493,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
/* Disable build-in roaming to allowed \ /* Disable build-in roaming to allowed \
* supplicant to take of romaing * supplicant to take of romaing
*/ */
bcm_mkiovar("roam_off", (char *)&roamvar, 4, brcmu_mkiovar("roam_off", (char *)&roamvar, 4,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
...@@ -513,14 +513,14 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -513,14 +513,14 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
dhd_set_packet_filter(0, dhd); dhd_set_packet_filter(0, dhd);
/* restore pre-suspend setting for dtim_skip */ /* restore pre-suspend setting for dtim_skip */
bcm_mkiovar("bcn_li_dtim", (char *)&dhd->dtim_skip, brcmu_mkiovar("bcn_li_dtim", (char *)&dhd->dtim_skip,
4, iovbuf, sizeof(iovbuf)); 4, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
#ifdef CUSTOMER_HW2 #ifdef CUSTOMER_HW2
roamvar = 0; roamvar = 0;
bcm_mkiovar("roam_off", (char *)&roamvar, 4, iovbuf, brcmu_mkiovar("roam_off", (char *)&roamvar, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
...@@ -750,7 +750,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx) ...@@ -750,7 +750,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
} }
allmulti = cpu_to_le32(allmulti); allmulti = cpu_to_le32(allmulti);
if (!bcm_mkiovar if (!brcmu_mkiovar
("allmulti", (void *)&allmulti, sizeof(allmulti), buf, buflen)) { ("allmulti", (void *)&allmulti, sizeof(allmulti), buf, buflen)) {
DHD_ERROR(("%s: mkiovar failed for allmulti, datalen %d " DHD_ERROR(("%s: mkiovar failed for allmulti, datalen %d "
"buflen %u\n", dhd_ifname(&dhd->pub, ifidx), "buflen %u\n", dhd_ifname(&dhd->pub, ifidx),
...@@ -802,7 +802,7 @@ _dhd_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr) ...@@ -802,7 +802,7 @@ _dhd_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr)
int ret; int ret;
DHD_TRACE(("%s enter\n", __func__)); DHD_TRACE(("%s enter\n", __func__));
if (!bcm_mkiovar if (!brcmu_mkiovar
("cur_etheraddr", (char *)addr, ETH_ALEN, buf, 32)) { ("cur_etheraddr", (char *)addr, ETH_ALEN, buf, 32)) {
DHD_ERROR(("%s: mkiovar failed for cur_etheraddr\n", DHD_ERROR(("%s: mkiovar failed for cur_etheraddr\n",
dhd_ifname(&dhd->pub, ifidx))); dhd_ifname(&dhd->pub, ifidx)));
...@@ -2091,8 +2091,8 @@ int dhd_bus_start(dhd_pub_t *dhdp) ...@@ -2091,8 +2091,8 @@ int dhd_bus_start(dhd_pub_t *dhdp)
return -ENODEV; return -ENODEV;
} }
#ifdef EMBEDDED_PLATFORM #ifdef EMBEDDED_PLATFORM
bcm_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN, iovbuf, brcmu_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN,
sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
dhdcdc_query_ioctl(dhdp, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_query_ioctl(dhdp, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf));
memcpy(dhdp->eventmask, iovbuf, WL_EVENTING_MASK_LEN); memcpy(dhdp->eventmask, iovbuf, WL_EVENTING_MASK_LEN);
...@@ -2142,7 +2142,7 @@ dhd_iovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf, uint cmd_len, ...@@ -2142,7 +2142,7 @@ dhd_iovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf, uint cmd_len,
wl_ioctl_t ioc; wl_ioctl_t ioc;
int ret; int ret;
len = bcm_mkiovar(name, cmd_buf, cmd_len, buf, len); len = brcmu_mkiovar(name, cmd_buf, cmd_len, buf, len);
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
......
...@@ -61,7 +61,7 @@ extern int dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name, ...@@ -61,7 +61,7 @@ extern int dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
bool set); bool set);
/* Add prot dump output to a buffer */ /* Add prot dump output to a buffer */
extern void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf); extern void dhd_prot_dump(dhd_pub_t *dhdp, struct brcmu_strbuf *strbuf);
/* Update local copy of dongle statistics */ /* Update local copy of dongle statistics */
extern void dhd_prot_dstats(dhd_pub_t *dhdp); extern void dhd_prot_dstats(dhd_pub_t *dhdp);
......
...@@ -644,7 +644,7 @@ wl_dev_iovar_setbuf(struct net_device *dev, s8 * iovar, void *param, ...@@ -644,7 +644,7 @@ wl_dev_iovar_setbuf(struct net_device *dev, s8 * iovar, void *param,
{ {
s32 iolen; s32 iolen;
iolen = bcm_mkiovar(iovar, param, paramlen, bufptr, buflen); iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen);
BUG_ON(!iolen); BUG_ON(!iolen);
return wl_dev_ioctl(dev, WLC_SET_VAR, bufptr, iolen); return wl_dev_ioctl(dev, WLC_SET_VAR, bufptr, iolen);
...@@ -656,7 +656,7 @@ wl_dev_iovar_getbuf(struct net_device *dev, s8 * iovar, void *param, ...@@ -656,7 +656,7 @@ wl_dev_iovar_getbuf(struct net_device *dev, s8 * iovar, void *param,
{ {
s32 iolen; s32 iolen;
iolen = bcm_mkiovar(iovar, param, paramlen, bufptr, buflen); iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen);
BUG_ON(!iolen); BUG_ON(!iolen);
return wl_dev_ioctl(dev, WLC_GET_VAR, bufptr, buflen); return wl_dev_ioctl(dev, WLC_GET_VAR, bufptr, buflen);
...@@ -844,7 +844,8 @@ static s32 wl_dev_intvar_set(struct net_device *dev, s8 *name, s32 val) ...@@ -844,7 +844,8 @@ static s32 wl_dev_intvar_set(struct net_device *dev, s8 *name, s32 val)
s32 err = 0; s32 err = 0;
val = cpu_to_le32(val); val = cpu_to_le32(val);
len = bcm_mkiovar(name, (char *)(&val), sizeof(val), buf, sizeof(buf)); len = brcmu_mkiovar(name, (char *)(&val), sizeof(val), buf,
sizeof(buf));
BUG_ON(!len); BUG_ON(!len);
err = wl_dev_ioctl(dev, WLC_SET_VAR, buf, len); err = wl_dev_ioctl(dev, WLC_SET_VAR, buf, len);
...@@ -866,7 +867,7 @@ wl_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval) ...@@ -866,7 +867,7 @@ wl_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval)
s32 err = 0; s32 err = 0;
len = len =
bcm_mkiovar(name, (char *)(&data_null), 0, (char *)(&var), brcmu_mkiovar(name, (char *)(&data_null), 0, (char *)(&var),
sizeof(var.buf)); sizeof(var.buf));
BUG_ON(!len); BUG_ON(!len);
err = wl_dev_ioctl(dev, WLC_GET_VAR, &var, len); err = wl_dev_ioctl(dev, WLC_GET_VAR, &var, len);
...@@ -1519,7 +1520,7 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy, ...@@ -1519,7 +1520,7 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy,
else else
txpwrmw = (u16) dbm; txpwrmw = (u16) dbm;
err = wl_dev_intvar_set(ndev, "qtxpower", err = wl_dev_intvar_set(ndev, "qtxpower",
(s32) (bcm_mw_to_qdbm(txpwrmw))); (s32) (brcmu_mw_to_qdbm(txpwrmw)));
if (unlikely(err)) if (unlikely(err))
WL_ERR("qtxpower error (%d)\n", err); WL_ERR("qtxpower error (%d)\n", err);
wl->conf->tx_power = dbm; wl->conf->tx_power = dbm;
...@@ -1547,7 +1548,7 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) ...@@ -1547,7 +1548,7 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm)
} }
result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE); result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE);
*dbm = (s32) bcm_qdbm_to_mw(result); *dbm = (s32) brcmu_qdbm_to_mw(result);
done: done:
WL_TRACE("Exit\n"); WL_TRACE("Exit\n");
...@@ -2669,7 +2670,7 @@ wl_dev_bufvar_set(struct net_device *dev, s8 *name, s8 *buf, s32 len) ...@@ -2669,7 +2670,7 @@ wl_dev_bufvar_set(struct net_device *dev, s8 *name, s8 *buf, s32 len)
struct wl_priv *wl = ndev_to_wl(dev); struct wl_priv *wl = ndev_to_wl(dev);
u32 buflen; u32 buflen;
buflen = bcm_mkiovar(name, buf, len, wl->ioctl_buf, WL_IOCTL_LEN_MAX); buflen = brcmu_mkiovar(name, buf, len, wl->ioctl_buf, WL_IOCTL_LEN_MAX);
BUG_ON(!buflen); BUG_ON(!buflen);
return wl_dev_ioctl(dev, WLC_SET_VAR, wl->ioctl_buf, buflen); return wl_dev_ioctl(dev, WLC_SET_VAR, wl->ioctl_buf, buflen);
...@@ -2683,7 +2684,7 @@ wl_dev_bufvar_get(struct net_device *dev, s8 *name, s8 *buf, ...@@ -2683,7 +2684,7 @@ wl_dev_bufvar_get(struct net_device *dev, s8 *name, s8 *buf,
u32 len; u32 len;
s32 err = 0; s32 err = 0;
len = bcm_mkiovar(name, NULL, 0, wl->ioctl_buf, WL_IOCTL_LEN_MAX); len = brcmu_mkiovar(name, NULL, 0, wl->ioctl_buf, WL_IOCTL_LEN_MAX);
BUG_ON(!len); BUG_ON(!len);
err = wl_dev_ioctl(dev, WLC_GET_VAR, (void *)wl->ioctl_buf, err = wl_dev_ioctl(dev, WLC_GET_VAR, (void *)wl->ioctl_buf,
WL_IOCTL_LEN_MAX); WL_IOCTL_LEN_MAX);
...@@ -2801,7 +2802,7 @@ static s32 wl_update_bss_info(struct wl_priv *wl) ...@@ -2801,7 +2802,7 @@ static s32 wl_update_bss_info(struct wl_priv *wl)
{ {
struct wl_bss_info *bi; struct wl_bss_info *bi;
struct wlc_ssid *ssid; struct wlc_ssid *ssid;
struct bcm_tlv *tim; struct brcmu_tlv *tim;
u16 beacon_interval; u16 beacon_interval;
u8 dtim_period; u8 dtim_period;
size_t ie_len; size_t ie_len;
...@@ -2831,7 +2832,7 @@ static s32 wl_update_bss_info(struct wl_priv *wl) ...@@ -2831,7 +2832,7 @@ static s32 wl_update_bss_info(struct wl_priv *wl)
ie_len = bi->ie_length; ie_len = bi->ie_length;
beacon_interval = cpu_to_le16(bi->beacon_period); beacon_interval = cpu_to_le16(bi->beacon_period);
tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM); tim = brcmu_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
if (tim) if (tim)
dtim_period = tim->data[1]; dtim_period = tim->data[1];
else { else {
...@@ -3682,7 +3683,7 @@ wl_dongle_glom(struct net_device *ndev, u32 glom, u32 dongle_align) ...@@ -3682,7 +3683,7 @@ wl_dongle_glom(struct net_device *ndev, u32 glom, u32 dongle_align)
s32 err = 0; s32 err = 0;
/* Match Host and Dongle rx alignment */ /* Match Host and Dongle rx alignment */
bcm_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf, brcmu_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
...@@ -3690,7 +3691,7 @@ wl_dongle_glom(struct net_device *ndev, u32 glom, u32 dongle_align) ...@@ -3690,7 +3691,7 @@ wl_dongle_glom(struct net_device *ndev, u32 glom, u32 dongle_align)
goto dongle_glom_out; goto dongle_glom_out;
} }
/* disable glom option per default */ /* disable glom option per default */
bcm_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("txglom error (%d)\n", err); WL_ERR("txglom error (%d)\n", err);
...@@ -3708,7 +3709,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol) ...@@ -3708,7 +3709,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol)
s32 err = 0; s32 err = 0;
/* Set ARP offload */ /* Set ARP offload */
bcm_mkiovar("arpoe", (char *)&arpoe, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("arpoe", (char *)&arpoe, 4, iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (err) { if (err) {
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP)
...@@ -3718,7 +3719,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol) ...@@ -3718,7 +3719,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol)
goto dongle_offload_out; goto dongle_offload_out;
} }
bcm_mkiovar("arp_ol", (char *)&arp_ol, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("arp_ol", (char *)&arp_ol, 4, iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (err) { if (err) {
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP)
...@@ -3831,7 +3832,7 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode) ...@@ -3831,7 +3832,7 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode)
} }
/* set mode to allow pattern */ /* set mode to allow pattern */
bcm_mkiovar("pkt_filter_mode", (char *)&filter_mode, 4, iovbuf, brcmu_mkiovar("pkt_filter_mode", (char *)&filter_mode, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (err) { if (err) {
...@@ -3858,7 +3859,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev) ...@@ -3858,7 +3859,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev)
WL_TRACE("Enter\n"); WL_TRACE("Enter\n");
/* Setup event_msgs */ /* Setup event_msgs */
bcm_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf, brcmu_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_GET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_GET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
...@@ -3887,7 +3888,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev) ...@@ -3887,7 +3888,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev)
setbit(eventmask, WLC_E_JOIN_START); setbit(eventmask, WLC_E_JOIN_START);
setbit(eventmask, WLC_E_SCAN_COMPLETE); setbit(eventmask, WLC_E_SCAN_COMPLETE);
bcm_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf, brcmu_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
...@@ -3913,7 +3914,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) ...@@ -3913,7 +3914,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
* off to report link down * off to report link down
*/ */
if (roamvar) { if (roamvar) {
bcm_mkiovar("bcn_timeout", (char *)&bcn_timeout, brcmu_mkiovar("bcn_timeout", (char *)&bcn_timeout,
sizeof(bcn_timeout), iovbuf, sizeof(iovbuf)); sizeof(bcn_timeout), iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
...@@ -3927,7 +3928,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) ...@@ -3927,7 +3928,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
* to take care of roaming * to take care of roaming
*/ */
WL_INFO("Internal Roaming = %s\n", roamvar ? "Off" : "On"); WL_INFO("Internal Roaming = %s\n", roamvar ? "Off" : "On");
bcm_mkiovar("roam_off", (char *)&roamvar, brcmu_mkiovar("roam_off", (char *)&roamvar,
sizeof(roamvar), iovbuf, sizeof(iovbuf)); sizeof(roamvar), iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
......
...@@ -230,7 +230,8 @@ static int dev_wlc_intvar_set(struct net_device *dev, char *name, int val) ...@@ -230,7 +230,8 @@ static int dev_wlc_intvar_set(struct net_device *dev, char *name, int val)
uint len; uint len;
val = cpu_to_le32(val); val = cpu_to_le32(val);
len = bcm_mkiovar(name, (char *)(&val), sizeof(val), buf, sizeof(buf)); len = brcmu_mkiovar(name, (char *)(&val), sizeof(val), buf,
sizeof(buf));
ASSERT(len); ASSERT(len);
return dev_wlc_ioctl(dev, WLC_SET_VAR, buf, len); return dev_wlc_ioctl(dev, WLC_SET_VAR, buf, len);
...@@ -244,7 +245,7 @@ dev_iw_iovar_setbuf(struct net_device *dev, ...@@ -244,7 +245,7 @@ dev_iw_iovar_setbuf(struct net_device *dev,
{ {
int iolen; int iolen;
iolen = bcm_mkiovar(iovar, param, paramlen, bufptr, buflen); iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen);
ASSERT(iolen); ASSERT(iolen);
if (iolen == 0) if (iolen == 0)
...@@ -260,7 +261,7 @@ dev_iw_iovar_getbuf(struct net_device *dev, ...@@ -260,7 +261,7 @@ dev_iw_iovar_getbuf(struct net_device *dev,
{ {
int iolen; int iolen;
iolen = bcm_mkiovar(iovar, param, paramlen, bufptr, buflen); iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen);
ASSERT(iolen); ASSERT(iolen);
return dev_wlc_ioctl(dev, WLC_GET_VAR, bufptr, buflen); return dev_wlc_ioctl(dev, WLC_GET_VAR, bufptr, buflen);
...@@ -274,7 +275,7 @@ dev_wlc_bufvar_set(struct net_device *dev, char *name, char *buf, int len) ...@@ -274,7 +275,7 @@ dev_wlc_bufvar_set(struct net_device *dev, char *name, char *buf, int len)
static char ioctlbuf[MAX_WLIW_IOCTL_LEN]; static char ioctlbuf[MAX_WLIW_IOCTL_LEN];
uint buflen; uint buflen;
buflen = bcm_mkiovar(name, buf, len, ioctlbuf, sizeof(ioctlbuf)); buflen = brcmu_mkiovar(name, buf, len, ioctlbuf, sizeof(ioctlbuf));
ASSERT(buflen); ASSERT(buflen);
return dev_wlc_ioctl(dev, WLC_SET_VAR, ioctlbuf, buflen); return dev_wlc_ioctl(dev, WLC_SET_VAR, ioctlbuf, buflen);
...@@ -288,7 +289,7 @@ dev_wlc_bufvar_get(struct net_device *dev, char *name, char *buf, int buflen) ...@@ -288,7 +289,7 @@ dev_wlc_bufvar_get(struct net_device *dev, char *name, char *buf, int buflen)
int error; int error;
uint len; uint len;
len = bcm_mkiovar(name, NULL, 0, ioctlbuf, sizeof(ioctlbuf)); len = brcmu_mkiovar(name, NULL, 0, ioctlbuf, sizeof(ioctlbuf));
ASSERT(len); ASSERT(len);
error = error =
dev_wlc_ioctl(dev, WLC_GET_VAR, (void *)ioctlbuf, dev_wlc_ioctl(dev, WLC_GET_VAR, (void *)ioctlbuf,
...@@ -311,7 +312,7 @@ static int dev_wlc_intvar_get(struct net_device *dev, char *name, int *retval) ...@@ -311,7 +312,7 @@ static int dev_wlc_intvar_get(struct net_device *dev, char *name, int *retval)
uint data_null; uint data_null;
len = len =
bcm_mkiovar(name, (char *)(&data_null), 0, (char *)(&var), brcmu_mkiovar(name, (char *)(&data_null), 0, (char *)(&var),
sizeof(var.buf)); sizeof(var.buf));
ASSERT(len); ASSERT(len);
error = dev_wlc_ioctl(dev, WLC_GET_VAR, (void *)&var, len); error = dev_wlc_ioctl(dev, WLC_GET_VAR, (void *)&var, len);
...@@ -396,7 +397,7 @@ wl_iw_set_freq(struct net_device *dev, ...@@ -396,7 +397,7 @@ wl_iw_set_freq(struct net_device *dev,
if (fwrq->m > 4000 && fwrq->m < 5000) if (fwrq->m > 4000 && fwrq->m < 5000)
sf = WF_CHAN_FACTOR_4_G; sf = WF_CHAN_FACTOR_4_G;
chan = bcm_mhz2channel(fwrq->m, sf); chan = brcmu_mhz2channel(fwrq->m, sf);
} }
chan = cpu_to_le32(chan); chan = cpu_to_le32(chan);
...@@ -1447,11 +1448,11 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end, ...@@ -1447,11 +1448,11 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end,
event = *event_p; event = *event_p;
if (bi->ie_length) { if (bi->ie_length) {
bcm_tlv_t *ie; struct brcmu_tlv *ie;
u8 *ptr = ((u8 *) bi) + sizeof(wl_bss_info_t); u8 *ptr = ((u8 *) bi) + sizeof(wl_bss_info_t);
int ptr_len = bi->ie_length; int ptr_len = bi->ie_length;
ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID); ie = brcmu_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID);
if (ie) { if (ie) {
iwe.cmd = IWEVGENIE; iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2; iwe.u.data.length = ie->len + 2;
...@@ -1461,7 +1462,8 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end, ...@@ -1461,7 +1462,8 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end,
} }
ptr = ((u8 *) bi) + sizeof(wl_bss_info_t); ptr = ((u8 *) bi) + sizeof(wl_bss_info_t);
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) { while ((ie = brcmu_parse_tlvs(
ptr, ptr_len, DOT11_MNG_WPA_ID))) {
if (ie_is_wps_ie(((u8 **)&ie), &ptr, &ptr_len)) { if (ie_is_wps_ie(((u8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE; iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2; iwe.u.data.length = ie->len + 2;
...@@ -1474,7 +1476,8 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end, ...@@ -1474,7 +1476,8 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end,
ptr = ((u8 *) bi) + sizeof(wl_bss_info_t); ptr = ((u8 *) bi) + sizeof(wl_bss_info_t);
ptr_len = bi->ie_length; ptr_len = bi->ie_length;
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) { while ((ie = brcmu_parse_tlvs(
ptr, ptr_len, DOT11_MNG_WPA_ID))) {
if (ie_is_wpa_ie(((u8 **)&ie), &ptr, &ptr_len)) { if (ie_is_wpa_ie(((u8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE; iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2; iwe.u.data.length = ie->len + 2;
...@@ -2199,8 +2202,8 @@ wl_iw_set_txpow(struct net_device *dev, ...@@ -2199,8 +2202,8 @@ wl_iw_set_txpow(struct net_device *dev,
else else
txpwrmw = (u16) vwrq->value; txpwrmw = (u16) vwrq->value;
error = error = dev_wlc_intvar_set(dev, "qtxpower",
dev_wlc_intvar_set(dev, "qtxpower", (int)(bcm_mw_to_qdbm(txpwrmw))); (int)(brcmu_mw_to_qdbm(txpwrmw)));
return error; return error;
} }
...@@ -2224,7 +2227,7 @@ wl_iw_get_txpow(struct net_device *dev, ...@@ -2224,7 +2227,7 @@ wl_iw_get_txpow(struct net_device *dev,
disable = le32_to_cpu(disable); disable = le32_to_cpu(disable);
result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE); result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE);
vwrq->value = (s32) bcm_qdbm_to_mw(result); vwrq->value = (s32) brcmu_qdbm_to_mw(result);
vwrq->fixed = 0; vwrq->fixed = 0;
vwrq->disabled = vwrq->disabled =
(disable & (WL_RADIO_SW_DISABLE | WL_RADIO_HW_DISABLE)) ? 1 : 0; (disable & (WL_RADIO_SW_DISABLE | WL_RADIO_HW_DISABLE)) ? 1 : 0;
......
...@@ -103,11 +103,11 @@ typedef uint(*di_txactive_t) (struct dma_pub *dmah); ...@@ -103,11 +103,11 @@ typedef uint(*di_txactive_t) (struct dma_pub *dmah);
typedef void (*di_txrotate_t) (struct dma_pub *dmah); typedef void (*di_txrotate_t) (struct dma_pub *dmah);
typedef void (*di_counterreset_t) (struct dma_pub *dmah); typedef void (*di_counterreset_t) (struct dma_pub *dmah);
typedef uint(*di_ctrlflags_t) (struct dma_pub *dmah, uint mask, uint flags); typedef uint(*di_ctrlflags_t) (struct dma_pub *dmah, uint mask, uint flags);
typedef char *(*di_dump_t) (struct dma_pub *dmah, struct bcmstrbuf *b, typedef char *(*di_dump_t) (struct dma_pub *dmah, struct brcmu_strbuf *b,
bool dumpring); bool dumpring);
typedef char *(*di_dumptx_t) (struct dma_pub *dmah, struct bcmstrbuf *b, typedef char *(*di_dumptx_t) (struct dma_pub *dmah, struct brcmu_strbuf *b,
bool dumpring); bool dumpring);
typedef char *(*di_dumprx_t) (struct dma_pub *dmah, struct bcmstrbuf *b, typedef char *(*di_dumprx_t) (struct dma_pub *dmah, struct brcmu_strbuf *b,
bool dumpring); bool dumpring);
typedef uint(*di_rxactive_t) (struct dma_pub *dmah); typedef uint(*di_rxactive_t) (struct dma_pub *dmah);
typedef uint(*di_txpending_t) (struct dma_pub *dmah); typedef uint(*di_txpending_t) (struct dma_pub *dmah);
......
...@@ -988,7 +988,7 @@ sprom_read_pci(struct si_pub *sih, u16 *sprom, uint wordoff, ...@@ -988,7 +988,7 @@ sprom_read_pci(struct si_pub *sih, u16 *sprom, uint wordoff,
/* fixup the endianness so crc8 will pass */ /* fixup the endianness so crc8 will pass */
htol16_buf(buf, nwords * 2); htol16_buf(buf, nwords * 2);
if (bcm_crc8((u8 *) buf, nwords * 2, CRC8_INIT_VALUE) != if (brcmu_crc8((u8 *) buf, nwords * 2, CRC8_INIT_VALUE) !=
CRC8_GOOD_VALUE) { CRC8_GOOD_VALUE) {
/* DBG only pci always read srom4 first, then srom8/9 */ /* DBG only pci always read srom4 first, then srom8/9 */
err = 1; err = 1;
...@@ -1028,7 +1028,7 @@ static int otp_read_pci(struct si_pub *sih, u16 *buf, uint bufsz) ...@@ -1028,7 +1028,7 @@ static int otp_read_pci(struct si_pub *sih, u16 *buf, uint bufsz)
/* fixup the endianness so crc8 will pass */ /* fixup the endianness so crc8 will pass */
htol16_buf(buf, bufsz); htol16_buf(buf, bufsz);
if (bcm_crc8((u8 *) buf, SROM4_WORDS * 2, CRC8_INIT_VALUE) != if (brcmu_crc8((u8 *) buf, SROM4_WORDS * 2, CRC8_INIT_VALUE) !=
CRC8_GOOD_VALUE) { CRC8_GOOD_VALUE) {
err = 1; err = 1;
} }
......
...@@ -608,7 +608,7 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -608,7 +608,7 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
wl->pub->global_ampdu = &(scb->scb_ampdu); wl->pub->global_ampdu = &(scb->scb_ampdu);
wl->pub->global_ampdu->scb = scb; wl->pub->global_ampdu->scb = scb;
wl->pub->global_ampdu->max_pdu = 16; wl->pub->global_ampdu->max_pdu = 16;
bcm_pktq_init(&scb->scb_ampdu.txq, AMPDU_MAX_SCB_TID, brcmu_pktq_init(&scb->scb_ampdu.txq, AMPDU_MAX_SCB_TID,
AMPDU_MAX_SCB_TID * PKTQ_LEN_DEFAULT); AMPDU_MAX_SCB_TID * PKTQ_LEN_DEFAULT);
sta->ht_cap.ht_supported = true; sta->ht_cap.ht_supported = true;
......
...@@ -923,7 +923,7 @@ static void *_dma_rx(dma_info_t *di) ...@@ -923,7 +923,7 @@ static void *_dma_rx(dma_info_t *di)
if ((di->dma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) { if ((di->dma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) {
DMA_ERROR(("%s: dma_rx: bad frame length (%d)\n", DMA_ERROR(("%s: dma_rx: bad frame length (%d)\n",
di->name, len)); di->name, len));
bcm_pkt_buf_free_skb(head); brcmu_pkt_buf_free_skb(head);
di->dma.rxgiants++; di->dma.rxgiants++;
goto next_frame; goto next_frame;
} }
...@@ -971,7 +971,7 @@ static bool _dma_rxfill(dma_info_t *di) ...@@ -971,7 +971,7 @@ static bool _dma_rxfill(dma_info_t *di)
size to be allocated size to be allocated
*/ */
p = bcm_pkt_buf_get_skb(di->rxbufsize + extra_offset); p = brcmu_pkt_buf_get_skb(di->rxbufsize + extra_offset);
if (p == NULL) { if (p == NULL) {
DMA_ERROR(("%s: dma_rxfill: out of rxbufs\n", DMA_ERROR(("%s: dma_rxfill: out of rxbufs\n",
...@@ -1069,7 +1069,7 @@ static void _dma_rxreclaim(dma_info_t *di) ...@@ -1069,7 +1069,7 @@ static void _dma_rxreclaim(dma_info_t *di)
DMA_TRACE(("%s: dma_rxreclaim\n", di->name)); DMA_TRACE(("%s: dma_rxreclaim\n", di->name));
while ((p = _dma_getnextrxp(di, true))) while ((p = _dma_getnextrxp(di, true)))
bcm_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
} }
static void *_dma_getnextrxp(dma_info_t *di, bool forceall) static void *_dma_getnextrxp(dma_info_t *di, bool forceall)
...@@ -1303,7 +1303,7 @@ static void dma64_txreclaim(dma_info_t *di, txd_range_t range) ...@@ -1303,7 +1303,7 @@ static void dma64_txreclaim(dma_info_t *di, txd_range_t range)
while ((p = dma64_getnexttxp(di, range))) { while ((p = dma64_getnexttxp(di, range))) {
/* For unframed data, we don't have any packets to free */ /* For unframed data, we don't have any packets to free */
if (!(di->dma.dmactrlflags & DMA_CTRL_UNFRAMED)) if (!(di->dma.dmactrlflags & DMA_CTRL_UNFRAMED))
bcm_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
} }
} }
...@@ -1640,7 +1640,7 @@ static int dma64_txfast(dma_info_t *di, struct sk_buff *p0, ...@@ -1640,7 +1640,7 @@ static int dma64_txfast(dma_info_t *di, struct sk_buff *p0,
outoftxd: outoftxd:
DMA_ERROR(("%s: dma_txfast: out of txds !!!\n", di->name)); DMA_ERROR(("%s: dma_txfast: out of txds !!!\n", di->name));
bcm_pkt_buf_free_skb(p0); brcmu_pkt_buf_free_skb(p0);
di->dma.txavail = 0; di->dma.txavail = 0;
di->dma.txnobuf++; di->dma.txnobuf++;
return -1; return -1;
......
...@@ -257,7 +257,7 @@ typedef enum { ...@@ -257,7 +257,7 @@ typedef enum {
#define PHY_CHAIN_TX_DISABLE_TEMP 115 #define PHY_CHAIN_TX_DISABLE_TEMP 115
#define PHY_HYSTERESIS_DELTATEMP 5 #define PHY_HYSTERESIS_DELTATEMP 5
#define PHY_BITSCNT(x) bcm_bitcount((u8 *)&(x), sizeof(u8)) #define PHY_BITSCNT(x) brcmu_bitcount((u8 *)&(x), sizeof(u8))
#define MOD_PHY_REG(pi, phy_type, reg_name, field, value) \ #define MOD_PHY_REG(pi, phy_type, reg_name, field, value) \
mod_phy_reg(pi, phy_type##_##reg_name, phy_type##_##reg_name##_##field##_MASK, \ mod_phy_reg(pi, phy_type##_##reg_name, phy_type##_##reg_name##_##field##_MASK, \
......
...@@ -591,7 +591,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -591,7 +591,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
len = roundup(len, 4); len = roundup(len, 4);
ampdu_len += (len + (ndelim + 1) * AMPDU_DELIMITER_LEN); ampdu_len += (len + (ndelim + 1) * AMPDU_DELIMITER_LEN);
dma_len += (u16) bcm_pkttotlen(p); dma_len += (u16) brcmu_pkttotlen(p);
BCMMSG(wlc->wiphy, "wl%d: ampdu_len %d" BCMMSG(wlc->wiphy, "wl%d: ampdu_len %d"
" seg_cnt %d null delim %d\n", " seg_cnt %d null delim %d\n",
...@@ -686,8 +686,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -686,8 +686,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
((u8) (p->priority) == tid)) { ((u8) (p->priority) == tid)) {
plen = plen = brcmu_pkttotlen(p) +
bcm_pkttotlen(p) + AMPDU_MAX_MPDU_OVERHEAD; AMPDU_MAX_MPDU_OVERHEAD;
plen = max(scb_ampdu->min_len, plen); plen = max(scb_ampdu->min_len, plen);
if ((plen + ampdu_len) > maxlen) { if ((plen + ampdu_len) > maxlen) {
...@@ -704,7 +704,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -704,7 +704,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
p = NULL; p = NULL;
continue; continue;
} }
p = bcm_pktq_pdeq(&qi->q, prec); p = brcmu_pktq_pdeq(&qi->q, prec);
} else { } else {
p = NULL; p = NULL;
} }
...@@ -864,7 +864,7 @@ wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, ...@@ -864,7 +864,7 @@ wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
tx_info = IEEE80211_SKB_CB(p); tx_info = IEEE80211_SKB_CB(p);
txh = (d11txh_t *) p->data; txh = (d11txh_t *) p->data;
mcl = le16_to_cpu(txh->MacTxControlLow); mcl = le16_to_cpu(txh->MacTxControlLow);
bcm_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
/* break out if last packet of ampdu */ /* break out if last packet of ampdu */
if (((mcl & TXC_AMPDU_MASK) >> TXC_AMPDU_SHIFT) == if (((mcl & TXC_AMPDU_MASK) >> TXC_AMPDU_SHIFT) ==
TXC_AMPDU_LAST) TXC_AMPDU_LAST)
...@@ -993,7 +993,7 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -993,7 +993,7 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
txs->phyerr); txs->phyerr);
if (WL_ERROR_ON()) { if (WL_ERROR_ON()) {
bcm_prpkt("txpkt (AMPDU)", p); brcmu_prpkt("txpkt (AMPDU)", p);
wlc_print_txdesc((d11txh_t *) p->data); wlc_print_txdesc((d11txh_t *) p->data);
} }
wlc_print_txstatus(txs); wlc_print_txstatus(txs);
...@@ -1239,7 +1239,7 @@ void wlc_ampdu_flush(struct wlc_info *wlc, ...@@ -1239,7 +1239,7 @@ void wlc_ampdu_flush(struct wlc_info *wlc,
ampdu_pars.sta = sta; ampdu_pars.sta = sta;
ampdu_pars.tid = tid; ampdu_pars.tid = tid;
for (prec = 0; prec < pq->num_prec; prec++) { for (prec = 0; prec < pq->num_prec; prec++) {
bcm_pktq_pflush(pq, prec, true, cb_del_ampdu_pkt, brcmu_pktq_pflush(pq, prec, true, cb_del_ampdu_pkt,
(void *)&ampdu_pars); (void *)&ampdu_pars);
} }
wlc_inval_dma_pkts(wlc->hw, sta, dma_cb_fn_ampdu); wlc_inval_dma_pkts(wlc->hw, sta, dma_cb_fn_ampdu);
......
...@@ -922,7 +922,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, ...@@ -922,7 +922,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
err = 21; err = 21;
goto fail; goto fail;
} }
bcm_ether_atoe(macaddr, wlc_hw->etheraddr); brcmu_ether_atoe(macaddr, wlc_hw->etheraddr);
if (is_broadcast_ether_addr(wlc_hw->etheraddr) || if (is_broadcast_ether_addr(wlc_hw->etheraddr) ||
is_zero_ether_addr(wlc_hw->etheraddr)) { is_zero_ether_addr(wlc_hw->etheraddr)) {
wiphy_err(wiphy, "wl%d: wlc_bmac_attach: bad macaddr %s\n", wiphy_err(wiphy, "wl%d: wlc_bmac_attach: bad macaddr %s\n",
......
...@@ -1494,7 +1494,7 @@ wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband) ...@@ -1494,7 +1494,7 @@ wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband)
u8 channel = CHSPEC_CHANNEL(chspec); u8 channel = CHSPEC_CHANNEL(chspec);
/* check the chanspec */ /* check the chanspec */
if (bcm_chspec_malformed(chspec)) { if (brcmu_chspec_malformed(chspec)) {
wiphy_err(wlc->wiphy, "wl%d: malformed chanspec 0x%x\n", wiphy_err(wlc->wiphy, "wl%d: malformed chanspec 0x%x\n",
wlc->pub->unit, chspec); wlc->pub->unit, chspec);
return false; return false;
......
...@@ -704,8 +704,8 @@ static u8 wlc_local_constraint_qdbm(struct wlc_info *wlc) ...@@ -704,8 +704,8 @@ static u8 wlc_local_constraint_qdbm(struct wlc_info *wlc)
local = WLC_TXPWR_MAX; local = WLC_TXPWR_MAX;
if (wlc->pub->associated && if (wlc->pub->associated &&
(bcm_chspec_ctlchan(wlc->chanspec) == (brcmu_chspec_ctlchan(wlc->chanspec) ==
bcm_chspec_ctlchan(wlc->home_chanspec))) { brcmu_chspec_ctlchan(wlc->home_chanspec))) {
/* get the local power constraint if we are on the AP's /* get the local power constraint if we are on the AP's
* channel [802.11h, 7.3.2.13] * channel [802.11h, 7.3.2.13]
...@@ -2183,7 +2183,7 @@ uint wlc_down(struct wlc_info *wlc) ...@@ -2183,7 +2183,7 @@ uint wlc_down(struct wlc_info *wlc)
/* flush tx queues */ /* flush tx queues */
for (qi = wlc->tx_queues; qi != NULL; qi = qi->next) { for (qi = wlc->tx_queues; qi != NULL; qi = qi->next) {
bcm_pktq_flush(&qi->q, true, NULL, NULL); brcmu_pktq_flush(&qi->q, true, NULL, NULL);
} }
callbacks += wlc_bmac_down_finish(wlc->hw); callbacks += wlc_bmac_down_finish(wlc->hw);
...@@ -2985,16 +2985,16 @@ void wlc_print_txdesc(d11txh_t *txh) ...@@ -2985,16 +2985,16 @@ void wlc_print_txdesc(d11txh_t *txh)
printk(KERN_DEBUG "XtraFrameTypes: %04x ", xtraft); printk(KERN_DEBUG "XtraFrameTypes: %04x ", xtraft);
printk(KERN_DEBUG "\n"); printk(KERN_DEBUG "\n");
bcm_format_hex(hexbuf, iv, sizeof(txh->IV)); brcmu_format_hex(hexbuf, iv, sizeof(txh->IV));
printk(KERN_DEBUG "SecIV: %s\n", hexbuf); printk(KERN_DEBUG "SecIV: %s\n", hexbuf);
bcm_format_hex(hexbuf, ra, sizeof(txh->TxFrameRA)); brcmu_format_hex(hexbuf, ra, sizeof(txh->TxFrameRA));
printk(KERN_DEBUG "RA: %s\n", hexbuf); printk(KERN_DEBUG "RA: %s\n", hexbuf);
printk(KERN_DEBUG "Fb FES Time: %04x ", tfestfb); printk(KERN_DEBUG "Fb FES Time: %04x ", tfestfb);
bcm_format_hex(hexbuf, rtspfb, sizeof(txh->RTSPLCPFallback)); brcmu_format_hex(hexbuf, rtspfb, sizeof(txh->RTSPLCPFallback));
printk(KERN_DEBUG "RTS PLCP: %s ", hexbuf); printk(KERN_DEBUG "RTS PLCP: %s ", hexbuf);
printk(KERN_DEBUG "RTS DUR: %04x ", rtsdfb); printk(KERN_DEBUG "RTS DUR: %04x ", rtsdfb);
bcm_format_hex(hexbuf, fragpfb, sizeof(txh->FragPLCPFallback)); brcmu_format_hex(hexbuf, fragpfb, sizeof(txh->FragPLCPFallback));
printk(KERN_DEBUG "PLCP: %s ", hexbuf); printk(KERN_DEBUG "PLCP: %s ", hexbuf);
printk(KERN_DEBUG "DUR: %04x", fragdfb); printk(KERN_DEBUG "DUR: %04x", fragdfb);
printk(KERN_DEBUG "\n"); printk(KERN_DEBUG "\n");
...@@ -3010,9 +3010,9 @@ void wlc_print_txdesc(d11txh_t *txh) ...@@ -3010,9 +3010,9 @@ void wlc_print_txdesc(d11txh_t *txh)
printk(KERN_DEBUG "MaxAggbyte_fb: %04x\n", mabyte_f); printk(KERN_DEBUG "MaxAggbyte_fb: %04x\n", mabyte_f);
printk(KERN_DEBUG "MinByte: %04x\n", mmbyte); printk(KERN_DEBUG "MinByte: %04x\n", mmbyte);
bcm_format_hex(hexbuf, rtsph, sizeof(txh->RTSPhyHeader)); brcmu_format_hex(hexbuf, rtsph, sizeof(txh->RTSPhyHeader));
printk(KERN_DEBUG "RTS PLCP: %s ", hexbuf); printk(KERN_DEBUG "RTS PLCP: %s ", hexbuf);
bcm_format_hex(hexbuf, (u8 *) &rts, sizeof(txh->rts_frame)); brcmu_format_hex(hexbuf, (u8 *) &rts, sizeof(txh->rts_frame));
printk(KERN_DEBUG "RTS Frame: %s", hexbuf); printk(KERN_DEBUG "RTS Frame: %s", hexbuf);
printk(KERN_DEBUG "\n"); printk(KERN_DEBUG "\n");
} }
...@@ -3030,7 +3030,7 @@ void wlc_print_rxh(d11rxhdr_t *rxh) ...@@ -3030,7 +3030,7 @@ void wlc_print_rxh(d11rxhdr_t *rxh)
u16 macstatus2 = rxh->RxStatus2; u16 macstatus2 = rxh->RxStatus2;
char flagstr[64]; char flagstr[64];
char lenbuf[20]; char lenbuf[20];
static const bcm_bit_desc_t macstat_flags[] = { static const struct brcmu_bit_desc macstat_flags[] = {
{RXS_FCSERR, "FCSErr"}, {RXS_FCSERR, "FCSErr"},
{RXS_RESPFRAMETX, "Reply"}, {RXS_RESPFRAMETX, "Reply"},
{RXS_PBPRES, "PADDING"}, {RXS_PBPRES, "PADDING"},
...@@ -3043,7 +3043,7 @@ void wlc_print_rxh(d11rxhdr_t *rxh) ...@@ -3043,7 +3043,7 @@ void wlc_print_rxh(d11rxhdr_t *rxh)
printk(KERN_DEBUG "Raw RxDesc:\n"); printk(KERN_DEBUG "Raw RxDesc:\n");
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, rxh, sizeof(d11rxhdr_t)); print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, rxh, sizeof(d11rxhdr_t));
bcm_format_flags(macstat_flags, macstatus1, flagstr, 64); brcmu_format_flags(macstat_flags, macstatus1, flagstr, 64);
snprintf(lenbuf, sizeof(lenbuf), "0x%x", len); snprintf(lenbuf, sizeof(lenbuf), "0x%x", len);
...@@ -3091,7 +3091,7 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt, ...@@ -3091,7 +3091,7 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
if (pktq_pfull(q, prec)) if (pktq_pfull(q, prec))
eprec = prec; eprec = prec;
else if (pktq_full(q)) { else if (pktq_full(q)) {
p = bcm_pktq_peek_tail(q, &eprec); p = brcmu_pktq_peek_tail(q, &eprec);
if (eprec > prec) { if (eprec > prec) {
wiphy_err(wlc->wiphy, "%s: Failing: eprec %d > prec %d" wiphy_err(wlc->wiphy, "%s: Failing: eprec %d > prec %d"
"\n", __func__, eprec, prec); "\n", __func__, eprec, prec);
...@@ -3113,16 +3113,16 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt, ...@@ -3113,16 +3113,16 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
} }
/* Evict packet according to discard policy */ /* Evict packet according to discard policy */
p = discard_oldest ? bcm_pktq_pdeq(q, eprec) : p = discard_oldest ? brcmu_pktq_pdeq(q, eprec) :
bcm_pktq_pdeq_tail(q, eprec); brcmu_pktq_pdeq_tail(q, eprec);
bcm_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
} }
/* Enqueue */ /* Enqueue */
if (head) if (head)
p = bcm_pktq_penq_head(q, prec, pkt); p = brcmu_pktq_penq_head(q, prec, pkt);
else else
p = bcm_pktq_penq(q, prec, pkt); p = brcmu_pktq_penq(q, prec, pkt);
return true; return true;
} }
...@@ -3147,7 +3147,7 @@ void wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu, ...@@ -3147,7 +3147,7 @@ void wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
* XXX we might hit this condtion in case * XXX we might hit this condtion in case
* packet flooding from mac80211 stack * packet flooding from mac80211 stack
*/ */
bcm_pkt_buf_free_skb(sdu); brcmu_pkt_buf_free_skb(sdu);
} }
/* Check if flow control needs to be turned on after enqueuing the packet /* Check if flow control needs to be turned on after enqueuing the packet
...@@ -3211,7 +3211,7 @@ void wlc_send_q(struct wlc_info *wlc) ...@@ -3211,7 +3211,7 @@ void wlc_send_q(struct wlc_info *wlc)
/* Send all the enq'd pkts that we can. /* Send all the enq'd pkts that we can.
* Dequeue packets with precedence with empty HW fifo only * Dequeue packets with precedence with empty HW fifo only
*/ */
while (prec_map && (pkt[0] = bcm_pktq_mdeq(q, prec_map, &prec))) { while (prec_map && (pkt[0] = brcmu_pktq_mdeq(q, prec_map, &prec))) {
tx_info = IEEE80211_SKB_CB(pkt[0]); tx_info = IEEE80211_SKB_CB(pkt[0]);
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
err = wlc_sendampdu(wlc->ampdu, qi, pkt, prec); err = wlc_sendampdu(wlc->ampdu, qi, pkt, prec);
...@@ -3226,7 +3226,7 @@ void wlc_send_q(struct wlc_info *wlc) ...@@ -3226,7 +3226,7 @@ void wlc_send_q(struct wlc_info *wlc)
} }
if (err == -EBUSY) { if (err == -EBUSY) {
bcm_pktq_penq_head(q, prec, pkt[0]); brcmu_pktq_penq_head(q, prec, pkt[0]);
/* If send failed due to any other reason than a change in /* If send failed due to any other reason than a change in
* HW FIFO condition, quit. Otherwise, read the new prec_map! * HW FIFO condition, quit. Otherwise, read the new prec_map!
*/ */
...@@ -3649,7 +3649,7 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw, ...@@ -3649,7 +3649,7 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
qos = ieee80211_is_data_qos(h->frame_control); qos = ieee80211_is_data_qos(h->frame_control);
/* compute length of frame in bytes for use in PLCP computations */ /* compute length of frame in bytes for use in PLCP computations */
len = bcm_pkttotlen(p); len = brcmu_pkttotlen(p);
phylen = len + FCS_LEN; phylen = len + FCS_LEN;
/* If WEP enabled, add room in phylen for the additional bytes of /* If WEP enabled, add room in phylen for the additional bytes of
...@@ -4381,7 +4381,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2) ...@@ -4381,7 +4381,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
tx_info->flags |= IEEE80211_TX_STAT_ACK; tx_info->flags |= IEEE80211_TX_STAT_ACK;
} }
totlen = bcm_pkttotlen(p); totlen = brcmu_pkttotlen(p);
free_pdu = true; free_pdu = true;
wlc_txfifo_complete(wlc, queue, 1); wlc_txfifo_complete(wlc, queue, 1);
...@@ -4402,7 +4402,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2) ...@@ -4402,7 +4402,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
fatal: fatal:
if (p) if (p)
bcm_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
return true; return true;
...@@ -4700,7 +4700,7 @@ void wlc_recv(struct wlc_info *wlc, struct sk_buff *p) ...@@ -4700,7 +4700,7 @@ void wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
return; return;
toss: toss:
bcm_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
} }
/* calculate frame duration for Mixed-mode L-SIG spoofing, return /* calculate frame duration for Mixed-mode L-SIG spoofing, return
...@@ -5833,7 +5833,7 @@ static struct wlc_txq_info *wlc_txq_alloc(struct wlc_info *wlc) ...@@ -5833,7 +5833,7 @@ static struct wlc_txq_info *wlc_txq_alloc(struct wlc_info *wlc)
* leave PS mode. The watermark for flowcontrol to OS packets * leave PS mode. The watermark for flowcontrol to OS packets
* will remain the same * will remain the same
*/ */
bcm_pktq_init(&qi->q, WLC_PREC_COUNT, brcmu_pktq_init(&qi->q, WLC_PREC_COUNT,
(2 * wlc->pub->tunables->datahiwat) + PKTQ_LEN_DEFAULT (2 * wlc->pub->tunables->datahiwat) + PKTQ_LEN_DEFAULT
+ wlc->pub->psq_pkts_total); + wlc->pub->psq_pkts_total);
...@@ -5917,7 +5917,7 @@ void wlc_wait_for_tx_completion(struct wlc_info *wlc, bool drop) ...@@ -5917,7 +5917,7 @@ void wlc_wait_for_tx_completion(struct wlc_info *wlc, bool drop)
{ {
/* flush packet queue when requested */ /* flush packet queue when requested */
if (drop) if (drop)
bcm_pktq_flush(&wlc->pkt_queue->q, false, NULL, NULL); brcmu_pktq_flush(&wlc->pkt_queue->q, false, NULL, NULL);
/* wait for queue and DMA fifos to run dry */ /* wait for queue and DMA fifos to run dry */
while (!pktq_empty(&wlc->pkt_queue->q) || while (!pktq_empty(&wlc->pkt_queue->q) ||
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define EDCF_AIFSN_MIN 1 #define EDCF_AIFSN_MIN 1
#define FRAGNUM_MASK 0xF #define FRAGNUM_MASK 0xF
#define WLC_BITSCNT(x) bcm_bitcount((u8 *)&(x), sizeof(u8)) #define WLC_BITSCNT(x) brcmu_bitcount((u8 *)&(x), sizeof(u8))
/* Maximum wait time for a MAC suspend */ /* Maximum wait time for a MAC suspend */
#define WLC_MAX_MAC_SUSPEND 83000 /* uS: 83mS is max packet time (64KB ampdu @ 6Mbps) */ #define WLC_MAX_MAC_SUSPEND 83000 /* uS: 83mS is max packet time (64KB ampdu @ 6Mbps) */
...@@ -355,7 +355,7 @@ struct pkt_cb { ...@@ -355,7 +355,7 @@ struct pkt_cb {
/* module control blocks */ /* module control blocks */
struct modulecb { struct modulecb {
char name[32]; /* module name : NULL indicates empty array member */ char name[32]; /* module name : NULL indicates empty array member */
const bcm_iovar_t *iovars; /* iovar table */ const struct brcmu_iovar *iovars; /* iovar table */
void *hdl; /* handle passed when handler 'doiovar' is called */ void *hdl; /* handle passed when handler 'doiovar' is called */
watchdog_fn_t watchdog_fn; /* watchdog handler */ watchdog_fn_t watchdog_fn; /* watchdog handler */
iovar_fn_t iovar_fn; /* iovar handler */ iovar_fn_t iovar_fn; /* iovar handler */
...@@ -812,8 +812,8 @@ extern void wlc_inval_dma_pkts(struct wlc_hw_info *hw, ...@@ -812,8 +812,8 @@ extern void wlc_inval_dma_pkts(struct wlc_hw_info *hw,
void (*dma_callback_fn)); void (*dma_callback_fn));
#if defined(BCMDBG) #if defined(BCMDBG)
extern void wlc_dump_ie(struct wlc_info *wlc, bcm_tlv_t *ie, extern void wlc_dump_ie(struct wlc_info *wlc, struct brcmu_tlv *ie,
struct bcmstrbuf *b); struct brcmu_strbuf *b);
#endif #endif
extern void wlc_reprate_init(struct wlc_info *wlc); extern void wlc_reprate_init(struct wlc_info *wlc);
......
...@@ -219,7 +219,7 @@ struct wlc_if; ...@@ -219,7 +219,7 @@ struct wlc_if;
/* watchdog down and dump callback function proto's */ /* watchdog down and dump callback function proto's */
typedef int (*watchdog_fn_t) (void *handle); typedef int (*watchdog_fn_t) (void *handle);
typedef int (*down_fn_t) (void *handle); typedef int (*down_fn_t) (void *handle);
typedef int (*dump_fn_t) (void *handle, struct bcmstrbuf *b); typedef int (*dump_fn_t) (void *handle, struct brcmu_strbuf *b);
/* IOVar handler /* IOVar handler
* *
...@@ -234,7 +234,7 @@ typedef int (*dump_fn_t) (void *handle, struct bcmstrbuf *b); ...@@ -234,7 +234,7 @@ typedef int (*dump_fn_t) (void *handle, struct bcmstrbuf *b);
* *
* All pointers may point into the same buffer. * All pointers may point into the same buffer.
*/ */
typedef int (*iovar_fn_t) (void *handle, const bcm_iovar_t *vi, typedef int (*iovar_fn_t) (void *handle, const struct brcmu_iovar *vi,
u32 actionid, const char *name, void *params, u32 actionid, const char *name, void *params,
uint plen, void *arg, int alen, int vsize, uint plen, void *arg, int alen, int vsize,
struct wlc_if *wlcif); struct wlc_if *wlcif);
......
...@@ -54,7 +54,7 @@ struct bmac_pmq; ...@@ -54,7 +54,7 @@ struct bmac_pmq;
struct d11init; struct d11init;
struct dma_pub; struct dma_pub;
struct wlc_bsscfg; struct wlc_bsscfg;
struct bcmstrbuf; struct brcmu_strbuf;
struct si_pub; struct si_pub;
/* brcm_msg_level is a bit vector with defs in bcmdefs.h */ /* brcm_msg_level is a bit vector with defs in bcmdefs.h */
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef _bcmutils_h_ #ifndef _brcmutils_h_
#define _bcmutils_h_ #define _brcmutils_h_
/* Buffer structure for collecting string-formatted data /* Buffer structure for collecting string-formatted data
* using bcm_bprintf() API. * using brcmu_bprintf() API.
* Use bcm_binit() to initialize before use * Use brcmu_binit() to initialize before use
*/ */
struct bcmstrbuf { struct brcmu_strbuf {
char *buf; /* pointer to current position in origbuf */ char *buf; /* pointer to current position in origbuf */
unsigned int size; /* current (residual) size in bytes */ unsigned int size; /* current (residual) size in bytes */
char *origbuf; /* unmodified pointer to orignal buffer */ char *origbuf; /* unmodified pointer to orignal buffer */
...@@ -87,25 +87,25 @@ typedef bool(*ifpkt_cb_t) (struct sk_buff *, void *); ...@@ -87,25 +87,25 @@ typedef bool(*ifpkt_cb_t) (struct sk_buff *, void *);
#define pktq_ppeek(pq, prec) ((pq)->q[prec].head) #define pktq_ppeek(pq, prec) ((pq)->q[prec].head)
#define pktq_ppeek_tail(pq, prec) ((pq)->q[prec].tail) #define pktq_ppeek_tail(pq, prec) ((pq)->q[prec].tail)
extern struct sk_buff *bcm_pktq_penq(struct pktq *pq, int prec, extern struct sk_buff *brcmu_pktq_penq(struct pktq *pq, int prec,
struct sk_buff *p); struct sk_buff *p);
extern struct sk_buff *bcm_pktq_penq_head(struct pktq *pq, int prec, extern struct sk_buff *brcmu_pktq_penq_head(struct pktq *pq, int prec,
struct sk_buff *p); struct sk_buff *p);
extern struct sk_buff *bcm_pktq_pdeq(struct pktq *pq, int prec); extern struct sk_buff *brcmu_pktq_pdeq(struct pktq *pq, int prec);
extern struct sk_buff *bcm_pktq_pdeq_tail(struct pktq *pq, int prec); extern struct sk_buff *brcmu_pktq_pdeq_tail(struct pktq *pq, int prec);
/* packet primitives */ /* packet primitives */
extern struct sk_buff *bcm_pkt_buf_get_skb(uint len); extern struct sk_buff *brcmu_pkt_buf_get_skb(uint len);
extern void bcm_pkt_buf_free_skb(struct sk_buff *skb); extern void brcmu_pkt_buf_free_skb(struct sk_buff *skb);
/* Empty the queue at particular precedence level */ /* Empty the queue at particular precedence level */
extern void bcm_pktq_pflush(struct pktq *pq, int prec, extern void brcmu_pktq_pflush(struct pktq *pq, int prec,
bool dir, ifpkt_cb_t fn, void *arg); bool dir, ifpkt_cb_t fn, void *arg);
/* operations on a set of precedences in packet queue */ /* operations on a set of precedences in packet queue */
extern int bcm_pktq_mlen(struct pktq *pq, uint prec_bmp); extern int brcmu_pktq_mlen(struct pktq *pq, uint prec_bmp);
extern struct sk_buff *bcm_pktq_mdeq(struct pktq *pq, uint prec_bmp, extern struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp,
int *prec_out); int *prec_out);
/* operations on packet queue as a whole */ /* operations on packet queue as a whole */
...@@ -117,46 +117,37 @@ extern struct sk_buff *bcm_pktq_mdeq(struct pktq *pq, uint prec_bmp, ...@@ -117,46 +117,37 @@ extern struct sk_buff *bcm_pktq_mdeq(struct pktq *pq, uint prec_bmp,
#define pktq_empty(pq) ((pq)->len == 0) #define pktq_empty(pq) ((pq)->len == 0)
/* operations for single precedence queues */ /* operations for single precedence queues */
#define pktenq(pq, p) bcm_pktq_penq(((struct pktq *)pq), 0, (p)) #define pktenq(pq, p) brcmu_pktq_penq(((struct pktq *)pq), 0, (p))
#define pktenq_head(pq, p) bcm_pktq_penq_head(((struct pktq *)pq), 0, (p)) #define pktenq_head(pq, p)\
#define pktdeq(pq) bcm_pktq_pdeq(((struct pktq *)pq), 0) brcmu_pktq_penq_head(((struct pktq *)pq), 0, (p))
#define pktdeq_tail(pq) bcm_pktq_pdeq_tail(((struct pktq *)pq), 0) #define pktdeq(pq) brcmu_pktq_pdeq(((struct pktq *)pq), 0)
#define pktqinit(pq, len) bcm_pktq_init(((struct pktq *)pq), 1, len) #define pktdeq_tail(pq) brcmu_pktq_pdeq_tail(((struct pktq *)pq), 0)
#define pktqinit(pq, len) brcmu_pktq_init(((struct pktq *)pq), 1, len)
extern void bcm_pktq_init(struct pktq *pq, int num_prec, int max_len);
extern void brcmu_pktq_init(struct pktq *pq, int num_prec, int max_len);
/* prec_out may be NULL if caller is not interested in return value */ /* prec_out may be NULL if caller is not interested in return value */
extern struct sk_buff *bcm_pktq_peek_tail(struct pktq *pq, int *prec_out); extern struct sk_buff *brcmu_pktq_peek_tail(struct pktq *pq, int *prec_out);
extern void bcm_pktq_flush(struct pktq *pq, bool dir, extern void brcmu_pktq_flush(struct pktq *pq, bool dir,
ifpkt_cb_t fn, void *arg); ifpkt_cb_t fn, void *arg);
/* externs */ /* externs */
/* packet */ /* packet */
extern uint bcm_pktfrombuf(struct sk_buff *p, extern uint brcmu_pktfrombuf(struct sk_buff *p,
uint offset, int len, unsigned char *buf); uint offset, int len, unsigned char *buf);
extern uint bcm_pkttotlen(struct sk_buff *p); extern uint brcmu_pkttotlen(struct sk_buff *p);
/* ethernet address */ /* ethernet address */
extern int bcm_ether_atoe(char *p, u8 *ea); extern int brcmu_ether_atoe(char *p, u8 *ea);
/* ip address */ /* ip address */
struct ipv4_addr; struct ipv4_addr;
extern char *bcm_ip_ntoa(struct ipv4_addr *ia, char *buf);
#ifdef BCMDBG #ifdef BCMDBG
extern void bcm_prpkt(const char *msg, struct sk_buff *p0); extern void brcmu_prpkt(const char *msg, struct sk_buff *p0);
#else #else
#define bcm_prpkt(a, b) #define brcmu_prpkt(a, b)
#endif /* BCMDBG */ #endif /* BCMDBG */
#define bcm_perf_enable()
#define bcmlog(fmt, a1, a2)
#define bcmdumplog(buf, size) (*buf = '\0')
#define bcmdumplogent(buf, idx) -1
#define bcmtslog(tstamp, fmt, a1, a2)
#define bcmprinttslogs()
#define bcmprinttstamp(us)
/* Support for sharing code across in-driver iovar implementations. /* Support for sharing code across in-driver iovar implementations.
* The intent is that a driver use this structure to map iovar names * The intent is that a driver use this structure to map iovar names
* to its (private) iovar identifiers, and the lookup function to * to its (private) iovar identifiers, and the lookup function to
...@@ -165,13 +156,13 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0); ...@@ -165,13 +156,13 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0);
*/ */
/* iovar structure */ /* iovar structure */
typedef struct bcm_iovar { struct brcmu_iovar {
const char *name; /* name for lookup and display */ const char *name; /* name for lookup and display */
u16 varid; /* id for switch */ u16 varid; /* id for switch */
u16 flags; /* driver-specific flag bits */ u16 flags; /* driver-specific flag bits */
u16 type; /* base type of argument */ u16 type; /* base type of argument */
u16 minlen; /* min length for buffer vars */ u16 minlen; /* min length for buffer vars */
} bcm_iovar_t; };
/* varid definitions are per-driver, may use these get/set bits */ /* varid definitions are per-driver, may use these get/set bits */
...@@ -185,12 +176,11 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0); ...@@ -185,12 +176,11 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0);
#define IOV_ISSET(actionid) ((actionid & IOV_SET) == IOV_SET) #define IOV_ISSET(actionid) ((actionid & IOV_SET) == IOV_SET)
#define IOV_ID(actionid) (actionid >> 1) #define IOV_ID(actionid) (actionid >> 1)
/* flags are per-driver based on driver attributes */ extern const struct
brcmu_iovar *brcmu_iovar_lookup(const struct brcmu_iovar *table,
extern const bcm_iovar_t *bcm_iovar_lookup(const bcm_iovar_t *table, const char *name);
const char *name); extern int brcmu_iovar_lencheck(const struct brcmu_iovar *table, void *arg,
extern int bcm_iovar_lencheck(const bcm_iovar_t *table, void *arg, int len, bool set);
int len, bool set);
/* Base type definitions */ /* Base type definitions */
#define IOVT_VOID 0 /* no value (implictly set only) */ #define IOVT_VOID 0 /* no value (implictly set only) */
...@@ -424,21 +414,18 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0); ...@@ -424,21 +414,18 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0);
#define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */ #define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */
#define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */ #define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */
/* bcm_format_flags() bit description structure */ /* brcmu_format_flags() bit description structure */
typedef struct bcm_bit_desc { struct brcmu_bit_desc {
u32 bit; u32 bit;
const char *name; const char *name;
} bcm_bit_desc_t; };
/* tag_ID/length/value_buffer tuple */ /* tag_ID/length/value_buffer tuple */
typedef struct bcm_tlv { struct brcmu_tlv {
u8 id; u8 id;
u8 len; u8 len;
u8 data[1]; u8 data[1];
} bcm_tlv_t; };
/* Check that bcm_tlv_t fits into the given buflen */
#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (int)(buflen) >= (int)(2 + (elt)->len))
#define ETHER_ADDR_STR_LEN 18 /* 18-bytes of Ethernet address buffer length */ #define ETHER_ADDR_STR_LEN 18 /* 18-bytes of Ethernet address buffer length */
...@@ -476,17 +463,19 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0); ...@@ -476,17 +463,19 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0);
/* externs */ /* externs */
/* crc */ /* crc */
extern u8 bcm_crc8(u8 *p, uint nbytes, u8 crc); extern u8 brcmu_crc8(u8 *p, uint nbytes, u8 crc);
/* format/print */ /* format/print */
#if defined(BCMDBG) #if defined(BCMDBG)
extern int bcm_format_flags(const bcm_bit_desc_t *bd, u32 flags, extern int brcmu_format_flags(const struct brcmu_bit_desc *bd, u32 flags,
char *buf, int len); char *buf, int len);
extern int bcm_format_hex(char *str, const void *bytes, int len); extern int brcmu_format_hex(char *str, const void *bytes, int len);
#endif #endif
extern char *bcm_chipname(uint chipid, char *buf, uint len);
extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, extern char *brcmu_chipname(uint chipid, char *buf, uint len);
uint key);
extern struct brcmu_tlv *brcmu_parse_tlvs(void *buf, int buflen,
uint key);
/* multi-bool data type: set of bools, mbool is true if any is set */ /* multi-bool data type: set of bools, mbool is true if any is set */
typedef u32 mbool; typedef u32 mbool;
...@@ -496,14 +485,14 @@ extern u8 bcm_crc8(u8 *p, uint nbytes, u8 crc); ...@@ -496,14 +485,14 @@ extern u8 bcm_crc8(u8 *p, uint nbytes, u8 crc);
#define mboolmaskset(mb, mask, val) ((mb) = (((mb) & ~(mask)) | (val))) #define mboolmaskset(mb, mask, val) ((mb) = (((mb) & ~(mask)) | (val)))
/* power conversion */ /* power conversion */
extern u16 bcm_qdbm_to_mw(u8 qdbm); extern u16 brcmu_qdbm_to_mw(u8 qdbm);
extern u8 bcm_mw_to_qdbm(u16 mw); extern u8 brcmu_mw_to_qdbm(u16 mw);
extern void bcm_binit(struct bcmstrbuf *b, char *buf, uint size); extern void brcmu_binit(struct brcmu_strbuf *b, char *buf, uint size);
extern int bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...); extern int brcmu_bprintf(struct brcmu_strbuf *b, const char *fmt, ...);
extern uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, extern uint brcmu_mkiovar(char *name, char *data, uint datalen,
uint len); char *buf, uint len);
extern uint bcm_bitcount(u8 *bitmap, uint bytelength); extern uint brcmu_bitcount(u8 *bitmap, uint bytelength);
#endif /* _bcmutils_h_ */ #endif /* _brcmutils_h_ */
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef _bcmwifi_h_ #ifndef _brcmu_wifi_h_
#define _bcmwifi_h_ #define _brcmu_wifi_h_
#include <linux/if_ether.h> /* for ETH_ALEN */ #include <linux/if_ether.h> /* for ETH_ALEN */
#include <linux/ieee80211.h> /* for WLAN_PMKID_LEN */ #include <linux/ieee80211.h> /* for WLAN_PMKID_LEN */
...@@ -141,14 +141,14 @@ typedef u16 chanspec_t; ...@@ -141,14 +141,14 @@ typedef u16 chanspec_t;
* combination could be legal given any set of circumstances. * combination could be legal given any set of circumstances.
* RETURNS: true is the chanspec is malformed, false if it looks good. * RETURNS: true is the chanspec is malformed, false if it looks good.
*/ */
extern bool bcm_chspec_malformed(chanspec_t chanspec); extern bool brcmu_chspec_malformed(chanspec_t chanspec);
/* /*
* This function returns the channel number that control traffic is being sent on, for legacy * This function returns the channel number that control traffic is being sent on, for legacy
* channels this is just the channel number, for 40MHZ channels it is the upper or lowre 20MHZ * channels this is just the channel number, for 40MHZ channels it is the upper or lowre 20MHZ
* sideband depending on the chanspec selected * sideband depending on the chanspec selected
*/ */
extern u8 bcm_chspec_ctlchan(chanspec_t chspec); extern u8 brcmu_chspec_ctlchan(chanspec_t chspec);
/* /*
* Return the channel number for a given frequency and base frequency. * Return the channel number for a given frequency and base frequency.
...@@ -169,7 +169,7 @@ extern u8 bcm_chspec_ctlchan(chanspec_t chspec); ...@@ -169,7 +169,7 @@ extern u8 bcm_chspec_ctlchan(chanspec_t chspec);
* *
* Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2 * Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2
*/ */
extern int bcm_mhz2channel(uint freq, uint start_factor); extern int brcmu_mhz2channel(uint freq, uint start_factor);
/* Enumerate crypto algorithms */ /* Enumerate crypto algorithms */
#define CRYPTO_ALGO_OFF 0 #define CRYPTO_ALGO_OFF 0
...@@ -239,4 +239,4 @@ typedef struct _pmkid_cand_list { ...@@ -239,4 +239,4 @@ typedef struct _pmkid_cand_list {
typedef u8 ac_bitmap_t; typedef u8 ac_bitmap_t;
#endif /* _bcmwifi_h_ */ #endif /* _brcmu_wifi_h_ */
This diff is collapsed.
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* combination could be legal given any set of circumstances. * combination could be legal given any set of circumstances.
* RETURNS: true is the chanspec is malformed, false if it looks good. * RETURNS: true is the chanspec is malformed, false if it looks good.
*/ */
bool bcm_chspec_malformed(chanspec_t chanspec) bool brcmu_chspec_malformed(chanspec_t chanspec)
{ {
/* must be 2G or 5G band */ /* must be 2G or 5G band */
if (!CHSPEC_IS5G(chanspec) && !CHSPEC_IS2G(chanspec)) if (!CHSPEC_IS5G(chanspec) && !CHSPEC_IS2G(chanspec))
...@@ -46,14 +46,14 @@ bool bcm_chspec_malformed(chanspec_t chanspec) ...@@ -46,14 +46,14 @@ bool bcm_chspec_malformed(chanspec_t chanspec)
return false; return false;
} }
EXPORT_SYMBOL(bcm_chspec_malformed); EXPORT_SYMBOL(brcmu_chspec_malformed);
/* /*
* This function returns the channel number that control traffic is being sent on, for legacy * This function returns the channel number that control traffic is being sent on, for legacy
* channels this is just the channel number, for 40MHZ channels it is the upper or lowre 20MHZ * channels this is just the channel number, for 40MHZ channels it is the upper or lowre 20MHZ
* sideband depending on the chanspec selected * sideband depending on the chanspec selected
*/ */
u8 bcm_chspec_ctlchan(chanspec_t chspec) u8 brcmu_chspec_ctlchan(chanspec_t chspec)
{ {
u8 ctl_chan; u8 ctl_chan;
...@@ -76,7 +76,7 @@ u8 bcm_chspec_ctlchan(chanspec_t chspec) ...@@ -76,7 +76,7 @@ u8 bcm_chspec_ctlchan(chanspec_t chspec)
return ctl_chan; return ctl_chan;
} }
EXPORT_SYMBOL(bcm_chspec_ctlchan); EXPORT_SYMBOL(brcmu_chspec_ctlchan);
/* /*
* Return the channel number for a given frequency and base frequency. * Return the channel number for a given frequency and base frequency.
...@@ -97,7 +97,7 @@ EXPORT_SYMBOL(bcm_chspec_ctlchan); ...@@ -97,7 +97,7 @@ EXPORT_SYMBOL(bcm_chspec_ctlchan);
* *
* Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2 * Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2
*/ */
int bcm_mhz2channel(uint freq, uint start_factor) int brcmu_mhz2channel(uint freq, uint start_factor)
{ {
int ch = -1; int ch = -1;
uint base; uint base;
...@@ -133,5 +133,5 @@ int bcm_mhz2channel(uint freq, uint start_factor) ...@@ -133,5 +133,5 @@ int bcm_mhz2channel(uint freq, uint start_factor)
return ch; return ch;
} }
EXPORT_SYMBOL(bcm_mhz2channel); EXPORT_SYMBOL(brcmu_mhz2channel);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment