Commit 8d825a8e authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: further renaming in fullmac sources

couple of items needed renaming to more consistent naming convention.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 51851250
......@@ -21,9 +21,9 @@ ccflags-y := \
-DBCMPLATFORM_BUS \
-DBCMSDIO \
-DBRCM_FULLMAC \
-DDHD_FIRSTREAD=64 \
-DBRCMF_FIRSTREAD=64 \
-DDHD_SCHED \
-DDHD_SDALIGN=64 \
-DBRCMF_SDALIGN=64 \
-DEMBEDDED_PLATFORM \
-DMAX_HDR_READ=64 \
-DMMC_SDIO_ABORT \
......
......@@ -725,20 +725,20 @@ typedef struct {
} bcmevent_name_t;
#if defined(CONFIG_PM_SLEEP)
extern atomic_t dhd_mmc_suspend;
extern atomic_t brcmf_mmc_suspend;
#define DHD_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a);
#define _DHD_PM_RESUME_WAIT(a, b) do { \
int retry = 0; \
while (atomic_read(&dhd_mmc_suspend) && retry++ != b) { \
while (atomic_read(&brcmf_mmc_suspend) && retry++ != b) { \
wait_event_timeout(a, false, HZ/100); \
} \
} while (0)
#define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 30)
#define DHD_PM_RESUME_WAIT_FOREVER(a) _DHD_PM_RESUME_WAIT(a, ~0)
#define DHD_PM_RESUME_RETURN_ERROR(a) \
do { if (atomic_read(&dhd_mmc_suspend)) return a; } while (0)
do { if (atomic_read(&brcmf_mmc_suspend)) return a; } while (0)
#define DHD_PM_RESUME_RETURN do { \
if (atomic_read(&dhd_mmc_suspend)) \
if (atomic_read(&brcmf_mmc_suspend)) \
return; \
} while (0)
......
......@@ -17,6 +17,14 @@
#ifndef _dhd_bus_h_
#define _dhd_bus_h_
/* Packet alignment for most efficient SDIO (can change based on platform) */
#ifndef BRCMF_SDALIGN
#define BRCMF_SDALIGN 32
#endif
#if !ISPOWEROF2(BRCMF_SDALIGN)
#error BRCMF_SDALIGN is not a power of 2!
#endif
/*
* Exported from dhd bus module (dhd_usb, dhd_sdio)
*/
......
......@@ -84,16 +84,8 @@ struct brcmf_proto_bdc_header {
int wifi_get_mac_addr(unsigned char *buf);
#endif
/* Packet alignment for most efficient SDIO (can change based on platform) */
#ifndef DHD_SDALIGN
#define DHD_SDALIGN 32
#endif
#if !ISPOWEROF2(DHD_SDALIGN)
#error DHD_SDALIGN is not a power of 2!
#endif
#define RETRIES 2 /* # of retries to retrieve matching ioctl response */
#define BUS_HEADER_LEN (16+DHD_SDALIGN) /* Must be atleast SDPCM_RESERVE
#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
......
......@@ -27,22 +27,15 @@
#include "dhd_proto.h"
#include "dhd_dbg.h"
#define BRCM_OUI "\x00\x10\x18"
#define BRCM_OUI "\x00\x10\x18"
#define DOT11_OUI_LEN 3
#define BCMILCP_BCM_SUBTYPE_EVENT 1
#define BCMILCP_BCM_SUBTYPE_EVENT 1
#define PKTFILTER_BUF_SIZE 2048
int brcmf_msg_level;
char brcmf_fw_path[MOD_PARAM_PATHLEN];
char brcmf_nv_path[MOD_PARAM_PATHLEN];
/* Packet alignment for most efficient SDIO (can change based on platform) */
#ifndef DHD_SDALIGN
#define DHD_SDALIGN 32
#endif
#if !ISPOWEROF2(DHD_SDALIGN)
#error DHD_SDALIGN is not a power of 2!
#endif
#define EPI_VERSION_STR "4.218.248.5"
#define MSGTRACE_VERSION 1
......@@ -1028,7 +1021,6 @@ void brcmf_c_pktfilter_offload_set(dhd_pub_t *dhd, char *arg)
char *argv[8], *buf = 0;
int i = 0;
char *arg_save = 0, *arg_org = 0;
#define BUF_SIZE 2048
arg_save = kmalloc(strlen(arg) + 1, GFP_ATOMIC);
if (!arg_save) {
......@@ -1038,7 +1030,7 @@ void brcmf_c_pktfilter_offload_set(dhd_pub_t *dhd, char *arg)
arg_org = arg_save;
buf = kmalloc(BUF_SIZE, GFP_ATOMIC);
buf = kmalloc(PKTFILTER_BUF_SIZE, GFP_ATOMIC);
if (!buf) {
DHD_ERROR(("%s: kmalloc failed\n", __func__));
goto fail;
......@@ -1046,7 +1038,7 @@ void brcmf_c_pktfilter_offload_set(dhd_pub_t *dhd, char *arg)
memcpy(arg_save, arg, strlen(arg) + 1);
if (strlen(arg) > BUF_SIZE) {
if (strlen(arg) > PKTFILTER_BUF_SIZE) {
DHD_ERROR(("Not enough buffer %d < %d\n", (int)strlen(arg),
(int)sizeof(buf)));
goto fail;
......@@ -1193,7 +1185,7 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd)
uint up = 0;
char buf[128], *ptr;
uint power_mode = PM_FAST;
u32 dongle_align = DHD_SDALIGN;
u32 dongle_align = BRCMF_SDALIGN;
u32 glom = 0;
uint bcn_timeout = 3;
int scan_assoc_time = 40;
......
......@@ -173,7 +173,7 @@ void wifi_del_dev(void)
#if defined(CONFIG_PM_SLEEP)
#include <linux/suspend.h>
atomic_t dhd_mmc_suspend;
atomic_t brcmf_mmc_suspend;
DECLARE_WAIT_QUEUE_HEAD(dhd_dpc_wait);
#endif /* defined(CONFIG_PM_SLEEP) */
......@@ -1910,7 +1910,7 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen)
g_bus = bus;
#endif
#if defined(CONFIG_PM_SLEEP)
atomic_set(&dhd_mmc_suspend, false);
atomic_set(&brcmf_mmc_suspend, false);
#endif /* defined(CONFIG_PM_SLEEP) */
/* && defined(DHD_GPL) */
/* Init lock suspend to prevent kernel going to suspend */
......@@ -2055,7 +2055,7 @@ int brcmf_iovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf,
return ret;
}
static struct net_device_ops dhd_ops_pri = {
static struct net_device_ops brcmf_netdev_ops_pri = {
.ndo_open = brcmf_netdev_open,
.ndo_stop = brcmf_netdev_stop,
.ndo_get_stats = brcmf_netdev_get_stats,
......@@ -2080,7 +2080,7 @@ int brcmf_net_attach(dhd_pub_t *dhdp, int ifidx)
ASSERT(net);
ASSERT(!net->netdev_ops);
net->netdev_ops = &dhd_ops_pri;
net->netdev_ops = &brcmf_netdev_ops_pri;
/*
* We have to use the primary MAC for virtual interfaces
......@@ -2168,7 +2168,7 @@ void brcmf_detach(dhd_pub_t *dhdp)
ifp = dhd->iflist[0];
ASSERT(ifp);
if (ifp->net->netdev_ops == &dhd_ops_pri) {
if (ifp->net->netdev_ops == &brcmf_netdev_ops_pri) {
brcmf_netdev_stop(ifp->net);
unregister_netdev(ifp->net);
}
......
......@@ -2095,7 +2095,7 @@ static s32 wl_cfg80211_resume(struct wiphy *wiphy)
WL_TRACE("Enter\n");
#if defined(CONFIG_PM_SLEEP)
atomic_set(&dhd_mmc_suspend, false);
atomic_set(&brcmf_mmc_suspend, false);
#endif /* defined(CONFIG_PM_SLEEP) */
if (test_bit(WL_STATUS_READY, &wl->status)) {
......@@ -2166,7 +2166,7 @@ static s32 wl_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow)
}
#if defined(CONFIG_PM_SLEEP)
atomic_set(&dhd_mmc_suspend, true);
atomic_set(&brcmf_mmc_suspend, true);
#endif /* defined(CONFIG_PM_SLEEP) */
WL_TRACE("Exit\n");
......@@ -4014,9 +4014,6 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
s32 wl_config_dongle(struct wl_priv *wl, bool need_lock)
{
#ifndef DHD_SDALIGN
#define DHD_SDALIGN 32
#endif
struct net_device *ndev;
struct wireless_dev *wdev;
s32 err = 0;
......@@ -4039,7 +4036,7 @@ s32 wl_config_dongle(struct wl_priv *wl, bool need_lock)
err = wl_dongle_power(ndev, PM_FAST);
if (unlikely(err))
goto default_conf_out;
err = wl_dongle_glom(ndev, 0, DHD_SDALIGN);
err = wl_dongle_glom(ndev, 0, BRCMF_SDALIGN);
if (unlikely(err))
goto default_conf_out;
......
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