Commit 69e87c22 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Greg Kroah-Hartman

ath6kl: remove all the wext and super extended private ioctl crap

This removes all the wext and super extended ioctl crap.
The wext interfaces are already provided by cfg80211 and
the "private" ioctl stuff defined here is not even using
private wext, they are using netdev private ioctls!
This is completely unacceptable upstream. Die. Die Die.

As part of all this we end up removing the
CONFIG_HOST_GPIO_SUPPORT which ended up being heavily
abused by the internal ioctl work.

Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8efba264
......@@ -100,12 +100,6 @@ config AR600x_BT_RESET_PIN
help
WLAN GPIO to be used for resetting BT
config ATH6KL_CFG80211
bool "CFG80211 support"
depends on ATH6K_LEGACY && CFG80211
help
Enables support for CFG80211 APIs. The default option is to use WEXT. Even with this option enabled, WEXT is not explicitly disabled and the onus of not exercising WEXT lies on the application(s) running in the user space.
config ATH6KL_HTC_RAW_INTERFACE
bool "RAW HTC support"
depends on ATH6K_LEGACY
......
......@@ -85,11 +85,6 @@ ifeq ($(CONFIG_ATH6KL_CONFIG_GPIO_BT_RESET),y)
ccflags-y += -DATH6KL_CONFIG_GPIO_BT_RESET
endif
ifeq ($(CONFIG_ATH6KL_CFG80211),y)
ccflags-y += -DATH6K_CONFIG_CFG80211
ath6kl-y += os/linux/cfg80211.o
endif
ifeq ($(CONFIG_ATH6KL_HTC_RAW_INTERFACE),y)
ccflags-y += -DHTC_RAW_INTERFACE
endif
......@@ -135,12 +130,11 @@ ath6kl-y += htc2/htc_recv.o
ath6kl-y += htc2/htc_services.o
ath6kl-y += htc2/htc.o
ath6kl-y += bmi/src/bmi.o
ath6kl-y += os/linux/cfg80211.o
ath6kl-y += os/linux/ar6000_drv.o
ath6kl-y += os/linux/ar6000_raw_if.o
ath6kl-y += os/linux/ar6000_pm.o
ath6kl-y += os/linux/netbuf.o
ath6kl-y += os/linux/wireless_ext.o
ath6kl-y += os/linux/ioctl.o
ath6kl-y += os/linux/hci_bridge.o
ath6kl-y += miscdrv/common_drv.o
ath6kl-y += miscdrv/credit_dist.o
......
......@@ -130,19 +130,6 @@ extern "C" {
#define A_WMI_PEER_EVENT(devt, eventCode, bssid) \
ar6000_peer_event ((devt), (eventCode), (bssid))
#ifdef CONFIG_HOST_GPIO_SUPPORT
#define A_WMI_GPIO_INTR_RX(intr_mask, input_values) \
ar6000_gpio_intr_rx((intr_mask), (input_values))
#define A_WMI_GPIO_DATA_RX(reg_id, value) \
ar6000_gpio_data_rx((reg_id), (value))
#define A_WMI_GPIO_ACK_RX() \
ar6000_gpio_ack_rx()
#endif
#ifdef SEND_EVENT_TO_APP
#define A_WMI_SEND_EVENT_TO_APP(ar, eventId, datap, len) \
......@@ -158,11 +145,6 @@ extern "C" {
#endif
#ifdef CONFIG_HOST_TCMD_SUPPORT
#define A_WMI_TCMD_RX_REPORT_EVENT(devt, results, len) \
ar6000_tcmd_rx_report_event((devt), (results), (len))
#endif
#define A_WMI_HBCHALLENGERESP_EVENT(devt, cookie, source) \
ar6000_hbChallengeResp_event((devt), (cookie), (source))
......
......@@ -33,9 +33,7 @@
#include <linux/if_arp.h>
#include <linux/ip.h>
#include <linux/wireless.h>
#ifdef ATH6K_CONFIG_CFG80211
#include <net/cfg80211.h>
#endif /* ATH6K_CONFIG_CFG80211 */
#include <linux/module.h>
#include <asm/io.h>
......@@ -373,7 +371,6 @@ struct ar_wep_key {
u8 arKey[64];
} ;
#ifdef ATH6K_CONFIG_CFG80211
struct ar_key {
u8 key[WLAN_MAX_KEY_LEN];
u8 key_len;
......@@ -387,8 +384,6 @@ enum {
SME_CONNECTING,
SME_CONNECTED
};
#endif /* ATH6K_CONFIG_CFG80211 */
struct ar_node_mapping {
u8 macAddress[6];
......@@ -584,12 +579,10 @@ struct ar6_softc {
WMI_BTCOEX_STATS_EVENT arBtcoexStats;
s32 (*exitCallback)(void *config); /* generic callback at AR6K exit */
struct hif_device_os_device_info osDevInfo;
#ifdef ATH6K_CONFIG_CFG80211
struct wireless_dev *wdev;
struct cfg80211_scan_request *scan_request;
struct ar_key keys[WMI_MAX_KEY_INDEX + 1];
u32 smeState;
#endif /* ATH6K_CONFIG_CFG80211 */
u16 arWlanPowerState;
bool arWlanOff;
#ifdef CONFIG_PM
......@@ -619,30 +612,10 @@ struct ar_virtual_interface {
};
#endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */
#ifdef ATH6K_CONFIG_CFG80211
static inline void *ar6k_priv(struct net_device *dev)
{
return (wdev_priv(dev->ieee80211_ptr));
}
#else
#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT
static inline void *ar6k_priv(struct net_device *dev)
{
extern struct net_device *arApNetDev;
if (arApNetDev == dev) {
/* return arDev saved in virtual interface context */
struct ar_virtual_interface *arVirDev;
arVirDev = netdev_priv(dev);
return arVirDev->arDev;
} else {
return netdev_priv(dev);
}
}
#else
#define ar6k_priv netdev_priv
#endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */
#endif /* ATH6K_CONFIG_CFG80211 */
#define SET_HCI_BUS_TYPE(pHciDev, __bus, __type) do { \
(pHciDev)->bus = (__bus); \
......@@ -688,9 +661,6 @@ struct ar_giwscan_param {
spin_unlock_bh(lock); \
} while (0)
int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
int ar6000_ioctl_dispatcher(struct net_device *dev, struct ifreq *rq, int cmd);
void ar6000_gpio_init(void);
void ar6000_init_profile_info(struct ar6_softc *ar);
void ar6000_install_static_wep_keys(struct ar6_softc *ar);
int ar6000_init(struct net_device *dev);
......
......@@ -30,13 +30,6 @@ extern "C" {
#include <linux/version.h>
/*
* Host-side GPIO support is optional.
* If run-time access to GPIO pins is not required, then
* this should be changed to #undef.
*/
#define CONFIG_HOST_GPIO_SUPPORT
/*
* Host side Test Command support
*/
......
This diff is collapsed.
This diff is collapsed.
......@@ -132,12 +132,6 @@ wmi_set_params_event_rx(struct wmi_t *wmip, u8 *datap, u32 len);
static int
wmi_acm_reject_event_rx(struct wmi_t *wmip, u8 *datap, u32 len);
#ifdef CONFIG_HOST_GPIO_SUPPORT
static int wmi_gpio_intr_rx(struct wmi_t *wmip, u8 *datap, int len);
static int wmi_gpio_data_rx(struct wmi_t *wmip, u8 *datap, int len);
static int wmi_gpio_ack_rx(struct wmi_t *wmip, u8 *datap, int len);
#endif /* CONFIG_HOST_GPIO_SUPPORT */
#ifdef CONFIG_HOST_TCMD_SUPPORT
static int
wmi_tcmd_test_report_rx(struct wmi_t *wmip, u8 *datap, int len);
......@@ -865,17 +859,6 @@ wmi_control_rx_xtnd(struct wmi_t *wmip, void *osbuf)
status = wmi_dset_data_req_rx(wmip, datap, len);
break;
#endif /* CONFIG_HOST_DSET_SUPPORT */
#ifdef CONFIG_HOST_GPIO_SUPPORT
case (WMIX_GPIO_INTR_EVENTID):
wmi_gpio_intr_rx(wmip, datap, len);
break;
case (WMIX_GPIO_DATA_EVENTID):
wmi_gpio_data_rx(wmip, datap, len);
break;
case (WMIX_GPIO_ACK_EVENTID):
wmi_gpio_ack_rx(wmip, datap, len);
break;
#endif /* CONFIG_HOST_GPIO_SUPPORT */
case (WMIX_HB_CHALLENGE_RESP_EVENTID):
wmi_hbChallengeResp_rx(wmip, datap, len);
break;
......@@ -1208,7 +1191,7 @@ wmi_simple_cmd(struct wmi_t *wmip, WMI_COMMAND_ID cmdid)
/* Send a "simple" extended wmi command -- one with no arguments.
Enabling this command only if GPIO or profiling support is enabled.
This is to suppress warnings on some platforms */
#if defined(CONFIG_HOST_GPIO_SUPPORT) || defined(CONFIG_TARGET_PROFILE_SUPPORT)
#if defined(CONFIG_TARGET_PROFILE_SUPPORT)
static int
wmi_simple_cmd_xtnd(struct wmi_t *wmip, WMIX_COMMAND_ID cmdid)
{
......@@ -2298,46 +2281,6 @@ wmi_dbglog_event_rx(struct wmi_t *wmip, u8 *datap, int len)
return 0;
}
#ifdef CONFIG_HOST_GPIO_SUPPORT
static int
wmi_gpio_intr_rx(struct wmi_t *wmip, u8 *datap, int len)
{
WMIX_GPIO_INTR_EVENT *gpio_intr = (WMIX_GPIO_INTR_EVENT *)datap;
A_DPRINTF(DBG_WMI,
(DBGFMT "Enter - intrmask=0x%x input=0x%x.\n", DBGARG,
gpio_intr->intr_mask, gpio_intr->input_values));
A_WMI_GPIO_INTR_RX(gpio_intr->intr_mask, gpio_intr->input_values);
return 0;
}
static int
wmi_gpio_data_rx(struct wmi_t *wmip, u8 *datap, int len)
{
WMIX_GPIO_DATA_EVENT *gpio_data = (WMIX_GPIO_DATA_EVENT *)datap;
A_DPRINTF(DBG_WMI,
(DBGFMT "Enter - reg=%d value=0x%x\n", DBGARG,
gpio_data->reg_id, gpio_data->value));
A_WMI_GPIO_DATA_RX(gpio_data->reg_id, gpio_data->value);
return 0;
}
static int
wmi_gpio_ack_rx(struct wmi_t *wmip, u8 *datap, int len)
{
A_DPRINTF(DBG_WMI, (DBGFMT "Enter\n", DBGARG));
A_WMI_GPIO_ACK_RX();
return 0;
}
#endif /* CONFIG_HOST_GPIO_SUPPORT */
/*
* Called to send a wmi command. Command specific data is already built
* on osbuf and current osbuf->data points to it.
......@@ -4282,132 +4225,6 @@ wmi_set_powersave_timers_cmd(struct wmi_t *wmip,
NO_SYNC_WMIFLAG));
}
#ifdef CONFIG_HOST_GPIO_SUPPORT
/* Send a command to Target to change GPIO output pins. */
int
wmi_gpio_output_set(struct wmi_t *wmip,
u32 set_mask,
u32 clear_mask,
u32 enable_mask,
u32 disable_mask)
{
void *osbuf;
WMIX_GPIO_OUTPUT_SET_CMD *output_set;
int size;
size = sizeof(*output_set);
A_DPRINTF(DBG_WMI,
(DBGFMT "Enter - set=0x%x clear=0x%x enb=0x%x dis=0x%x\n", DBGARG,
set_mask, clear_mask, enable_mask, disable_mask));
osbuf = A_NETBUF_ALLOC(size);
if (osbuf == NULL) {
return A_NO_MEMORY;
}
A_NETBUF_PUT(osbuf, size);
output_set = (WMIX_GPIO_OUTPUT_SET_CMD *)(A_NETBUF_DATA(osbuf));
output_set->set_mask = set_mask;
output_set->clear_mask = clear_mask;
output_set->enable_mask = enable_mask;
output_set->disable_mask = disable_mask;
return (wmi_cmd_send_xtnd(wmip, osbuf, WMIX_GPIO_OUTPUT_SET_CMDID,
NO_SYNC_WMIFLAG));
}
/* Send a command to the Target requesting state of the GPIO input pins */
int
wmi_gpio_input_get(struct wmi_t *wmip)
{
A_DPRINTF(DBG_WMI, (DBGFMT "Enter\n", DBGARG));
return wmi_simple_cmd_xtnd(wmip, WMIX_GPIO_INPUT_GET_CMDID);
}
/* Send a command to the Target that changes the value of a GPIO register. */
int
wmi_gpio_register_set(struct wmi_t *wmip,
u32 gpioreg_id,
u32 value)
{
void *osbuf;
WMIX_GPIO_REGISTER_SET_CMD *register_set;
int size;
size = sizeof(*register_set);
A_DPRINTF(DBG_WMI,
(DBGFMT "Enter - reg=%d value=0x%x\n", DBGARG, gpioreg_id, value));
osbuf = A_NETBUF_ALLOC(size);
if (osbuf == NULL) {
return A_NO_MEMORY;
}
A_NETBUF_PUT(osbuf, size);
register_set = (WMIX_GPIO_REGISTER_SET_CMD *)(A_NETBUF_DATA(osbuf));
register_set->gpioreg_id = gpioreg_id;
register_set->value = value;
return (wmi_cmd_send_xtnd(wmip, osbuf, WMIX_GPIO_REGISTER_SET_CMDID,
NO_SYNC_WMIFLAG));
}
/* Send a command to the Target to fetch the value of a GPIO register. */
int
wmi_gpio_register_get(struct wmi_t *wmip,
u32 gpioreg_id)
{
void *osbuf;
WMIX_GPIO_REGISTER_GET_CMD *register_get;
int size;
size = sizeof(*register_get);
A_DPRINTF(DBG_WMI, (DBGFMT "Enter - reg=%d\n", DBGARG, gpioreg_id));
osbuf = A_NETBUF_ALLOC(size);
if (osbuf == NULL) {
return A_NO_MEMORY;
}
A_NETBUF_PUT(osbuf, size);
register_get = (WMIX_GPIO_REGISTER_GET_CMD *)(A_NETBUF_DATA(osbuf));
register_get->gpioreg_id = gpioreg_id;
return (wmi_cmd_send_xtnd(wmip, osbuf, WMIX_GPIO_REGISTER_GET_CMDID,
NO_SYNC_WMIFLAG));
}
/* Send a command to the Target acknowledging some GPIO interrupts. */
int
wmi_gpio_intr_ack(struct wmi_t *wmip,
u32 ack_mask)
{
void *osbuf;
WMIX_GPIO_INTR_ACK_CMD *intr_ack;
int size;
size = sizeof(*intr_ack);
A_DPRINTF(DBG_WMI, (DBGFMT "Enter ack_mask=0x%x\n", DBGARG, ack_mask));
osbuf = A_NETBUF_ALLOC(size);
if (osbuf == NULL) {
return A_NO_MEMORY;
}
A_NETBUF_PUT(osbuf, size);
intr_ack = (WMIX_GPIO_INTR_ACK_CMD *)(A_NETBUF_DATA(osbuf));
intr_ack->ack_mask = ack_mask;
return (wmi_cmd_send_xtnd(wmip, osbuf, WMIX_GPIO_INTR_ACK_CMDID,
NO_SYNC_WMIFLAG));
}
#endif /* CONFIG_HOST_GPIO_SUPPORT */
int
wmi_set_access_params_cmd(struct wmi_t *wmip, u8 ac, u16 txop, u8 eCWmin,
u8 eCWmax, u8 aifsn)
......@@ -4683,8 +4500,6 @@ wmi_tcmd_test_report_rx(struct wmi_t *wmip, u8 *datap, int len)
A_DPRINTF(DBG_WMI, (DBGFMT "Enter\n", DBGARG));
A_WMI_TCMD_RX_REPORT_EVENT(wmip->wmi_devt, datap, len);
return 0;
}
......
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