Commit 93dc9cc6 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8188eu: Add files for new driver - part 27

This commit adds files include/rtw_ht.h, include/rtw_io.h,
include/rtw_ioctl.h, include/rtw_ioctl_rtl.h, include/rtw_ioctl_set.h,
include/rtw_iol.h, and include/rtw_led.h.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 475b922e
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef _RTW_HT_H_
#define _RTW_HT_H_
#include <osdep_service.h>
#include "wifi.h"
struct ht_priv {
u32 ht_option;
u32 ampdu_enable;/* for enable Tx A-MPDU */
u32 tx_amsdu_enable;/* for enable Tx A-MSDU */
u32 tx_amdsu_maxlen; /* 1: 8k, 0:4k ; default:8k, for tx */
u32 rx_ampdu_maxlen; /* for rx reordering ctrl win_sz,
* updated when join_callback. */
u8 bwmode;/* */
u8 ch_offset;/* PRIME_CHNL_OFFSET */
u8 sgi;/* short GI */
/* for processing Tx A-MPDU */
u8 agg_enable_bitmap;
u8 candidate_tid_bitmap;
struct rtw_ieee80211_ht_cap ht_cap;
};
#endif /* _RTL871X_HT_H_ */
This diff is collapsed.
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef _RTW_IOCTL_H_
#define _RTW_IOCTL_H_
#include <osdep_service.h>
#include <drv_types.h>
#ifndef OID_802_11_CAPABILITY
#define OID_802_11_CAPABILITY 0x0d010122
#endif
#ifndef OID_802_11_PMKID
#define OID_802_11_PMKID 0x0d010123
#endif
/* For DDK-defined OIDs */
#define OID_NDIS_SEG1 0x00010100
#define OID_NDIS_SEG2 0x00010200
#define OID_NDIS_SEG3 0x00020100
#define OID_NDIS_SEG4 0x01010100
#define OID_NDIS_SEG5 0x01020100
#define OID_NDIS_SEG6 0x01020200
#define OID_NDIS_SEG7 0xFD010100
#define OID_NDIS_SEG8 0x0D010100
#define OID_NDIS_SEG9 0x0D010200
#define OID_NDIS_SEG10 0x0D020200
#define SZ_OID_NDIS_SEG1 23
#define SZ_OID_NDIS_SEG2 3
#define SZ_OID_NDIS_SEG3 6
#define SZ_OID_NDIS_SEG4 6
#define SZ_OID_NDIS_SEG5 4
#define SZ_OID_NDIS_SEG6 8
#define SZ_OID_NDIS_SEG7 7
#define SZ_OID_NDIS_SEG8 36
#define SZ_OID_NDIS_SEG9 24
#define SZ_OID_NDIS_SEG10 19
/* For Realtek-defined OIDs */
#define OID_MP_SEG1 0xFF871100
#define OID_MP_SEG2 0xFF818000
#define OID_MP_SEG3 0xFF818700
#define OID_MP_SEG4 0xFF011100
#define DEBUG_OID(dbg, str) \
if ((!dbg)) { \
RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_, \
("%s(%d): %s", __func__, __line__, str)); \
}
enum oid_type {
QUERY_OID,
SET_OID
};
struct oid_funs_node {
unsigned int oid_start; /* the starting number for OID */
unsigned int oid_end; /* the ending number for OID */
struct oid_obj_priv *node_array;
unsigned int array_sz; /* the size of node_array */
int query_counter; /* count the number of query hits for this segment */
int set_counter; /* count the number of set hits for this segment */
};
struct oid_par_priv {
void *adapter_context;
NDIS_OID oid;
void *information_buf;
u32 information_buf_len;
u32 *bytes_rw;
u32 *bytes_needed;
enum oid_type type_of_oid;
u32 dbg;
};
struct oid_obj_priv {
unsigned char dbg; /* 0: without OID debug message
* 1: with OID debug message */
int (*oidfuns)(struct oid_par_priv *poid_par_priv);
};
#if defined(_RTW_MP_IOCTL_C_)
static int oid_null_function(struct oid_par_priv *poid_par_priv) {
_func_enter_;
_func_exit_;
return NDIS_STATUS_SUCCESS;
}
#endif
extern struct iw_handler_def rtw_handlers_def;
int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid,
void *informationbuffer, u32 informationbufferlength,
u32 *byteswritten, u32 *bytesneeded);
int drv_set_info(struct net_device *MiniportAdapterContext,
NDIS_OID oid, void *informationbuffer,
u32 informationbufferlength, u32 *bytesread,
u32 *bytesneeded);
extern int ui_pid[3];
#endif /* #ifndef __INC_CEINFO_ */
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef _RTW_IOCTL_RTL_H_
#define _RTW_IOCTL_RTL_H_
#include <osdep_service.h>
#include <drv_types.h>
/* oid_rtl_seg_01_01 ************** */
int oid_rt_get_signal_quality_hdl(struct oid_par_priv *poid_par_priv);/* 84 */
int oid_rt_get_small_packet_crc_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_middle_packet_crc_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_large_packet_crc_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_tx_retry_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_rx_retry_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_rx_total_packet_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_tx_beacon_ok_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_tx_beacon_err_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_pro_set_fw_dig_state_hdl(struct oid_par_priv *poid_par_priv);/* 8a */
int oid_rt_pro_set_fw_ra_state_hdl(struct oid_par_priv *poid_par_priv); /* 8b */
int oid_rt_get_rx_icv_err_hdl(struct oid_par_priv *poid_par_priv);/* 93 */
int oid_rt_set_encryption_algorithm_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_preamble_mode_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_ap_ip_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_channelplan_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_set_channelplan_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_set_preamble_mode_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_set_bcn_intvl_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_dedicate_probe_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_total_tx_bytes_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_current_tx_power_level_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_enc_key_mismatch_count_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_enc_key_match_count_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_channel_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_hardware_radio_off_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_key_mismatch_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_supported_wireless_mode_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_channel_list_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_scan_in_progress_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_forced_data_rate_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_wireless_mode_for_scan_list_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_get_bss_wireless_mode_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_scan_with_magic_packet_hdl(struct oid_par_priv *poid_par_priv);
/* oid_rtl_seg_01_03 section start ************** */
int oid_rt_ap_get_associated_station_list_hdl(struct oid_par_priv *priv);
int oid_rt_ap_switch_into_ap_mode_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_ap_supported_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_ap_set_passphrase_hdl(struct oid_par_priv *poid_par_priv);
/* oid_rtl_seg_01_11 */
int oid_rt_pro_rf_write_registry_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv *poid_par_priv);
/* oid_rtl_seg_03_00 section start ************** */
int oid_rt_get_connect_state_hdl(struct oid_par_priv *poid_par_priv);
int oid_rt_set_default_key_id_hdl(struct oid_par_priv *poid_par_priv);
#endif
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __RTW_IOCTL_SET_H_
#define __RTW_IOCTL_SET_H_
#include <drv_types.h>
typedef u8 NDIS_802_11_PMKID_VALUE[16];
u8 rtw_set_802_11_add_key(struct adapter *adapt, struct ndis_802_11_key *key);
u8 rtw_set_802_11_authentication_mode(struct adapter *adapt,
enum ndis_802_11_auth_mode authmode);
u8 rtw_set_802_11_bssid(struct adapter*adapter, u8 *bssid);
u8 rtw_set_802_11_add_wep(struct adapter *adapter, struct ndis_802_11_wep *wep);
u8 rtw_set_802_11_disassociate(struct adapter *adapter);
u8 rtw_set_802_11_bssid_list_scan(struct adapter*adapter,
struct ndis_802_11_ssid *pssid,
int ssid_max_num);
u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
enum ndis_802_11_network_infra type);
u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
u8 rtw_set_802_11_remove_key(struct adapter *adapt,
struct ndis_802_11_remove_key *key);
u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
u16 rtw_get_cur_max_rate(struct adapter *adapter);
int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan);
int rtw_set_country(struct adapter *adapter, const char *country_code);
int rtw_change_ifname(struct adapter *padapter, const char *ifname);
#endif
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __RTW_IOL_H_
#define __RTW_IOL_H_
#include <osdep_service.h>
#include <drv_types.h>
#define IOREG_CMD_END_LEN 4
struct ioreg_cfg {
u8 length;
u8 cmd_id;
__le16 address;
__le32 data;
__le32 mask;
};
enum ioreg_cmd {
IOREG_CMD_LLT = 0x01,
IOREG_CMD_REFUSE = 0x02,
IOREG_CMD_EFUSE_PATH = 0x03,
IOREG_CMD_WB_REG = 0x04,
IOREG_CMD_WW_REG = 0x05,
IOREG_CMD_WD_REG = 0x06,
IOREG_CMD_W_RF = 0x07,
IOREG_CMD_DELAY_US = 0x10,
IOREG_CMD_DELAY_MS = 0x11,
IOREG_CMD_END = 0xFF,
};
struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter);
int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds,
u32 cmd_len);
int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary);
int rtw_IOL_exec_cmds_sync(struct adapter *adapter,
struct xmit_frame *xmit_frame, u32 max_wating_ms,
u32 bndy_cnt);
bool rtw_IOL_applied(struct adapter *adapter);
int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us);
int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms);
int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame);
void read_efuse_from_txpktbuf(struct adapter *adapter, int bcnhead,
u8 *content, u16 *size);
int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr,
u8 value, u8 mask);
int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr,
u16 value, u16 mask);
int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr,
u32 value, u32 mask);
int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path,
u16 addr, u32 value, u32 mask);
#define rtw_IOL_append_WB_cmd(xmit_frame, addr, value, mask) \
_rtw_IOL_append_WB_cmd((xmit_frame), (addr), (value) ,(mask))
#define rtw_IOL_append_WW_cmd(xmit_frame, addr, value, mask) \
_rtw_IOL_append_WW_cmd((xmit_frame), (addr), (value),(mask))
#define rtw_IOL_append_WD_cmd(xmit_frame, addr, value, mask) \
_rtw_IOL_append_WD_cmd((xmit_frame), (addr), (value), (mask))
#define rtw_IOL_append_WRF_cmd(xmit_frame, rf_path, addr, value, mask) \
_rtw_IOL_append_WRF_cmd((xmit_frame),(rf_path), (addr), (value), (mask))
u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame);
void rtw_IOL_cmd_buf_dump(struct adapter *Adapter,int buf_len,u8 *pbuf);
#endif /* __RTW_IOL_H_ */
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __RTW_LED_H_
#define __RTW_LED_H_
#include <osdep_service.h>
#include <drv_types.h>
#define MSECS(t) (HZ * ((t) / 1000) + (HZ * ((t) % 1000)) / 1000)
#define LED_BLINK_NORMAL_INTERVAL 100
#define LED_BLINK_SLOWLY_INTERVAL 200
#define LED_BLINK_LONG_INTERVAL 400
#define LED_BLINK_NO_LINK_INTERVAL_ALPHA 1000
#define LED_BLINK_LINK_INTERVAL_ALPHA 500 /* 500 */
#define LED_BLINK_SCAN_INTERVAL_ALPHA 180 /* 150 */
#define LED_BLINK_FASTER_INTERVAL_ALPHA 50
#define LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA 5000
#define LED_BLINK_NORMAL_INTERVAL_NETTRONIX 100
#define LED_BLINK_SLOWLY_INTERVAL_NETTRONIX 2000
#define LED_BLINK_SLOWLY_INTERVAL_PORNET 1000
#define LED_BLINK_NORMAL_INTERVAL_PORNET 100
#define LED_BLINK_FAST_INTERVAL_BITLAND 30
/* 060403, rcnjko: Customized for AzWave. */
#define LED_CM2_BLINK_ON_INTERVAL 250
#define LED_CM2_BLINK_OFF_INTERVAL 4750
#define LED_CM8_BLINK_INTERVAL 500 /* for QMI */
#define LED_CM8_BLINK_OFF_INTERVAL 3750 /* for QMI */
/* 080124, lanhsin: Customized for RunTop */
#define LED_RunTop_BLINK_INTERVAL 300
/* 060421, rcnjko: Customized for Sercomm Printer Server case. */
#define LED_CM3_BLINK_INTERVAL 1500
enum LED_CTL_MODE {
LED_CTL_POWER_ON = 1,
LED_CTL_LINK = 2,
LED_CTL_NO_LINK = 3,
LED_CTL_TX = 4,
LED_CTL_RX = 5,
LED_CTL_SITE_SURVEY = 6,
LED_CTL_POWER_OFF = 7,
LED_CTL_START_TO_LINK = 8,
LED_CTL_START_WPS = 9,
LED_CTL_STOP_WPS = 10,
LED_CTL_START_WPS_BOTTON = 11, /* added for runtop */
LED_CTL_STOP_WPS_FAIL = 12, /* added for ALPHA */
LED_CTL_STOP_WPS_FAIL_OVERLAP = 13, /* added for BELKIN */
LED_CTL_CONNECTION_NO_TRANSFER = 14,
};
enum LED_STATE_871x {
LED_UNKNOWN = 0,
RTW_LED_ON = 1,
RTW_LED_OFF = 2,
LED_BLINK_NORMAL = 3,
LED_BLINK_SLOWLY = 4,
LED_BLINK_POWER_ON = 5,
LED_BLINK_SCAN = 6, /* LED is blinking during scanning period,
* the # of times to blink is depend on time
* for scanning. */
LED_BLINK_NO_LINK = 7, /* LED is blinking during no link state. */
LED_BLINK_StartToBlink = 8,/* Customzied for Sercomm Printer
* Server case */
LED_BLINK_TXRX = 9,
LED_BLINK_WPS = 10, /* LED is blinkg during WPS communication */
LED_BLINK_WPS_STOP = 11, /* for ALPHA */
LED_BLINK_WPS_STOP_OVERLAP = 12, /* for BELKIN */
LED_BLINK_RUNTOP = 13, /* Customized for RunTop */
LED_BLINK_CAMEO = 14,
LED_BLINK_XAVI = 15,
LED_BLINK_ALWAYS_ON = 16,
};
enum LED_PIN_871x {
LED_PIN_NULL = 0,
LED_PIN_LED0 = 1,
LED_PIN_LED1 = 2,
LED_PIN_LED2 = 3,
LED_PIN_GPIO0 = 4,
};
struct LED_871x {
struct adapter *padapter;
enum LED_PIN_871x LedPin; /* Identify how to implement this
* SW led. */
enum LED_STATE_871x CurrLedState; /* Current LED state. */
enum LED_STATE_871x BlinkingLedState; /* Next state for blinking,
* either RTW_LED_ON or RTW_LED_OFF are. */
u8 bLedOn; /* true if LED is ON, false if LED is OFF. */
u8 bLedBlinkInProgress; /* true if it is blinking, false o.w.. */
u8 bLedWPSBlinkInProgress;
u32 BlinkTimes; /* Number of times to toggle led state for blinking. */
struct timer_list BlinkTimer; /* Timer object for led blinking. */
u8 bSWLedCtrl;
/* ALPHA, added by chiyoko, 20090106 */
u8 bLedNoLinkBlinkInProgress;
u8 bLedLinkBlinkInProgress;
u8 bLedStartToLinkBlinkInProgress;
u8 bLedScanBlinkInProgress;
struct work_struct BlinkWorkItem; /* Workitem used by BlinkTimer to
* manipulate H/W to blink LED. */
};
#define IS_LED_WPS_BLINKING(_LED_871x) \
(((struct LED_871x *)_LED_871x)->CurrLedState == LED_BLINK_WPS || \
((struct LED_871x *)_LED_871x)->CurrLedState == LED_BLINK_WPS_STOP || \
((struct LED_871x *)_LED_871x)->bLedWPSBlinkInProgress)
#define IS_LED_BLINKING(_LED_871x) \
(((struct LED_871x *)_LED_871x)->bLedWPSBlinkInProgress || \
((struct LED_871x *)_LED_871x)->bLedScanBlinkInProgress)
/* LED customization. */
enum LED_STRATEGY_871x {
SW_LED_MODE0 = 0, /* SW control 1 LED via GPIO0. It is default option.*/
SW_LED_MODE1= 1, /* 2 LEDs, through LED0 and LED1. For ALPHA. */
SW_LED_MODE2 = 2, /* SW control 1 LED via GPIO0, customized for AzWave
* 8187 minicard. */
SW_LED_MODE3 = 3, /* SW control 1 LED via GPIO0, customized for Sercomm
* Printer Server case. */
SW_LED_MODE4 = 4, /* for Edimax / Belkin */
SW_LED_MODE5 = 5, /* for Sercomm / Belkin */
SW_LED_MODE6 = 6, /* for 88CU minicard, porting from ce SW_LED_MODE7 */
HW_LED = 50, /* HW control 2 LEDs, LED0 and LED1 (there are 4
* different control modes, see MAC.CONFIG1 for details.)*/
LED_ST_NONE = 99,
};
void LedControl871x(struct adapter *padapter, enum LED_CTL_MODE LedAction);
struct led_priv{
/* add for led controll */
struct LED_871x SwLed0;
struct LED_871x SwLed1;
enum LED_STRATEGY_871x LedStrategy;
u8 bRegUseLed;
void (*LedControlHandler)(struct adapter *padapter,
enum LED_CTL_MODE LedAction);
/* add for led controll */
};
#define rtw_led_control(adapt, action) \
do { \
if ((adapt)->ledpriv.LedControlHandler) \
(adapt)->ledpriv.LedControlHandler((adapt), (action)); \
} while (0)
void BlinkTimerCallback(void *data);
void BlinkWorkItemCallback(struct work_struct *work);
void ResetLedStatus(struct LED_871x * pLed);
void InitLed871x(struct adapter *padapter, struct LED_871x *pLed,
enum LED_PIN_871x LedPin);
void DeInitLed871x(struct LED_871x *pLed);
/* hal... */
void BlinkHandler(struct LED_871x * pLed);
void SwLedOn(struct adapter *padapter, struct LED_871x *pLed);
void SwLedOff(struct adapter *padapter, struct LED_871x *pLed);
#endif /* __RTW_LED_H_ */
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