Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259793
b: refs/heads/master
c: 8d825a8
h: refs/heads/master
i:
  259791: 7ed4879
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 2965ded commit 41e77ff
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 100 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51851250f9838202acb03308b8011dacddd54ad4
refs/heads/master: 8d825a8e09f923dfc9af1135654516b7cbafed0f
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*/
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 6 additions & 14 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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) {
Expand All @@ -1038,15 +1030,15 @@ 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;
}

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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */

Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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);
}
Expand Down
Loading

0 comments on commit 41e77ff

Please sign in to comment.