Commit c5e7c035 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: removed iovar layer from softmac

Code cleanup. Softmac contained a redundant level of indirection, named
'iovar functionality'.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7306e4e3
...@@ -270,14 +270,14 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed) ...@@ -270,14 +270,14 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
WL_LOCK(wl); WL_LOCK(wl);
if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) { if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) {
if (wlc_iovar_setint if (wlc_set_par(wl->wlc, IOV_BCN_LI_BCN, conf->listen_interval)
(wl->wlc, "bcn_li_bcn", conf->listen_interval)) { < 0) {
wiphy_err(wiphy, "%s: Error setting listen_interval\n", wiphy_err(wiphy, "%s: Error setting listen_interval\n",
__func__); __func__);
err = -EIO; err = -EIO;
goto config_out; goto config_out;
} }
wlc_iovar_getint(wl->wlc, "bcn_li_bcn", &new_int); wlc_get_par(wl->wlc, IOV_BCN_LI_BCN, &new_int);
} }
if (changed & IEEE80211_CONF_CHANGE_MONITOR) if (changed & IEEE80211_CONF_CHANGE_MONITOR)
wiphy_err(wiphy, "%s: change monitor mode: %s (implement)\n", wiphy_err(wiphy, "%s: change monitor mode: %s (implement)\n",
...@@ -289,14 +289,14 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed) ...@@ -289,14 +289,14 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
"true" : "false"); "true" : "false");
if (changed & IEEE80211_CONF_CHANGE_POWER) { if (changed & IEEE80211_CONF_CHANGE_POWER) {
if (wlc_iovar_setint if (wlc_set_par(wl->wlc, IOV_QTXPOWER, conf->power_level * 4)
(wl->wlc, "qtxpower", conf->power_level * 4)) { < 0) {
wiphy_err(wiphy, "%s: Error setting power_level\n", wiphy_err(wiphy, "%s: Error setting power_level\n",
__func__); __func__);
err = -EIO; err = -EIO;
goto config_out; goto config_out;
} }
wlc_iovar_getint(wl->wlc, "qtxpower", &new_int); wlc_get_par(wl->wlc, IOV_QTXPOWER, &new_int);
if (new_int != (conf->power_level * 4)) if (new_int != (conf->power_level * 4))
wiphy_err(wiphy, "%s: Power level req != actual, %d %d" wiphy_err(wiphy, "%s: Power level req != actual, %d %d"
"\n", __func__, conf->power_level * 4, "\n", __func__, conf->power_level * 4,
...@@ -808,7 +808,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs, ...@@ -808,7 +808,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
wl->pub->ieee_hw = hw; wl->pub->ieee_hw = hw;
if (wlc_iovar_setint(wl->wlc, "mpc", 0)) { if (wlc_set_par(wl->wlc, IOV_MPC, 0) < 0) {
wiphy_err(wl->wiphy, "wl%d: Error setting MPC variable to 0\n", wiphy_err(wl->wiphy, "wl%d: Error setting MPC variable to 0\n",
unit); unit);
} }
...@@ -821,8 +821,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs, ...@@ -821,8 +821,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
wl->irq = irq; wl->irq = irq;
/* register module */ /* register module */
wlc_module_register(wl->pub, NULL, "linux", wl, NULL, wl_linux_watchdog, wlc_module_register(wl->pub, "linux", wl, wl_linux_watchdog, NULL);
NULL);
if (ieee_hw_init(hw)) { if (ieee_hw_init(hw)) {
wiphy_err(wl->wiphy, "wl%d: %s: ieee_hw_init failed!\n", unit, wiphy_err(wl->wiphy, "wl%d: %s: ieee_hw_init failed!\n", unit,
......
...@@ -898,12 +898,6 @@ extern void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec); ...@@ -898,12 +898,6 @@ extern void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec);
extern bool wlc_timers_init(struct wlc_info *wlc, int unit); extern bool wlc_timers_init(struct wlc_info *wlc, int unit);
extern const bcm_iovar_t wlc_iovars[];
extern int wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
const char *name, void *params, uint p_len, void *arg,
int len, int val_size, struct wlc_if *wlcif);
#if defined(BCMDBG) #if defined(BCMDBG)
extern void wlc_print_ies(struct wlc_info *wlc, u8 *ies, uint ies_len); extern void wlc_print_ies(struct wlc_info *wlc, u8 *ies, uint ies_len);
#endif #endif
......
...@@ -370,6 +370,13 @@ typedef struct wl_rxsts { ...@@ -370,6 +370,13 @@ typedef struct wl_rxsts {
#define WL_RXS_NFRM_AMSDU_FIRST 0x00000004 /* first MSDU in A-MSDU */ #define WL_RXS_NFRM_AMSDU_FIRST 0x00000004 /* first MSDU in A-MSDU */
#define WL_RXS_NFRM_AMSDU_SUB 0x00000008 /* subsequent MSDU(s) in A-MSDU */ #define WL_RXS_NFRM_AMSDU_SUB 0x00000008 /* subsequent MSDU(s) in A-MSDU */
enum wlc_par_id {
IOV_MPC = 1,
IOV_RTSTHRESH,
IOV_QTXPOWER,
IOV_BCN_LI_BCN /* Beacon listen interval in # of beacons */
};
/* forward declare and use the struct notation so we don't have to /* forward declare and use the struct notation so we don't have to
* have it defined if not necessary. * have it defined if not necessary.
*/ */
...@@ -492,8 +499,6 @@ extern uint wlc_down(struct wlc_info *wlc); ...@@ -492,8 +499,6 @@ extern uint wlc_down(struct wlc_info *wlc);
extern int wlc_set(struct wlc_info *wlc, int cmd, int arg); extern int wlc_set(struct wlc_info *wlc, int cmd, int arg);
extern int wlc_get(struct wlc_info *wlc, int cmd, int *arg); extern int wlc_get(struct wlc_info *wlc, int cmd, int *arg);
extern int wlc_iovar_getint(struct wlc_info *wlc, const char *name, int *arg);
extern int wlc_iovar_setint(struct wlc_info *wlc, const char *name, int arg);
extern bool wlc_chipmatch(u16 vendor, u16 device); extern bool wlc_chipmatch(u16 vendor, u16 device);
extern void wlc_init(struct wlc_info *wlc); extern void wlc_init(struct wlc_info *wlc);
extern void wlc_reset(struct wlc_info *wlc); extern void wlc_reset(struct wlc_info *wlc);
...@@ -506,9 +511,6 @@ extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc); ...@@ -506,9 +511,6 @@ extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc);
extern bool wlc_dpc(struct wlc_info *wlc, bool bounded); extern bool wlc_dpc(struct wlc_info *wlc, bool bounded);
extern bool wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu, extern bool wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
struct ieee80211_hw *hw); struct ieee80211_hw *hw);
extern int wlc_iovar_op(struct wlc_info *wlc, const char *name, void *params,
int p_len, void *arg, int len, bool set,
struct wlc_if *wlcif);
extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len, extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
struct wlc_if *wlcif); struct wlc_if *wlcif);
extern bool wlc_aggregatable(struct wlc_info *wlc, u8 tid); extern bool wlc_aggregatable(struct wlc_info *wlc, u8 tid);
...@@ -534,18 +536,15 @@ extern void wlc_default_rateset(struct wlc_info *wlc, wlc_rateset_t *rs); ...@@ -534,18 +536,15 @@ extern void wlc_default_rateset(struct wlc_info *wlc, wlc_rateset_t *rs);
struct ieee80211_sta; struct ieee80211_sta;
extern void wlc_ampdu_flush(struct wlc_info *wlc, struct ieee80211_sta *sta, extern void wlc_ampdu_flush(struct wlc_info *wlc, struct ieee80211_sta *sta,
u16 tid); u16 tid);
int wlc_set_par(struct wlc_info *wlc, enum wlc_par_id par_id, int val);
int wlc_get_par(struct wlc_info *wlc, enum wlc_par_id par_id, int *ret_int_ptr);
/* wlc_phy.c helper functions */ /* wlc_phy.c helper functions */
extern void wlc_set_ps_ctrl(struct wlc_info *wlc); extern void wlc_set_ps_ctrl(struct wlc_info *wlc);
extern void wlc_mctrl(struct wlc_info *wlc, u32 mask, u32 val); extern void wlc_mctrl(struct wlc_info *wlc, u32 mask, u32 val);
/* ioctl */ extern int wlc_module_register(struct wlc_pub *pub,
extern int wlc_iovar_check(struct wlc_pub *pub, const bcm_iovar_t *vi, const char *name, void *hdl,
void *arg,
int len, bool set);
extern int wlc_module_register(struct wlc_pub *pub, const bcm_iovar_t *iovars,
const char *name, void *hdl, iovar_fn_t iovar_fn,
watchdog_fn_t watchdog_fn, down_fn_t down_fn); watchdog_fn_t watchdog_fn, down_fn_t down_fn);
extern int wlc_module_unregister(struct wlc_pub *pub, const char *name, extern int wlc_module_unregister(struct wlc_pub *pub, const char *name,
void *hdl); void *hdl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment