Skip to content

Commit

Permalink
staging: brcm80211: last nail into proto/ethernet.h
Browse files Browse the repository at this point in the history
cleaned up last artifacts used from proto/ethernet.h and
subsequently the file can be removed.

Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Dowan Kim <dowan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jan 20, 2011
1 parent 1e66108 commit a44d423
Show file tree
Hide file tree
Showing 27 changed files with 122 additions and 159 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ typedef struct dhd_pub {
/* Dongle media info */
bool iswl; /* Dongle-resident driver is wl */
unsigned long drv_version; /* Version of dongle-resident driver */
struct ether_addr mac; /* MAC address obtained from dongle */
dngl_stats_t dstats; /* Stats for dongle-based data */
u8 mac[ETH_ALEN]; /* MAC address obtained from dongle */
dngl_stats_t dstats; /* Stats for dongle-based data */

/* Additional stats for the bus level */
unsigned long tx_packets; /* Data packets sent to dongle */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ int dhd_prot_init(dhd_pub_t *dhd)
dhd_os_proto_unblock(dhd);
return ret;
}
memcpy(dhd->mac.octet, buf, ETH_ALEN);
memcpy(dhd->mac, buf, ETH_ALEN);

dhd_os_proto_unblock(dhd);

Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ static void wl_show_host_event(wl_event_msg_t *event, void *event_data)
auth_type = ntoh32(event->auth_type);
datalen = ntoh32(event->datalen);
/* debug dump of event messages */
sprintf(eabuf, "%pM", event->addr.octet);
sprintf(eabuf, "%pM", event->addr);

event_name = "UNKNOWN";
for (i = 0; i < ARRAY_SIZE(event_names); i++) {
Expand Down Expand Up @@ -1242,7 +1242,7 @@ int dhd_preinit_ioctls(dhd_pub_t *dhd)
int scan_unassoc_time = 40;
#ifdef GET_CUSTOM_MAC_ENABLE
int ret = 0;
struct ether_addr ea_addr;
u8 ea_addr[ETH_ALEN];
#endif /* GET_CUSTOM_MAC_ENABLE */

dhd_os_proto_block(dhd);
Expand All @@ -1254,9 +1254,9 @@ int dhd_preinit_ioctls(dhd_pub_t *dhd)
** firmware but unique per board mac address maybe provided by
** customer code
*/
ret = dhd_custom_get_mac_address(ea_addr.octet);
ret = dhd_custom_get_mac_address(ea_addr);
if (!ret) {
bcm_mkiovar("cur_etheraddr", (void *)&ea_addr, ETH_ALEN,
bcm_mkiovar("cur_etheraddr", (void *)ea_addr, ETH_ALEN,
buf, sizeof(buf));
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf, sizeof(buf));
if (ret < 0) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ int dhd_custom_get_mac_address(unsigned char *buf)
#ifdef EXAMPLE_GET_MAC
/* EXAMPLE code */
{
struct ether_addr ea_example = {
u8 ea_example[ETH_ALEN] = {
{0x00, 0x11, 0x22, 0x33, 0x44, 0xFF} };
bcopy((char *)&ea_example, buf, sizeof(struct ether_addr));
bcopy((char *)ea_example, buf, ETH_ALEN);
}
#endif /* EXAMPLE_GET_MAC */

Expand Down
11 changes: 5 additions & 6 deletions drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <bcmutils.h>
#include <bcmendian.h>

#include <proto/ethernet.h>
#include <dngl_stats.h>
#include <dhd.h>
#include <dhd_bus.h>
Expand Down Expand Up @@ -248,7 +247,7 @@ typedef struct dhd_info {
struct semaphore sysioc_sem;
bool set_multicast;
bool set_macaddress;
struct ether_addr macvalue;
u8 macvalue[ETH_ALEN];
wait_queue_head_t ctrl_wait;
atomic_t pend_8021x_cnt;

Expand Down Expand Up @@ -804,7 +803,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
}

static int
_dhd_set_mac_address(dhd_info_t *dhd, int ifidx, struct ether_addr *addr)
_dhd_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr)
{
char buf[32];
wl_ioctl_t ioc;
Expand Down Expand Up @@ -977,7 +976,7 @@ static int _dhd_sysioc_thread(void *data)
if (dhd->set_macaddress) {
dhd->set_macaddress = false;
_dhd_set_mac_address(dhd, i,
&dhd->macvalue);
dhd->macvalue);
}
}
}
Expand Down Expand Up @@ -1867,7 +1866,7 @@ static int dhd_open(struct net_device *net)
}
atomic_set(&dhd->pend_8021x_cnt, 0);

memcpy(net->dev_addr, dhd->pub.mac.octet, ETH_ALEN);
memcpy(net->dev_addr, dhd->pub.mac, ETH_ALEN);

#ifdef TOE
/* Get current TOE mode from dongle */
Expand Down Expand Up @@ -2300,7 +2299,7 @@ int dhd_net_attach(dhd_pub_t *dhdp, int ifidx)
*/
if (ifidx != 0) {
/* for virtual interfaces use the primary MAC */
memcpy(temp_addr, dhd->pub.mac.octet, ETH_ALEN);
memcpy(temp_addr, dhd->pub.mac, ETH_ALEN);

}

Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

static struct sdio_func *cfg80211_sdio_func;
static struct wl_dev *wl_cfg80211_dev;
static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255};

u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO;

Expand Down Expand Up @@ -647,7 +648,7 @@ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,

static void wl_iscan_prep(struct wl_scan_params *params, struct wlc_ssid *ssid)
{
memcpy(&params->bssid, &ether_bcast, ETH_ALEN);
memcpy(params->bssid, ether_bcast, ETH_ALEN);
params->bss_type = DOT11_BSSTYPE_ANY;
params->scan_type = 0;
params->nprobes = -1;
Expand Down Expand Up @@ -1372,7 +1373,7 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
memcpy(&join_params.ssid.SSID, sme->ssid, join_params.ssid.SSID_len);
join_params.ssid.SSID_len = htod32(join_params.ssid.SSID_len);
wl_update_prof(wl, NULL, &join_params.ssid, WL_PROF_SSID);
memcpy(&join_params.params.bssid, &ether_bcast, ETH_ALEN);
memcpy(join_params.params.bssid, ether_bcast, ETH_ALEN);

wl_ch_to_chanspec(wl->channel, &join_params, &join_params_size);
WL_DBG("join_param_size %d\n", join_params_size);
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <linux/wireless.h>
#include <linux/wireless.h>
#include <net/cfg80211.h>
#include <proto/ethernet.h>
#include <wlioctl.h>

struct wl_conf;
Expand Down Expand Up @@ -316,7 +315,7 @@ struct wl_priv {
cfg80211 layer */
struct wl_ie ie; /* information element object for
internal purpose */
struct ether_addr bssid; /* bssid of currently engaged network */
u8 bssid[ETH_ALEN]; /* bssid of currently engaged network */
struct semaphore event_sync; /* for synchronization of main event
thread */
struct wl_profile *profile; /* holding dongle profile */
Expand Down
11 changes: 7 additions & 4 deletions drivers/staging/brcm80211/brcmfmac/wl_iw.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ typedef struct iscan_info {
int iscan_ex_param_size;
} iscan_info_t;
iscan_info_t *g_iscan;

static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255};

static void wl_iw_timerfunc(unsigned long data);
static void wl_iw_set_event_mask(struct net_device *dev);
static int wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, u16 action);
Expand Down Expand Up @@ -688,7 +691,7 @@ wl_iw_set_spy(struct net_device *dev,

iw->spy_num = min_t(int, ARRAY_SIZE(iw->spy_addr), dwrq->length);
for (i = 0; i < iw->spy_num; i++)
memcpy(&iw->spy_addr[i], addr[i].sa_data, ETH_ALEN);
memcpy(iw->spy_addr[i], addr[i].sa_data, ETH_ALEN);
memset(iw->spy_qual, 0, sizeof(iw->spy_qual));

return 0;
Expand All @@ -710,7 +713,7 @@ wl_iw_get_spy(struct net_device *dev,

dwrq->length = iw->spy_num;
for (i = 0; i < iw->spy_num; i++) {
memcpy(addr[i].sa_data, &iw->spy_addr[i], ETH_ALEN);
memcpy(addr[i].sa_data, iw->spy_addr[i], ETH_ALEN);
addr[i].sa_family = AF_UNIX;
memcpy(&qual[i], &iw->spy_qual[i], sizeof(struct iw_quality));
iw->spy_qual[i].updated = 0;
Expand Down Expand Up @@ -1013,7 +1016,7 @@ static int wl_iw_iscan_prep(wl_scan_params_t *params, wlc_ssid_t *ssid)
{
int err = 0;

memcpy(&params->bssid, &ether_bcast, ETH_ALEN);
memcpy(params->bssid, ether_bcast, ETH_ALEN);
params->bss_type = DOT11_BSSTYPE_ANY;
params->scan_type = 0;
params->nprobes = -1;
Expand Down Expand Up @@ -1917,7 +1920,7 @@ wl_iw_set_essid(struct net_device *dev,

memcpy(&join_params.ssid.SSID, g_ssid.SSID, g_ssid.SSID_len);
join_params.ssid.SSID_len = htod32(g_ssid.SSID_len);
memcpy(&join_params.params.bssid, &ether_bcast, ETH_ALEN);
memcpy(join_params.params.bssid, ether_bcast, ETH_ALEN);

wl_iw_ch_to_chanspec(g_wl_iw_params.target_channel, &join_params,
&join_params_size);
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/brcm80211/brcmfmac/wl_iw.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <linux/wireless.h>

#include <proto/ethernet.h>
#include <wlioctl.h>

#define WL_SCAN_PARAMS_SSID_MAX 10
Expand Down Expand Up @@ -92,7 +91,7 @@ typedef struct wl_iw {
u32 gwsec;
bool privacy_invoked;

struct ether_addr spy_addr[IW_MAX_SPY];
u8 spy_addr[IW_MAX_SPY][ETH_ALEN];
struct iw_quality spy_qual[IW_MAX_SPY];
void *wlinfo;
dhd_pub_t *pub;
Expand Down
9 changes: 1 addition & 8 deletions drivers/staging/brcm80211/include/bcmutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@
/* fn(pkt, arg). return true if pkt belongs to if */
typedef bool(*ifpkt_cb_t) (void *, int);

/* forward definition of ether_addr structure used by some function prototypes */

struct ether_addr;

extern int ether_isbcast(const void *ea);
extern int ether_isnulladdr(const void *ea);

/* operations on a specific precedence in packet queue */

#define pktq_psetmax(pq, prec, _max) ((pq)->q[prec].max = (_max))
Expand Down Expand Up @@ -157,7 +150,7 @@ extern struct sk_buff *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out);
extern uint pkttotlen(struct osl_info *osh, struct sk_buff *p);

/* ethernet address */
extern int bcm_ether_atoe(char *p, struct ether_addr *ea);
extern int bcm_ether_atoe(char *p, u8 *ea);

/* ip address */
struct ipv4_addr;
Expand Down
20 changes: 10 additions & 10 deletions drivers/staging/brcm80211/include/proto/802.11.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef _802_11_H_
#define _802_11_H_

#include <proto/ethernet.h>
#include <linux/if_ether.h>

#define DOT11_A3_HDR_LEN 24
#define DOT11_A4_HDR_LEN 30
Expand Down Expand Up @@ -47,18 +47,18 @@
struct dot11_header {
u16 fc;
u16 durid;
struct ether_addr a1;
struct ether_addr a2;
struct ether_addr a3;
u8 a1[ETH_ALEN];
u8 a2[ETH_ALEN];
u8 a3[ETH_ALEN];
u16 seq;
struct ether_addr a4;
u8 a4[ETH_ALEN];
} __attribute__((packed));

struct dot11_rts_frame {
u16 fc;
u16 durid;
struct ether_addr ra;
struct ether_addr ta;
u8 ra[ETH_ALEN];
u8 ta[ETH_ALEN];
} __attribute__((packed));

#define DOT11_RTS_LEN 16
Expand All @@ -71,9 +71,9 @@ struct dot11_rts_frame {
struct dot11_management_header {
u16 fc;
u16 durid;
struct ether_addr da;
struct ether_addr sa;
struct ether_addr bssid;
u8 da[ETH_ALEN];
u8 sa[ETH_ALEN];
u8 bssid[ETH_ALEN];
u16 seq;
} __attribute__((packed));
#define DOT11_MGMT_HDR_LEN 24
Expand Down
4 changes: 3 additions & 1 deletion drivers/staging/brcm80211/include/proto/bcmevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef _BCMEVENT_H_
#define _BCMEVENT_H_

#include <linux/if_ether.h>

#define BCM_EVENT_MSG_VERSION 1
#define BCM_MSG_IFNAME_MAX 16

Expand All @@ -32,7 +34,7 @@ typedef struct {
u32 reason;
u32 auth_type;
u32 datalen;
struct ether_addr addr;
u8 addr[ETH_ALEN];
char ifname[BCM_MSG_IFNAME_MAX];
} __attribute__((packed)) wl_event_msg_t;

Expand Down
29 changes: 0 additions & 29 deletions drivers/staging/brcm80211/include/proto/ethernet.h

This file was deleted.

Loading

0 comments on commit a44d423

Please sign in to comment.