linux/drivers/net/wireless/broadcom/brcm80211/brcmsmac/antsel.c

/*
 * Copyright (c) 2010 Broadcom Corporation
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <linux/slab.h>
#include <net/mac80211.h>

#include "types.h"
#include "main.h"
#include "phy_shim.h"
#include "antsel.h"
#include "debug.h"

#define ANT_SELCFG_AUTO
#define ANT_SELCFG_MASK
#define ANT_SELCFG_TX_UNICAST
#define ANT_SELCFG_RX_UNICAST
#define ANT_SELCFG_TX_DEF
#define ANT_SELCFG_RX_DEF

/* useful macros */
#define BRCMS_ANTSEL_11N_0(ant)
#define BRCMS_ANTSEL_11N_1(ant)
#define BRCMS_ANTIDX_11N(ant)
#define BRCMS_ANT_ISAUTO_11N(ant)
#define BRCMS_ANTSEL_11N(ant)

/* antenna switch */
/* defines for no boardlevel antenna diversity */
#define ANT_SELCFG_DEF_2x2

/* 2x3 antdiv defines and tables for GPIO communication */
#define ANT_SELCFG_NUM_2x3
#define ANT_SELCFG_DEF_2x3

/* 2x4 antdiv rev4 defines and tables for GPIO communication */
#define ANT_SELCFG_NUM_2x4
#define ANT_SELCFG_DEF_2x4

static const u16 mimo_2x4_div_antselpat_tbl[] =;

static const u8 mimo_2x4_div_antselid_tbl[16] =;

static const u16 mimo_2x3_div_antselpat_tbl[] =;

static const u8 mimo_2x3_div_antselid_tbl[16] =;

/* boardlevel antenna selection: init antenna selection structure */
static void
brcms_c_antsel_init_cfg(struct antsel_info *asi, struct brcms_antselcfg *antsel,
		    bool auto_sel)
{}

struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc)
{}

void brcms_c_antsel_detach(struct antsel_info *asi)
{}

/*
 * boardlevel antenna selection:
 *   convert ant_cfg to mimo_antsel (ucode interface)
 */
static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)
{}

/* boardlevel antenna selection: ucode interface control */
static int brcms_c_antsel_cfgupd(struct antsel_info *asi,
				 struct brcms_antselcfg *antsel)
{}

void brcms_c_antsel_init(struct antsel_info *asi)
{}

/* boardlevel antenna selection: convert id to ant_cfg */
static u8 brcms_c_antsel_id2antcfg(struct antsel_info *asi, u8 id)
{}

void
brcms_c_antsel_antcfg_get(struct antsel_info *asi, bool usedef, bool sel,
		      u8 antselid, u8 fbantselid, u8 *antcfg,
		      u8 *fbantcfg)
{}

/* boardlevel antenna selection: convert mimo_antsel (ucode interface) to id */
u8 brcms_c_antsel_antsel2id(struct antsel_info *asi, u16 antsel)
{}