Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267441
b: refs/heads/master
c: 54d7879
h: refs/heads/master
i:
  267439: 51ae335
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 06a0edf commit a6ae49d
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 178 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: 05b92610eef4646c252171d059a84c705b66ede5
refs/heads/master: 54d7879c4ed0b6cbed8f992efa67c954915bb2b6
115 changes: 70 additions & 45 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,16 @@
#define BRCMF_SCAN_RESULTS_ABORTED 3
#define BRCMF_SCAN_RESULTS_NO_MEM 4

#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
#define BRCMF_PRIMARY_KEY (1 << 1) /* primary (ie tx) key */
#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
#define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */
/* Indicates this key is using soft encrypt */
#define WL_SOFT_KEY (1 << 0)
/* primary (ie tx) key */
#define BRCMF_PRIMARY_KEY (1 << 1)
/* Reserved for backward compat */
#define WL_KF_RES_4 (1 << 4)
/* Reserved for backward compat */
#define WL_KF_RES_5 (1 << 5)
/* Indicates a group key for a IBSS PEER */
#define WL_IBSS_PEER_GROUP_KEY (1 << 6)

/* For supporting multiple interfaces */
#define BRCMF_MAX_IFS 16
Expand Down Expand Up @@ -333,13 +338,18 @@ enum brcmf_bus_state {
* that indicates which bits within the pattern should be matched.
*/
struct brcmf_pkt_filter_pattern {
u32 offset; /* Offset within received packet to start pattern matching.
* Offset '0' is the first byte of the ethernet header.
*/
u32 size_bytes; /* Size of the pattern. Bitmask must be the same size. */
u8 mask_and_pattern[1]; /* Variable length mask and pattern data. mask starts
* at offset 0. Pattern immediately follows mask.
*/
/*
* Offset within received packet to start pattern matching.
* Offset '0' is the first byte of the ethernet header.
*/
u32 offset;
/* Size of the pattern. Bitmask must be the same size.*/
u32 size_bytes;
/*
* Variable length mask and pattern data. mask starts at offset 0.
* Pattern immediately follows mask.
*/
u8 mask_and_pattern[1];
};

/* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
Expand Down Expand Up @@ -373,8 +383,8 @@ struct brcmf_bss_info {
u8 SSID_len;
u8 SSID[32];
struct {
uint count; /* # rates in this set */
u8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
uint count; /* # rates in this set */
u8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
} rateset; /* supported rates */
u16 chanspec; /* chanspec for bss */
u16 atim_window; /* units are Kusec */
Expand Down Expand Up @@ -409,7 +419,7 @@ struct brcmf_scan_params {
* DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
*/
u8 scan_type; /* flags, 0 use default */
s32 nprobes; /* -1 use default, number of probes per channel */
s32 nprobes; /* -1 use default, number of probes per channel */
s32 active_time; /* -1 use default, dwell time per channel for
* active scanning
*/
Expand Down Expand Up @@ -460,11 +470,13 @@ struct brcmf_scan_results {

/* used for association with a specific BSSID and chanspec list */
struct brcmf_assoc_params {
u8 bssid[ETH_ALEN]; /* 00:00:00:00:00:00: broadcast scan */
s32 chanspec_num; /* 0: all available channels,
* otherwise count of chanspecs in chanspec_list
*/
u16 chanspec_list[1]; /* list of chanspecs */
/* 00:00:00:00:00:00: broadcast scan */
u8 bssid[ETH_ALEN];
/* 0: all available channels, otherwise count of chanspecs in
* chanspec_list */
s32 chanspec_num;
/* list of chanspecs */
u16 chanspec_list[1];
};
#define BRCMF_ASSOC_PARAMS_FIXED_SIZE \
(sizeof(struct brcmf_assoc_params) - sizeof(u16))
Expand Down Expand Up @@ -495,8 +507,8 @@ struct brcmf_wsec_key {
u32 len; /* key length */
u8 data[WLAN_MAX_KEY_LEN]; /* key data */
u32 pad_1[18];
u32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
u32 flags; /* misc flags */
u32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
u32 flags; /* misc flags */
u32 pad_2[2];
int pad_3;
int iv_initialized; /* has IV been initialized already? */
Expand Down Expand Up @@ -558,32 +570,45 @@ struct brcmf_pub {
/* Dongle media info */
bool iswl; /* Dongle-resident driver is wl */
unsigned long drv_version; /* Version of dongle-resident driver */
u8 mac[ETH_ALEN]; /* MAC address obtained from dongle */
u8 mac[ETH_ALEN]; /* MAC address obtained from dongle */
struct dngl_stats dstats; /* Stats for dongle-based data */

/* Additional stats for the bus level */
unsigned long tx_packets; /* Data packets sent to dongle */
unsigned long tx_multicast; /* Multicast data packets sent to dongle */
unsigned long tx_errors; /* Errors in sending data to dongle */
unsigned long tx_ctlpkts; /* Control packets sent to dongle */
unsigned long tx_ctlerrs; /* Errors sending control frames to dongle */
unsigned long rx_packets; /* Packets sent up the network interface */
unsigned long rx_multicast; /* Multicast packets sent up the network
interface */
unsigned long rx_errors; /* Errors processing rx data packets */
unsigned long rx_ctlpkts; /* Control frames processed from dongle */
unsigned long rx_ctlerrs; /* Errors in processing rx control frames */
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 dpc scheduled by
watchdog timer */

unsigned long rx_readahead_cnt; /* Number of packets where header read-ahead
was used. */
unsigned long tx_realloc; /* Number of tx packets we had to realloc for
headroom */
unsigned long fc_packets; /* Number of flow control pkts recvd */

/* Data packets sent to dongle */
unsigned long tx_packets;
/* Multicast data packets sent to dongle */
unsigned long tx_multicast;
/* Errors in sending data to dongle */
unsigned long tx_errors;
/* Control packets sent to dongle */
unsigned long tx_ctlpkts;
/* Errors sending control frames to dongle */
unsigned long tx_ctlerrs;
/* Packets sent up the network interface */
unsigned long rx_packets;
/* Multicast packets sent up the network interface */
unsigned long rx_multicast;
/* Errors processing rx data packets */
unsigned long rx_errors;
/* Control frames processed from dongle */
unsigned long rx_ctlpkts;

/* Errors in processing rx control frames */
unsigned long rx_ctlerrs;
/* Packets dropped locally (no memory) */
unsigned long rx_dropped;
/* Packets flushed due to unscheduled sendup thread */
unsigned long rx_flushed;
/* Number of times dpc scheduled by watchdog timer */
unsigned long wd_dpc_sched;

/* Number of packets where header read-ahead was used. */
unsigned long rx_readahead_cnt;
/* Number of tx packets we had to realloc for headroom */
unsigned long tx_realloc;
/* Number of flow control pkts recvd */
unsigned long fc_packets;

/* Last error return */
int bcmerror;
Expand Down
23 changes: 11 additions & 12 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,20 +660,19 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
+ be16_to_cpu(hdr.len)) = '\0';

if (be32_to_cpu(hdr.discarded_bytes)
|| be32_to_cpu(hdr.discarded_printf)) {
BRCMF_ERROR(
("\nWLC_E_TRACE: [Discarded traces in dongle -->"
"discarded_bytes %d discarded_printf %d]\n",
be32_to_cpu(hdr.discarded_bytes),
be32_to_cpu(hdr.discarded_printf)));
}
|| be32_to_cpu(hdr.discarded_printf))
BRCMF_ERROR(("\nWLC_E_TRACE: [Discarded traces "
"in dongle -->discarded_bytes %d "
"discarded_printf %d]\n",
be32_to_cpu(hdr.discarded_bytes),
be32_to_cpu(hdr.discarded_printf)))
;

nblost = be32_to_cpu(hdr.seqnum) - seqnum_prev - 1;
if (nblost > 0) {
BRCMF_ERROR(
("\nWLC_E_TRACE: [Event lost --> seqnum %d nblost %d\n",
be32_to_cpu(hdr.seqnum), nblost));
}
if (nblost > 0)
BRCMF_ERROR(("\nWLC_E_TRACE: [Event lost --> "
"seqnum %d nblost %d\n",
be32_to_cpu(hdr.seqnum), nblost));
seqnum_prev = be32_to_cpu(hdr.seqnum);

/* Display the trace buffer. Advance from \n to \n to
Expand Down
27 changes: 15 additions & 12 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ module_param(brcmf_pktgen_len, uint, 0);

static int brcmf_toe_get(struct brcmf_info *drvr_priv, int idx, u32 *toe_ol);
static int brcmf_toe_set(struct brcmf_info *drvr_priv, int idx, u32 toe_ol);
static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata,
struct brcmf_event_msg *event_ptr,
static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx,
void *pktdata, struct brcmf_event_msg *event_ptr,
void **data_ptr);

static int brcmf_net2idx(struct brcmf_info *drvr_priv, struct net_device *net)
Expand Down Expand Up @@ -304,7 +304,8 @@ static void _brcmf_set_multicast_list(struct brcmf_info *drvr_priv, int ifidx)
}
}

static int _brcmf_set_mac_address(struct brcmf_info *drvr_priv, int ifidx, u8 *addr)
static int
_brcmf_set_mac_address(struct brcmf_info *drvr_priv, int ifidx, u8 *addr)
{
char buf[32];
struct brcmf_ioctl ioc;
Expand Down Expand Up @@ -369,7 +370,8 @@ static void brcmf_op_if(struct brcmf_if *ifp)
}
if (ret == 0) {
strcpy(ifp->net->name, ifp->name);
memcpy(netdev_priv(ifp->net), &drvr_priv, sizeof(drvr_priv));
memcpy(netdev_priv(ifp->net), &drvr_priv,
sizeof(drvr_priv));
err = brcmf_net_attach(&drvr_priv->pub, ifp->idx);
if (err != 0) {
BRCMF_ERROR(("%s: brcmf_net_attach failed, "
Expand Down Expand Up @@ -1025,7 +1027,8 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,

/* check for local brcmf ioctl and handle it */
if (driver == BRCMF_IOCTL_MAGIC) {
bcmerror = brcmf_c_ioctl((void *)&drvr_priv->pub, &ioc, buf, buflen);
bcmerror = brcmf_c_ioctl((void *)&drvr_priv->pub, &ioc,
buf, buflen);
if (bcmerror)
drvr_priv->pub.bcmerror = bcmerror;
goto done;
Expand Down Expand Up @@ -1055,9 +1058,8 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
if (is_set_key_cmd)
brcmf_netdev_wait_pend8021x(net);

bcmerror =
brcmf_proto_ioctl(&drvr_priv->pub, ifidx, (struct brcmf_ioctl *)&ioc,
buf, buflen);
bcmerror = brcmf_proto_ioctl(&drvr_priv->pub, ifidx,
(struct brcmf_ioctl *)&ioc, buf, buflen);

done:
if (!bcmerror && buf && ioc.buf) {
Expand Down Expand Up @@ -1254,8 +1256,8 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)

if (brcmf_sysioc) {
init_waitqueue_head(&drvr_priv->sysioc_waitq);
drvr_priv->sysioc_tsk = kthread_run(_brcmf_sysioc_thread, drvr_priv,
"_brcmf_sysioc");
drvr_priv->sysioc_tsk = kthread_run(_brcmf_sysioc_thread,
drvr_priv, "_brcmf_sysioc");
if (IS_ERR(drvr_priv->sysioc_tsk)) {
printk(KERN_WARNING
"_brcmf_sysioc thread failed to start\n");
Expand Down Expand Up @@ -1514,8 +1516,9 @@ int brcmf_os_proto_unblock(struct brcmf_pub *drvr)
return 0;
}

static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata,
struct brcmf_event_msg *event, void **data)
static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx,
void *pktdata, struct brcmf_event_msg *event,
void **data)
{
int bcmerror = 0;

Expand Down
Loading

0 comments on commit a6ae49d

Please sign in to comment.