Commit c6a9e1fc authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman
Browse files

staging: brcm80211: replaced wlc_info_t by struct wlc_info.



Part of code cleanup effort. Global replace of wlc_info_t with struct wlc_info.

Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e63449b7
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ void wlc_bsscfg_mfree(struct osl_info *osh, wlc_bsscfg_t *cfg)
	kfree(cfg);
}

void wlc_bsscfg_ID_assign(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg)
void wlc_bsscfg_ID_assign(struct wlc_info *wlc, wlc_bsscfg_t *bsscfg)
{
	bsscfg->ID = wlc->next_bsscfg_ID;
	wlc->next_bsscfg_ID++;
@@ -165,12 +165,13 @@ void wlc_bsscfg_ID_assign(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg)
/*
 * The common driver entry routine. Error codes should be unique
 */
wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
			      uint devid)
{
	wlc_info_t *wlc;
	struct wlc_info *wlc;

	wlc = (wlc_info_t *) wlc_calloc(osh, unit, sizeof(wlc_info_t));
	wlc = (struct wlc_info *) wlc_calloc(osh, unit,
					     sizeof(struct wlc_info));
	if (wlc == NULL) {
		*err = 1002;
		goto fail;
@@ -301,7 +302,7 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
	return NULL;
}

void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh)
void wlc_detach_mfree(struct wlc_info *wlc, struct osl_info *osh)
{
	if (wlc == NULL)
		return;
+3 −3
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@

extern void *wlc_calloc(struct osl_info *osh, uint unit, uint size);

extern wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
				     uint devid);
extern void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh);
extern struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit,
					  uint *err, uint devid);
extern void wlc_detach_mfree(struct wlc_info *wlc, struct osl_info *osh);

struct wlc_bsscfg;
extern struct wlc_bsscfg *wlc_bsscfg_malloc(struct osl_info *osh, uint unit);
+13 −16
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ typedef struct wlc_fifo_info {

/* AMPDU module specific state */
struct ampdu_info {
	wlc_info_t *wlc;	/* pointer to main wlc structure */
	struct wlc_info *wlc;	/* pointer to main wlc structure */
	int scb_handle;		/* scb cubby handle to retrieve data from scb */
	u8 ini_enable[AMPDU_MAX_SCB_TID];	/* per-tid initiator enable/disable of ampdu */
	u8 ba_tx_wsize;	/* Tx ba window size (in pdu) */
@@ -131,7 +131,7 @@ struct ampdu_info {
#define SCB_AMPDU_INI(scb_ampdu, tid) (&(scb_ampdu->ini[tid]))

static void wlc_ffpld_init(ampdu_info_t *ampdu);
static int wlc_ffpld_check_txfunfl(wlc_info_t *wlc, int f);
static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int f);
static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f);

static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
@@ -149,7 +149,7 @@ static void wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
					  struct sk_buff *p, tx_status_t *txs,
					  u32 frmtxstatus, u32 frmtxstatus2);

static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, struct sk_buff *p)
static inline u16 pkt_txh_seqnum(struct wlc_info *wlc, struct sk_buff *p)
{
	d11txh_t *txh;
	struct dot11_header *h;
@@ -158,7 +158,7 @@ static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, struct sk_buff *p)
	return ltoh16(h->seq) >> SEQNUM_SHIFT;
}

ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc)
ampdu_info_t *wlc_ampdu_attach(struct wlc_info *wlc)
{
	ampdu_info_t *ampdu;
	int i;
@@ -317,7 +317,7 @@ static void wlc_ffpld_init(ampdu_info_t *ampdu)
 * Return 1 if pre-loading not active, -1 if not an underflow event,
 * 0 if pre-loading module took care of the event.
 */
static int wlc_ffpld_check_txfunfl(wlc_info_t *wlc, int fid)
static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
{
	ampdu_info_t *ampdu = wlc->ampdu;
	u32 phy_rate = MCS_RATE(FFPLD_MAX_MCS, true, false);
@@ -491,7 +491,7 @@ int BCMFASTPATH
wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, struct sk_buff **pdu,
	      int prec)
{
	wlc_info_t *wlc;
	struct wlc_info *wlc;
	struct osl_info *osh;
	struct sk_buff *p, *pkt[AMPDU_MAX_MPDU];
	u8 tid, ndelim;
@@ -889,7 +889,7 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p,
		     tx_status_t *txs)
{
	scb_ampdu_t *scb_ampdu;
	wlc_info_t *wlc = ampdu->wlc;
	struct wlc_info *wlc = ampdu->wlc;
	scb_ampdu_tid_ini_t *ini;
	u32 s1 = 0, s2 = 0;
	struct ieee80211_tx_info *tx_info;
@@ -932,11 +932,8 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p,
	wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini);
}

void rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
		 tx_status_t *txs, u8 mcs);

void
rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
rate_status(struct wlc_info *wlc, struct ieee80211_tx_info *tx_info,
	    tx_status_t *txs, u8 mcs)
{
	struct ieee80211_tx_rate *txrate = tx_info->status.rates;
@@ -957,7 +954,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
			      u32 s1, u32 s2)
{
	scb_ampdu_t *scb_ampdu;
	wlc_info_t *wlc = ampdu->wlc;
	struct wlc_info *wlc = ampdu->wlc;
	scb_ampdu_tid_ini_t *ini;
	u8 bitmap[8], queue, tid;
	d11txh_t *txh;
@@ -1226,7 +1223,7 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,

int wlc_ampdu_set(ampdu_info_t *ampdu, bool on)
{
	wlc_info_t *wlc = ampdu->wlc;
	struct wlc_info *wlc = ampdu->wlc;

	wlc->pub->_ampdu = false;

@@ -1313,7 +1310,7 @@ wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
		return 0;
}

void wlc_ampdu_macaddr_upd(wlc_info_t *wlc)
void wlc_ampdu_macaddr_upd(struct wlc_info *wlc)
{
	char template[T_RAM_ACCESS_SZ * 2];

@@ -1324,14 +1321,14 @@ void wlc_ampdu_macaddr_upd(wlc_info_t *wlc)
			       template);
}

bool wlc_aggregatable(wlc_info_t *wlc, u8 tid)
bool wlc_aggregatable(struct wlc_info *wlc, u8 tid)
{
	return wlc->ampdu->ini_enable[tid];
}

void wlc_ampdu_shm_upd(ampdu_info_t *ampdu)
{
	wlc_info_t *wlc = ampdu->wlc;
	struct wlc_info *wlc = ampdu->wlc;

	/* Extend ucode internal watchdog timer to match larger received frames */
	if ((ampdu->rx_factor & HT_PARAMS_RX_FACTOR_MASK) ==
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#ifndef _wlc_ampdu_h_
#define _wlc_ampdu_h_

extern ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc);
extern ampdu_info_t *wlc_ampdu_attach(struct wlc_info *wlc);
extern void wlc_ampdu_detach(ampdu_info_t *ampdu);
extern bool wlc_ampdu_cap(ampdu_info_t *ampdu);
extern int wlc_ampdu_set(ampdu_info_t *ampdu, bool on);
@@ -26,7 +26,7 @@ extern int wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi,
extern void wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb,
				 struct sk_buff *p, tx_status_t *txs);
extern void wlc_ampdu_reset(ampdu_info_t *ampdu);
extern void wlc_ampdu_macaddr_upd(wlc_info_t *wlc);
extern void wlc_ampdu_macaddr_upd(struct wlc_info *wlc);
extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu);

extern u8 wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
+2 −2
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ const u8 mimo_2x3_div_antselid_tbl[16] = {
	0, 0, 0, 0, 0, 0, 0, 0	/* pat to antselid */
};

antsel_info_t *wlc_antsel_attach(wlc_info_t *wlc, struct osl_info *osh,
antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc, struct osl_info *osh,
						  wlc_pub_t *pub,
						  wlc_hw_info_t *wlc_hw) {
	antsel_info_t *asi;
@@ -297,7 +297,7 @@ static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg)
/* boardlevel antenna selection: ucode interface control */
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel)
{
	wlc_info_t *wlc = asi->wlc;
	struct wlc_info *wlc = asi->wlc;
	u8 ant_cfg;
	u16 mimo_antsel;

Loading