Skip to content

Commit

Permalink
staging: brcm80211: emptied wlioctl.h
Browse files Browse the repository at this point in the history
Code cleanup. Broadcom specific ioctl functionality is not necessary
in the Linux world. Deleted unused defines and structs from wlioctl.h.
Moved softmac specific items from wlioctl.h to softmac header files,
same for fullmac items. Moved shared fullmac/softmac definitions to other
header files.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent 6a9a25e commit 434c14e
Show file tree
Hide file tree
Showing 32 changed files with 993 additions and 1,555 deletions.
714 changes: 621 additions & 93 deletions drivers/staging/brcm80211/brcmfmac/dhd.h

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <dhd_proto.h>
#include <dhd_dbg.h>
#include <msgtrace.h>
#include <wlioctl.h>

int dhd_msg_level;
char fw_path[MOD_PARAM_PATHLEN];
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <dngl_stats.h>
#include <dhd.h>

#include <wlioctl.h>
#include <wl_iw.h>

#define WL_ERROR(fmt, args...) printk(fmt, ##args)
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmfmac/dhd_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define _dhd_proto_h_

#include <dhdioctl.h>
#include <wlioctl.h>

#ifndef IOCTL_RESP_TIMEOUT
#define IOCTL_RESP_TIMEOUT 2000 /* In milli second */
Expand Down
80 changes: 0 additions & 80 deletions drivers/staging/brcm80211/brcmfmac/dhdioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,84 +17,4 @@
#ifndef _dhdioctl_h_
#define _dhdioctl_h_

/* Linux network driver ioctl encoding */
typedef struct dhd_ioctl {
uint cmd; /* common ioctl definition */
void *buf; /* pointer to user buffer */
uint len; /* length of user buffer */
bool set; /* get or set request (optional) */
uint used; /* bytes read or written (optional) */
uint needed; /* bytes needed (optional) */
uint driver; /* to identify target driver */
} dhd_ioctl_t;

/* per-driver magic numbers */
#define DHD_IOCTL_MAGIC 0x00444944

/* bump this number if you change the ioctl interface */
#define DHD_IOCTL_VERSION 1

#define DHD_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
#define DHD_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */

/* common ioctl definitions */
#define DHD_GET_MAGIC 0
#define DHD_GET_VERSION 1
#define DHD_GET_VAR 2
#define DHD_SET_VAR 3

/* message levels */
#define DHD_ERROR_VAL 0x0001
#define DHD_TRACE_VAL 0x0002
#define DHD_INFO_VAL 0x0004
#define DHD_DATA_VAL 0x0008
#define DHD_CTL_VAL 0x0010
#define DHD_TIMER_VAL 0x0020
#define DHD_HDRS_VAL 0x0040
#define DHD_BYTES_VAL 0x0080
#define DHD_INTR_VAL 0x0100
#define DHD_LOG_VAL 0x0200
#define DHD_GLOM_VAL 0x0400
#define DHD_EVENT_VAL 0x0800
#define DHD_BTA_VAL 0x1000
#define DHD_ISCAN_VAL 0x2000

#ifdef SDTEST
/* For pktgen iovar */
typedef struct dhd_pktgen {
uint version; /* To allow structure change tracking */
uint freq; /* Max ticks between tx/rx attempts */
uint count; /* Test packets to send/rcv each attempt */
uint print; /* Print counts every <print> attempts */
uint total; /* Total packets (or bursts) */
uint minlen; /* Minimum length of packets to send */
uint maxlen; /* Maximum length of packets to send */
uint numsent; /* Count of test packets sent */
uint numrcvd; /* Count of test packets received */
uint numfail; /* Count of test send failures */
uint mode; /* Test mode (type of test packets) */
uint stop; /* Stop after this many tx failures */
} dhd_pktgen_t;

/* Version in case structure changes */
#define DHD_PKTGEN_VERSION 2

/* Type of test packets to use */
#define DHD_PKTGEN_ECHO 1 /* Send echo requests */
#define DHD_PKTGEN_SEND 2 /* Send discard packets */
#define DHD_PKTGEN_RXBURST 3 /* Request dongle send N packets */
#define DHD_PKTGEN_RECV 4 /* Continuous rx from continuous
tx dongle */
#endif /* SDTEST */

/* Enter idle immediately (no timeout) */
#define DHD_IDLE_IMMEDIATE (-1)

/* Values for idleclock iovar: other values are the sd_divisor to use
when idle */
#define DHD_IDLE_ACTIVE 0 /* Do not request any SD clock change
when idle */
#define DHD_IDLE_STOP (-1) /* Request SD clock be stopped
(and use SD1 mode) */

#endif /* _dhdioctl_h_ */
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <dngl_stats.h>
#include <dhd.h>
#include <dhdioctl.h>
#include <wlioctl.h>

#include <linux/kthread.h>
#include <linux/netdevice.h>
Expand Down
1 change: 0 additions & 1 deletion 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 <wlioctl.h>

struct wl_conf;
struct wl_iface;
Expand Down
20 changes: 18 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/wl_iw.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/semaphore.h>
#include <bcmdefs.h>
#include <linux/netdevice.h>
#include <wlioctl.h>

#include <bcmutils.h>

Expand All @@ -30,7 +29,6 @@
#include <dhdioctl.h>
#include <linux/ieee80211.h>
typedef const struct si_pub si_t;
#include <wlioctl.h>

#include <dngl_stats.h>
#include <dhd.h>
Expand Down Expand Up @@ -115,6 +113,24 @@ typedef struct iscan_info {
} iscan_info_t;
iscan_info_t *g_iscan;

typedef enum sup_auth_status {
WLC_SUP_DISCONNECTED = 0,
WLC_SUP_CONNECTING,
WLC_SUP_IDREQUIRED,
WLC_SUP_AUTHENTICATING,
WLC_SUP_AUTHENTICATED,
WLC_SUP_KEYXCHANGE,
WLC_SUP_KEYED,
WLC_SUP_TIMEOUT,
WLC_SUP_LAST_BASIC_STATE,
WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED,
WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE,
WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE,
WLC_SUP_KEYXCHANGE_PREP_M4,
WLC_SUP_KEYXCHANGE_WAIT_G1,
WLC_SUP_KEYXCHANGE_PREP_G2
} sup_auth_status_t;

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

/* Global ASSERT type flag */
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/wl_iw.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include <linux/wireless.h>

#include <wlioctl.h>

#define WL_SCAN_PARAMS_SSID_MAX 10
#define GET_SSID "SSID="
#define GET_CHANNEL "CH="
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/bcmsrom_tbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#ifndef _bcmsrom_tbl_h_
#define _bcmsrom_tbl_h_

#include "wlioctl.h"

typedef struct {
const char *name;
u32 revmask;
Expand Down
13 changes: 7 additions & 6 deletions drivers/staging/brcm80211/brcmsmac/d11.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@
#ifndef _D11_H
#define _D11_H

#include <linux/ieee80211.h>
#include <sbconfig.h>

#ifndef WL_RSSI_ANT_MAX
#define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
#elif WL_RSSI_ANT_MAX != 4
#error "WL_RSSI_ANT_MAX does not match"
#endif

/* cpp contortions to concatenate w/arg prescan */
#ifndef PAD
#define _PADLINE(line) pad ## line
Expand Down Expand Up @@ -56,6 +51,12 @@
#define TX_DATA_FIFO TX_AC_BE_FIFO
#define TX_CTL_FIFO TX_AC_VO_FIFO

#ifndef WL_RSSI_ANT_MAX
#define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
#elif WL_RSSI_ANT_MAX != 4
#error "WL_RSSI_ANT_MAX does not match"
#endif

typedef volatile struct {
u32 intstatus;
u32 intmask;
Expand Down
40 changes: 39 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

/*
* wlc_phy_hal.h: functionality exported from the phy to higher layers
*/

#ifndef _wlc_phy_h_
#define _wlc_phy_h_

#include <wlioctl.h>
#include <aiutils.h>
#include <d11.h>
#include <wlc_phy_shim.h>
#include <net/mac80211.h> /* struct wiphy */
#include "bcmwifi.h" /* chanspec_t */

#define IDCODE_VER_MASK 0x0000000f
#define IDCODE_VER_SHIFT 0
Expand Down Expand Up @@ -87,12 +91,20 @@

#define WLC_TXPWR_DB_FACTOR 4

/* a large TX Power as an init value to factor out of min() calculations,
* keep low enough to fit in an s8, units are .25 dBm
*/
#define WLC_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */

#define WLC_NUM_RATES_CCK 4
#define WLC_NUM_RATES_OFDM 8
#define WLC_NUM_RATES_MCS_1_STREAM 8
#define WLC_NUM_RATES_MCS_2_STREAM 8
#define WLC_NUM_RATES_MCS_3_STREAM 8
#define WLC_NUM_RATES_MCS_4_STREAM 8

#define WLC_RSSI_INVALID 0 /* invalid RSSI value */

typedef struct txpwr_limits {
u8 cck[WLC_NUM_RATES_CCK];
u8 ofdm[WLC_NUM_RATES_OFDM];
Expand All @@ -114,6 +126,32 @@ typedef struct txpwr_limits {
u8 mcs32;
} txpwr_limits_t;

typedef struct {
u32 flags;
chanspec_t chanspec; /* txpwr report for this channel */
chanspec_t local_chanspec; /* channel on which we are associated */
u8 local_max; /* local max according to the AP */
u8 local_constraint; /* local constraint according to the AP */
s8 antgain[2]; /* Ant gain for each band - from SROM */
u8 rf_cores; /* count of RF Cores being reported */
u8 est_Pout[4]; /* Latest tx power out estimate per RF chain */
u8 est_Pout_act[4]; /* Latest tx power out estimate per RF chain
* without adjustment
*/
u8 est_Pout_cck; /* Latest CCK tx power out estimate */
u8 tx_power_max[4]; /* Maximum target power among all rates */
u8 tx_power_max_rate_ind[4]; /* Index of the rate with the max target power */
u8 user_limit[WL_TX_POWER_RATES]; /* User limit */
u8 reg_limit[WL_TX_POWER_RATES]; /* Regulatory power limit */
u8 board_limit[WL_TX_POWER_RATES]; /* Max power board can support (SROM) */
u8 target[WL_TX_POWER_RATES]; /* Latest target power */
} tx_power_t;

typedef struct tx_inst_power {
u8 txpwr_est_Pout[2]; /* Latest estimate for 2.4 and 5 Ghz */
u8 txpwr_est_Pout_gofdm; /* Pwr estimate for 2.4 OFDM */
} tx_inst_power_t;

typedef struct {
u8 vec[MAXCHANNEL / NBBY];
} chanvec_t;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wl_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <linux/device.h> /* dev_err() */

/* wl_msg_level is a bit vector with defs in wlioctl.h */
/* wl_msg_level is a bit vector with defs in bcmdefs.h */
extern u32 wl_msg_level;

#define BCMMSG(dev, fmt, args...) \
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <bcmutils.h>
#include <bcmnvram.h>
#include <pcicfg.h>
#include <wlioctl.h>
#include <sbhnddma.h>

#include "phy/wlc_phy_int.h"
Expand Down
4 changes: 4 additions & 0 deletions drivers/staging/brcm80211/brcmsmac/wl_mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#ifndef _wl_mac80211_h_
#define _wl_mac80211_h_

/* softmac ioctl definitions */
#define WLC_SET_SHORTSLOT_OVERRIDE 146


/* BMAC Note: High-only driver is no longer working in softirq context as it needs to block and
* sleep so perimeter lock has to be a semaphore instead of spinlock. This requires timers to be
* submitted to workqueue instead of being on kernel timer
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <bcmdefs.h>
#include <bcmutils.h>
#include <aiutils.h>
#include <wlioctl.h>
#include <sbhnddma.h>

#include "d11.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <bcmdefs.h>
#include <bcmutils.h>
#include <aiutils.h>
#include <wlioctl.h>
#include <sbhnddma.h>
#include <hnddma.h>
#include <d11.h>
Expand Down
9 changes: 7 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/wlc_antsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <aiutils.h>
#include <bcmdevs.h>
#include <sbhnddma.h>
#include <wlioctl.h>

#include "d11.h"
#include "wlc_rate.h"
Expand All @@ -39,9 +38,15 @@
#include "wlc_channel.h"
#include "wlc_main.h"
#include "wl_export.h"
#include "wlc_phy_shim.h"
#include "wlc_antsel.h"

#define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */
#define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */
#define ANT_SELCFG_TX_UNICAST 0 /* unicast tx antenna configuration */
#define ANT_SELCFG_RX_UNICAST 1 /* unicast rx antenna configuration */
#define ANT_SELCFG_TX_DEF 2 /* default tx antenna configuration */
#define ANT_SELCFG_RX_DEF 3 /* default rx antenna configuration */

/* useful macros */
#define WLC_ANTSEL_11N_0(ant) ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf)
#define WLC_ANTSEL_11N_1(ant) (((ant) & ANT_SELCFG_MASK) & 0xf)
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <bcmotp.h>
#include <bcmutils.h>
#include <bcmnvram.h>
#include <wlioctl.h>
#include <sbconfig.h>
#include <sbchipc.h>
#include <pcicfg.h>
Expand All @@ -45,7 +44,6 @@
#include "wlc_scb.h"
#include "wlc_pub.h"
#include "wlc_key.h"
#include "wlc_phy_shim.h"
#include "phy/wlc_phy_hal.h"
#include "wlc_channel.h"
#include "wlc_main.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <bcmnvram.h>
#include <aiutils.h>
#include <sbhnddma.h>
#include <wlioctl.h>

#include "wlc_types.h"
#include "d11.h"
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/brcm80211/brcmsmac/wlc_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef _wlc_key_h_
#define _wlc_key_h_

#include <linux/if_ether.h> /* for ETH_ALEN */

struct scb;
struct wlc_info;
struct wlc_bsscfg;
Expand Down
Loading

0 comments on commit 434c14e

Please sign in to comment.