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: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
8efba264d4
commit
69e87c22b6
|
@ -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))
|
||||
|
||||
|
|
|
@ -27,9 +27,7 @@
|
|||
*/
|
||||
|
||||
#include "ar6000_drv.h"
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
#include "cfg80211.h"
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
#include "htc.h"
|
||||
#include "wmi_filter_linux.h"
|
||||
#include "epping_test.h"
|
||||
|
@ -284,7 +282,6 @@ void ar6000_destroy(struct net_device *dev, unsigned int unregister);
|
|||
static void ar6000_detect_error(unsigned long ptr);
|
||||
static void ar6000_set_multicast_list(struct net_device *dev);
|
||||
static struct net_device_stats *ar6000_get_stats(struct net_device *dev);
|
||||
static struct iw_statistics *ar6000_get_iwstats(struct net_device * dev);
|
||||
|
||||
static void disconnect_timer_handler(unsigned long ptr);
|
||||
|
||||
|
@ -348,7 +345,6 @@ ar6000_sysfs_bmi_get_config(struct ar6_softc *ar, u32 mode);
|
|||
|
||||
struct net_device *ar6000_devices[MAX_AR6000];
|
||||
static int is_netdev_registered;
|
||||
extern struct iw_handler_def ath_iw_handler_def;
|
||||
DECLARE_WAIT_QUEUE_HEAD(arEvent);
|
||||
static void ar6000_cookie_init(struct ar6_softc *ar);
|
||||
static void ar6000_cookie_cleanup(struct ar6_softc *ar);
|
||||
|
@ -375,7 +371,6 @@ static struct net_device_ops ar6000_netdev_ops = {
|
|||
.ndo_open = ar6000_open,
|
||||
.ndo_stop = ar6000_close,
|
||||
.ndo_get_stats = ar6000_get_stats,
|
||||
.ndo_do_ioctl = ar6000_ioctl,
|
||||
.ndo_start_xmit = ar6000_data_tx,
|
||||
.ndo_set_multicast_list = ar6000_set_multicast_list,
|
||||
};
|
||||
|
@ -669,10 +664,6 @@ ar6000_init_module(void)
|
|||
memset(&aptcTR, 0, sizeof(APTC_TRAFFIC_RECORD));
|
||||
#endif /* ADAPTIVE_POWER_THROUGHPUT_CONTROL */
|
||||
|
||||
#ifdef CONFIG_HOST_GPIO_SUPPORT
|
||||
ar6000_gpio_init();
|
||||
#endif /* CONFIG_HOST_GPIO_SUPPORT */
|
||||
|
||||
status = HIFInit(&osdrvCallbacks);
|
||||
if (status)
|
||||
return -ENODEV;
|
||||
|
@ -1533,9 +1524,6 @@ init_netdev(struct net_device *dev, char *name)
|
|||
{
|
||||
dev->netdev_ops = &ar6000_netdev_ops;
|
||||
dev->watchdog_timeo = AR6000_TX_TIMEOUT;
|
||||
dev->wireless_handlers = &ath_iw_handler_def;
|
||||
|
||||
ath_iw_handler_def.get_wireless_stats = ar6000_get_iwstats; /*Displayed via proc fs */
|
||||
|
||||
/*
|
||||
* We need the OS to provide us with more headroom in order to
|
||||
|
@ -1620,9 +1608,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
struct ar6_softc *ar;
|
||||
int device_index = 0;
|
||||
struct htc_init_info htcInfo;
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
struct wireless_dev *wdev;
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
int r = 0;
|
||||
struct hif_device_os_device_info osDevInfo;
|
||||
|
||||
|
@ -1650,23 +1636,12 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
/* we use another local "i" variable below. */
|
||||
device_index = i;
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
wdev = ar6k_cfg80211_init(osDevInfo.pOSDevice);
|
||||
if (IS_ERR(wdev)) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: ar6k_cfg80211_init failed\n", __func__));
|
||||
return A_ERROR;
|
||||
}
|
||||
ar_netif = wdev_priv(wdev);
|
||||
#else
|
||||
dev = alloc_etherdev(sizeof(struct ar6_softc));
|
||||
if (dev == NULL) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_available: can't alloc etherdev\n"));
|
||||
return A_ERROR;
|
||||
}
|
||||
ether_setup(dev);
|
||||
ar_netif = ar6k_priv(dev);
|
||||
SET_NETDEV_DEV(dev, osDevInfo.pOSDevice);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
if (ar_netif == NULL) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Can't allocate ar6k priv memory\n", __func__));
|
||||
|
@ -1676,7 +1651,6 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
A_MEMZERO(ar_netif, sizeof(struct ar6_softc));
|
||||
ar = (struct ar6_softc *)ar_netif;
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
ar->wdev = wdev;
|
||||
wdev->iftype = NL80211_IFTYPE_STATION;
|
||||
|
||||
|
@ -1692,7 +1666,6 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
wdev->netdev = dev;
|
||||
ar->arNetworkType = INFRA_NETWORK;
|
||||
ar->smeState = SME_DISCONNECTED;
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
init_netdev(dev, ifname);
|
||||
|
||||
|
@ -2117,9 +2090,7 @@ ar6000_destroy(struct net_device *dev, unsigned int unregister)
|
|||
}
|
||||
free_netdev(dev);
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
ar6k_cfg80211_deinit(ar);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
#ifdef CONFIG_AP_VIRTUL_ADAPTER_SUPPORT
|
||||
ar6000_remove_ap_interface();
|
||||
|
@ -2267,11 +2238,9 @@ ar6000_open(struct net_device *dev)
|
|||
|
||||
spin_lock_irqsave(&ar->arLock, flags);
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
if(ar->arWlanState == WLAN_DISABLED) {
|
||||
ar->arWlanState = WLAN_ENABLED;
|
||||
}
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
if( ar->arConnected || bypasswmi) {
|
||||
netif_carrier_on(dev);
|
||||
|
@ -2288,12 +2257,9 @@ ar6000_open(struct net_device *dev)
|
|||
static int
|
||||
ar6000_close(struct net_device *dev)
|
||||
{
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
netif_stop_queue(dev);
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
ar6000_disconnect(ar);
|
||||
|
||||
if(ar->arWmiReady == true) {
|
||||
|
@ -2304,7 +2270,6 @@ ar6000_close(struct net_device *dev)
|
|||
ar->arWlanState = WLAN_DISABLED;
|
||||
}
|
||||
ar6k_cfg80211_scanComplete_event(ar, A_ECANCELED);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -4116,93 +4081,6 @@ ar6000_get_stats(struct net_device *dev)
|
|||
return &ar->arNetStats;
|
||||
}
|
||||
|
||||
static struct iw_statistics *
|
||||
ar6000_get_iwstats(struct net_device * dev)
|
||||
{
|
||||
struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev);
|
||||
TARGET_STATS *pStats = &ar->arTargetStats;
|
||||
struct iw_statistics * pIwStats = &ar->arIwStats;
|
||||
int rtnllocked;
|
||||
|
||||
if (ar->bIsDestroyProgress || ar->arWmiReady == false || ar->arWlanState == WLAN_DISABLED)
|
||||
{
|
||||
pIwStats->status = 0;
|
||||
pIwStats->qual.qual = 0;
|
||||
pIwStats->qual.level =0;
|
||||
pIwStats->qual.noise = 0;
|
||||
pIwStats->discard.code =0;
|
||||
pIwStats->discard.retries=0;
|
||||
pIwStats->miss.beacon =0;
|
||||
return pIwStats;
|
||||
}
|
||||
|
||||
/*
|
||||
* The in_atomic function is used to determine if the scheduling is
|
||||
* allowed in the current context or not. This was introduced in 2.6
|
||||
* From what I have read on the differences between 2.4 and 2.6, the
|
||||
* 2.4 kernel did not support preemption and so this check might not
|
||||
* be required for 2.4 kernels.
|
||||
*/
|
||||
if (in_atomic())
|
||||
{
|
||||
wmi_get_stats_cmd(ar->arWmi);
|
||||
|
||||
pIwStats->status = 1 ;
|
||||
pIwStats->qual.qual = pStats->cs_aveBeacon_rssi - 161;
|
||||
pIwStats->qual.level =pStats->cs_aveBeacon_rssi; /* noise is -95 dBm */
|
||||
pIwStats->qual.noise = pStats->noise_floor_calibation;
|
||||
pIwStats->discard.code = pStats->rx_decrypt_err;
|
||||
pIwStats->discard.retries = pStats->tx_retry_cnt;
|
||||
pIwStats->miss.beacon = pStats->cs_bmiss_cnt;
|
||||
return pIwStats;
|
||||
}
|
||||
|
||||
dev_hold(dev);
|
||||
rtnllocked = rtnl_is_locked();
|
||||
if (rtnllocked) {
|
||||
rtnl_unlock();
|
||||
}
|
||||
pIwStats->status = 0;
|
||||
|
||||
if (down_interruptible(&ar->arSem)) {
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
do {
|
||||
|
||||
if (ar->bIsDestroyProgress || ar->arWlanState == WLAN_DISABLED) {
|
||||
break;
|
||||
}
|
||||
|
||||
ar->statsUpdatePending = true;
|
||||
|
||||
if(wmi_get_stats_cmd(ar->arWmi) != 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == false, wmitimeout * HZ);
|
||||
if (signal_pending(current)) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000 : WMI get stats timeout \n"));
|
||||
break;
|
||||
}
|
||||
pIwStats->status = 1 ;
|
||||
pIwStats->qual.qual = pStats->cs_aveBeacon_rssi - 161;
|
||||
pIwStats->qual.level =pStats->cs_aveBeacon_rssi; /* noise is -95 dBm */
|
||||
pIwStats->qual.noise = pStats->noise_floor_calibation;
|
||||
pIwStats->discard.code = pStats->rx_decrypt_err;
|
||||
pIwStats->discard.retries = pStats->tx_retry_cnt;
|
||||
pIwStats->miss.beacon = pStats->cs_bmiss_cnt;
|
||||
} while (0);
|
||||
up(&ar->arSem);
|
||||
|
||||
err_exit:
|
||||
if (rtnllocked) {
|
||||
rtnl_lock();
|
||||
}
|
||||
dev_put(dev);
|
||||
return pIwStats;
|
||||
}
|
||||
|
||||
void
|
||||
ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, u32 sw_ver, u32 abi_ver)
|
||||
{
|
||||
|
@ -4224,6 +4102,29 @@ ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, u32 sw_ver, u32 abi_ver)
|
|||
wake_up(&arEvent);
|
||||
}
|
||||
|
||||
void ar6000_install_static_wep_keys(struct ar6_softc *ar)
|
||||
{
|
||||
u8 index;
|
||||
u8 keyUsage;
|
||||
|
||||
for (index = WMI_MIN_KEY_INDEX; index <= WMI_MAX_KEY_INDEX; index++) {
|
||||
if (ar->arWepKeyList[index].arKeyLen) {
|
||||
keyUsage = GROUP_USAGE;
|
||||
if (index == ar->arDefTxKeyIndex) {
|
||||
keyUsage |= TX_USAGE;
|
||||
}
|
||||
wmi_addKey_cmd(ar->arWmi,
|
||||
index,
|
||||
WEP_CRYPT,
|
||||
keyUsage,
|
||||
ar->arWepKeyList[index].arKeyLen,
|
||||
NULL,
|
||||
ar->arWepKeyList[index].arKey, KEY_OP_INIT_VAL, NULL,
|
||||
NO_SYNC_WMIFLAG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
add_new_sta(struct ar6_softc *ar, u8 *mac, u16 aid, u8 *wpaie,
|
||||
u8 ielen, u8 keymgmt, u8 ucipher, u8 auth)
|
||||
|
@ -4362,13 +4263,11 @@ skip_key:
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
ar6k_cfg80211_connect_event(ar, channel, bssid,
|
||||
listenInterval, beaconInterval,
|
||||
networkType, beaconIeLen,
|
||||
assocReqLen, assocRespLen,
|
||||
assocInfo);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
memcpy(ar->arBssid, bssid, sizeof(ar->arBssid));
|
||||
ar->arBssChannel = channel;
|
||||
|
@ -4482,26 +4381,6 @@ skip_key:
|
|||
|
||||
netif_wake_queue(ar->arNetDev);
|
||||
|
||||
/* For CFG80211 the key configuration and the default key comes in after connect so no point in plumbing invalid keys */
|
||||
#ifndef ATH6K_CONFIG_CFG80211
|
||||
if ((networkType & ADHOC_NETWORK) &&
|
||||
(OPEN_AUTH == ar->arDot11AuthMode) &&
|
||||
(NONE_AUTH == ar->arAuthMode) &&
|
||||
(WEP_CRYPT == ar->arPairwiseCrypto))
|
||||
{
|
||||
if (!ar->arConnected) {
|
||||
wmi_addKey_cmd(ar->arWmi,
|
||||
ar->arDefTxKeyIndex,
|
||||
WEP_CRYPT,
|
||||
GROUP_USAGE | TX_USAGE,
|
||||
ar->arWepKeyList[ar->arDefTxKeyIndex].arKeyLen,
|
||||
NULL,
|
||||
ar->arWepKeyList[ar->arDefTxKeyIndex].arKey, KEY_OP_INIT_VAL, NULL,
|
||||
NO_SYNC_WMIFLAG);
|
||||
}
|
||||
}
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
/* Update connect & link status atomically */
|
||||
spin_lock_irqsave(&ar->arLock, flags);
|
||||
ar->arConnected = true;
|
||||
|
@ -4631,11 +4510,9 @@ ar6000_disconnect_event(struct ar6_softc *ar, u8 reason, u8 *bssid,
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
ar6k_cfg80211_disconnect_event(ar, reason, bssid,
|
||||
assocRespLen, assocInfo,
|
||||
protocolReasonStatus);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
/* Send disconnect event to supplicant */
|
||||
A_MEMZERO(&wrqu, sizeof(wrqu));
|
||||
|
@ -4882,9 +4759,7 @@ ar6000_tkip_micerr_event(struct ar6_softc *ar, u8 keyid, bool ismcast)
|
|||
tag, s->mac[0],s->mac[1],s->mac[2],s->mac[3],s->mac[4],s->mac[5]);
|
||||
} else {
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
ar6k_cfg80211_tkip_micerr_event(ar, keyid, ismcast);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
A_PRINTF("AR6000 TKIP MIC error received for keyid %d %scast\n",
|
||||
keyid & 0x3, ismcast ? "multi": "uni");
|
||||
|
@ -4901,9 +4776,7 @@ void
|
|||
ar6000_scanComplete_event(struct ar6_softc *ar, int status)
|
||||
{
|
||||
|
||||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
ar6k_cfg80211_scanComplete_event(ar, status);
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
|
||||
if (!ar->arUserBssFilter) {
|
||||
wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0);
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue