/* Include Wireless Extension definition and check version */
#include <net/iw_handler.h> /* New driver API */
-extern int ks_wlan_hw_tx(ks_wlan_private *priv, void *p, unsigned long size,
+extern int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
void (*complete_handler)(void *arg1, void *arg2),
void *arg1, void *arg2 );
extern void send_packet_complete(void *, void *);
-extern void ks_wlan_hw_wakeup_request(ks_wlan_private *priv);
-extern int ks_wlan_hw_power_save(ks_wlan_private *priv);
+extern void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv);
+extern int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
/* macro */
#define inc_smeqhead(priv) \
#define KS_WLAN_MEM_FLAG (GFP_ATOMIC)
static
-inline u8 get_BYTE(ks_wlan_private *priv)
+inline u8 get_BYTE(struct ks_wlan_private *priv)
{
u8 data;
data = *(priv->rxp)++;
}
static
-inline u16 get_WORD(ks_wlan_private *priv)
+inline u16 get_WORD(struct ks_wlan_private *priv)
{
u16 data;
data = (get_BYTE(priv) & 0xff);
}
static
-inline u32 get_DWORD(ks_wlan_private *priv)
+inline u32 get_DWORD(struct ks_wlan_private *priv)
{
u32 data;
data = (get_BYTE(priv) & 0xff);
void ks_wlan_hw_wakeup_task(struct work_struct *work)
{
- ks_wlan_private *priv = container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task);
+ struct ks_wlan_private *priv = container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task);
int ps_status = atomic_read(&priv->psstatus.status);
if(ps_status==PS_SNOOZE){
}
static
-int ks_wlan_do_power_save(ks_wlan_private *priv)
+int ks_wlan_do_power_save(struct ks_wlan_private *priv)
{
int rc=0;
}
static
-int get_current_ap(ks_wlan_private *priv, struct link_ap_info_t *ap_info)
+int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info)
{
struct local_ap_t *ap;
union iwreq_data wrqu;
}
static
-int get_ap_information(ks_wlan_private *priv, struct ap_info_t *ap_info, struct local_ap_t *ap)
+int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, struct local_ap_t *ap)
{
unsigned char *bp;
int bsize,offset;
}
static
-void hostif_data_indication(ks_wlan_private *priv)
+void hostif_data_indication(struct ks_wlan_private *priv)
{
unsigned int rx_ind_size; /* indicate data size */
struct sk_buff *skb;
}
static
-void hostif_mib_get_confirm(ks_wlan_private *priv)
+void hostif_mib_get_confirm(struct ks_wlan_private *priv)
{
struct net_device *dev=priv->net_dev;
uint32_t mib_status;
}
static
-void hostif_mib_set_confirm(ks_wlan_private *priv)
+void hostif_mib_set_confirm(struct ks_wlan_private *priv)
{
uint32_t mib_status; /* +04 MIB Status */
uint32_t mib_attribute; /* +08 MIB attribute */
}
static
-void hostif_power_mngmt_confirm(ks_wlan_private *priv)
+void hostif_power_mngmt_confirm(struct ks_wlan_private *priv)
{
DPRINTK(3,"\n");
}
static
-void hostif_sleep_confirm(ks_wlan_private *priv)
+void hostif_sleep_confirm(struct ks_wlan_private *priv)
{
DPRINTK(3,"\n");
}
static
-void hostif_start_confirm(ks_wlan_private *priv)
+void hostif_start_confirm(struct ks_wlan_private *priv)
{
#ifdef WPS
union iwreq_data wrqu;
}
static
-void hostif_connect_indication(ks_wlan_private *priv)
+void hostif_connect_indication(struct ks_wlan_private *priv)
{
unsigned short connect_code;
unsigned int tmp=0;
}
static
-void hostif_scan_indication(ks_wlan_private *priv)
+void hostif_scan_indication(struct ks_wlan_private *priv)
{
int i;
struct ap_info_t *ap_info;
}
static
-void hostif_stop_confirm(ks_wlan_private *priv)
+void hostif_stop_confirm(struct ks_wlan_private *priv)
{
unsigned int tmp=0;
unsigned int old_status=priv->connect_status;
}
static
-void hostif_ps_adhoc_set_confirm(ks_wlan_private *priv)
+void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)
{
DPRINTK(3,"\n");
priv->infra_status = 0; /* infrastructure mode cancel */
}
static
-void hostif_infrastructure_set_confirm(ks_wlan_private *priv)
+void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
{
uint16_t result_code;
DPRINTK(3,"\n");
}
static
-void hostif_adhoc_set_confirm(ks_wlan_private *priv)
+void hostif_adhoc_set_confirm(struct ks_wlan_private *priv)
{
DPRINTK(3,"\n");
priv->infra_status = 1; /* infrastructure mode set */
}
static
-void hostif_associate_indication(ks_wlan_private *priv)
+void hostif_associate_indication(struct ks_wlan_private *priv)
{
struct association_request_t *assoc_req;
struct association_response_t *assoc_resp;
}
static
-void hostif_bss_scan_confirm(ks_wlan_private *priv)
+void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
{
unsigned int result_code;
struct net_device *dev = priv->net_dev;
}
static
-void hostif_phy_information_confirm(ks_wlan_private *priv)
+void hostif_phy_information_confirm(struct ks_wlan_private *priv)
{
struct iw_statistics *wstats = &priv->wstats;
unsigned char rssi,signal,noise;
}
static
-void hostif_mic_failure_confirm(ks_wlan_private *priv)
+void hostif_mic_failure_confirm(struct ks_wlan_private *priv)
{
DPRINTK(3,"mic_failure=%u\n",priv->wpa.mic_failure.failure);
hostif_sme_enqueue(priv, SME_MIC_FAILURE_CONFIRM);
static
-void hostif_event_check(ks_wlan_private *priv)
+void hostif_event_check(struct ks_wlan_private *priv)
{
unsigned short event;
#define CHECK_ALINE(size) (size%4 ? (size+(4-(size%4))):size)
-int hostif_data_request(ks_wlan_private *priv, struct sk_buff *packet)
+int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
{
unsigned int packet_len=0;
} }while(0)
static
-void hostif_mib_get_request( ks_wlan_private *priv, unsigned long mib_attribute)
+void hostif_mib_get_request( struct ks_wlan_private *priv, unsigned long mib_attribute)
{
struct hostif_mib_get_request_t *pp;
}
static
-void hostif_mib_set_request( ks_wlan_private *priv, unsigned long mib_attribute,
+void hostif_mib_set_request( struct ks_wlan_private *priv, unsigned long mib_attribute,
unsigned short size, unsigned short type,
void *vp )
{
}
static
-void hostif_start_request( ks_wlan_private *priv, unsigned char mode )
+void hostif_start_request( struct ks_wlan_private *priv, unsigned char mode )
{
struct hostif_start_request_t *pp;
}
static
-void hostif_ps_adhoc_set_request(ks_wlan_private *priv)
+void hostif_ps_adhoc_set_request(struct ks_wlan_private *priv)
{
struct hostif_ps_adhoc_set_request_t *pp;
uint16_t capability;
}
static
-void hostif_infrastructure_set_request(ks_wlan_private *priv)
+void hostif_infrastructure_set_request(struct ks_wlan_private *priv)
{
struct hostif_infrastructure_set_request_t *pp;
uint16_t capability;
ks_wlan_hw_tx( priv, pp, hif_align_size(sizeof(*pp)),NULL, NULL, NULL);
}
-void hostif_infrastructure_set2_request(ks_wlan_private *priv)
+void hostif_infrastructure_set2_request(struct ks_wlan_private *priv)
{
struct hostif_infrastructure_set2_request_t *pp;
uint16_t capability;
}
static
-void hostif_adhoc_set_request(ks_wlan_private *priv)
+void hostif_adhoc_set_request(struct ks_wlan_private *priv)
{
struct hostif_adhoc_set_request_t *pp;
uint16_t capability;
}
static
-void hostif_adhoc_set2_request(ks_wlan_private *priv)
+void hostif_adhoc_set2_request(struct ks_wlan_private *priv)
{
struct hostif_adhoc_set2_request_t *pp;
uint16_t capability;
}
static
-void hostif_stop_request( ks_wlan_private *priv )
+void hostif_stop_request( struct ks_wlan_private *priv )
{
struct hostif_stop_request_t *pp;
}
static
-void hostif_phy_information_request( ks_wlan_private *priv )
+void hostif_phy_information_request( struct ks_wlan_private *priv )
{
struct hostif_phy_information_request_t *pp;
}
static
-void hostif_power_mngmt_request( ks_wlan_private *priv, unsigned long mode,
+void hostif_power_mngmt_request( struct ks_wlan_private *priv, unsigned long mode,
unsigned long wake_up, unsigned long receiveDTIMs )
{
struct hostif_power_mngmt_request_t *pp;
}
static
-void hostif_sleep_request( ks_wlan_private *priv, unsigned long mode)
+void hostif_sleep_request( struct ks_wlan_private *priv, unsigned long mode)
{
struct hostif_sleep_request_t *pp;
static
-void hostif_bss_scan_request( ks_wlan_private *priv, unsigned long scan_type , uint8_t *scan_ssid, uint8_t scan_ssid_len)
+void hostif_bss_scan_request( struct ks_wlan_private *priv, unsigned long scan_type , uint8_t *scan_ssid, uint8_t scan_ssid_len)
{
struct hostif_bss_scan_request_t *pp;
}
static
-void hostif_mic_failure_request( ks_wlan_private *priv, unsigned short failure_count,
+void hostif_mic_failure_request( struct ks_wlan_private *priv, unsigned short failure_count,
unsigned short timer )
{
struct hostif_mic_failure_request_t *pp;
}
/* Device I/O Recieve indicate */
-static void devio_rec_ind(ks_wlan_private *priv, unsigned char *p, unsigned int size)
+static void devio_rec_ind(struct ks_wlan_private *priv, unsigned char *p, unsigned int size)
{
if (priv->device_open_status) {
spin_lock(&priv->dev_read_lock); /* request spin lock */
}
}
-void hostif_receive( ks_wlan_private *priv, unsigned char *p, unsigned int size )
+void hostif_receive( struct ks_wlan_private *priv, unsigned char *p, unsigned int size )
{
DPRINTK(4,"\n");
static
-void hostif_sme_set_wep(ks_wlan_private *priv, int type)
+void hostif_sme_set_wep(struct ks_wlan_private *priv, int type)
{
uint32_t val;
switch(type){
} __attribute__((packed));
static
-void hostif_sme_set_rsn(ks_wlan_private *priv, int type)
+void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type)
{
struct wpa_suite_t wpa_suite;
struct rsn_mode_t rsn_mode;
}
static
-void hostif_sme_mode_setup(ks_wlan_private *priv)
+void hostif_sme_mode_setup(struct ks_wlan_private *priv)
{
unsigned char rate_size;
unsigned char rate_octet[RATE_SET_MAX_SIZE];
}
static
-void hostif_sme_multicast_set(ks_wlan_private *priv)
+void hostif_sme_multicast_set(struct ks_wlan_private *priv)
{
struct net_device *dev = priv->net_dev;
}
static
-void hostif_sme_powermgt_set(ks_wlan_private *priv)
+void hostif_sme_powermgt_set(struct ks_wlan_private *priv)
{
unsigned long mode,wake_up,receiveDTIMs ;
}
static
-void hostif_sme_sleep_set(ks_wlan_private *priv)
+void hostif_sme_sleep_set(struct ks_wlan_private *priv)
{
DPRINTK(3,"\n");
switch(priv->sleep_mode){
}
static
-void hostif_sme_set_key(ks_wlan_private *priv, int type)
+void hostif_sme_set_key(struct ks_wlan_private *priv, int type)
{
uint32_t val;
switch(type){
}
static
-void hostif_sme_set_pmksa(ks_wlan_private *priv)
+void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
{
struct pmk_cache_t {
uint16_t size;
/* execute sme */
static
-void hostif_sme_execute(ks_wlan_private *priv, int event)
+void hostif_sme_execute(struct ks_wlan_private *priv, int event)
{
uint32_t val;
static
void hostif_sme_task( unsigned long dev )
{
- ks_wlan_private *priv = (ks_wlan_private *)dev;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev;
DPRINTK(3,"\n");
}
/* send to Station Management Entity module */
-void hostif_sme_enqueue(ks_wlan_private *priv, unsigned short event)
+void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event)
{
DPRINTK(3,"\n");
}
-int hostif_init( ks_wlan_private *priv )
+int hostif_init( struct ks_wlan_private *priv )
{
int rc=0;
int i;
return rc;
}
-void hostif_exit( ks_wlan_private *priv )
+void hostif_exit( struct ks_wlan_private *priv )
{
tasklet_kill(&priv->sme_task);
return;
/*
* function prototypes
*/
-extern int ks_wlan_hw_tx(ks_wlan_private *priv, void *p, unsigned long size,
+extern int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
void (*complete_handler)(void *arg1, void *arg2),
void *arg1,
void *arg2 );
static atomic_t update_phyinfo;
static struct timer_list update_phyinfo_timer;
static
-int ks_wlan_update_phy_information(ks_wlan_private *priv)
+int ks_wlan_update_phy_information(struct ks_wlan_private *priv)
{
struct iw_statistics *wstats = &priv->wstats;
atomic_set(&update_phyinfo,0);
}
-int ks_wlan_setup_parameter(ks_wlan_private *priv, unsigned int commit_flag)
+int ks_wlan_setup_parameter(struct ks_wlan_private *priv, unsigned int commit_flag)
{
DPRINTK(2,"\n");
static int ks_wlan_get_name(struct net_device *dev, struct iw_request_info *info,
char *cwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *) netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *) netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_freq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *fwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int rc = -EINPROGRESS; /* Call commit handler */
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_freq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *fwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int f;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_essid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
size_t len;
DPRINTK(2," %d\n", dwrq->flags);
static int ks_wlan_get_essid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2,"\n");
static int ks_wlan_get_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *awrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_rate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int i = 0;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_rate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "in_interrupt = %ld update_phyinfo = %d\n",
in_interrupt(),atomic_read(&update_phyinfo));
static int ks_wlan_set_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int rthr = vwrq->value;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_frag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int fthr = vwrq->value;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_frag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_mode(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2,"mode=%d\n",*uwrq);
static int ks_wlan_get_mode(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_encode(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
wep_key_t key;
int index = (dwrq->flags & IW_ENCODE_INDEX);
static int ks_wlan_get_encode(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
char zeros[16];
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
static int ks_wlan_get_range(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
struct iw_range *range = (struct iw_range *) extra;
int i,k;
static int ks_wlan_set_power(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
short enabled;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_power(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_iwstats(struct net_device *dev, struct iw_request_info *info,
struct iw_quality *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_aplist(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
struct sockaddr *address = (struct sockaddr *) extra;
struct iw_quality qual[LOCAL_APLIST_MAX];
static int ks_wlan_set_scan(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
struct iw_scan_req *req = NULL;
DPRINTK(2,"\n");
static inline char *ks_wlan_translate_scan(struct net_device *dev, struct iw_request_info *info, char *current_ev,
char *end_buf, struct local_ap_t *ap)
{
- /* ks_wlan_private *priv = (ks_wlan_private *)dev->priv; */
+ /* struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv; */
struct iw_event iwe; /* Temporary buffer */
u16 capabilities;
char *current_val; /* For rates */
static int ks_wlan_get_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int i;
char *current_ev = extra;
DPRINTK(2,"\n");
static int ks_wlan_config_commit(struct net_device *dev, struct iw_request_info *info,
void *zwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (!priv->need_commit)
return 0;
static int ks_wlan_set_genie(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n");
static int ks_wlan_set_auth_mode(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int index = (vwrq->flags & IW_AUTH_INDEX);
int value = vwrq->value;
static int ks_wlan_get_auth_mode(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
int index = (vwrq->flags & IW_AUTH_INDEX);
DPRINTK(2,"index=%d\n",index);
static int ks_wlan_set_encode_ext(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
struct iw_encode_ext *enc;
int index = dwrq->flags & IW_ENCODE_INDEX;
unsigned int commit=0;
static int ks_wlan_get_encode_ext(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
/* WPA (not used ?? wpa_supplicant)
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
struct iw_encode_ext *enc;
enc = (struct iw_encode_ext *)extra;
int index = dwrq->flags & IW_ENCODE_INDEX;
static int ks_wlan_set_pmksa(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
struct iw_pmksa *pmksa ;
int i;
struct pmk_t *pmk;
static struct iw_statistics *ks_get_wireless_stats(struct net_device *dev)
{
- ks_wlan_private *priv = (ks_wlan_private *) netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *) netdev_priv(dev);
struct iw_statistics *wstats = &priv->wstats;
if(!atomic_read(&update_phyinfo)){
static int ks_wlan_set_stop_request(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2,"\n");
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_mlme(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
struct iw_mlme *mlme = (struct iw_mlme *)extra;
__u32 mode;
static int ks_wlan_get_firmware_version(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
strcpy(extra, &(priv->firmware_version[0]));
dwrq->length = priv->version_size+1;
return 0;
static int ks_wlan_set_detach(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_detach(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_connect(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_preamble(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_preamble(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_powermgt(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_powermgt(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_scan_type(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_scan_type(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_data_write(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
unsigned char *wbuff = NULL;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_data_read(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
unsigned short read_length;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_wep_ascii(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
int i,j,len=0;
char tmp[WEP_ASCII_BUFF_SIZE];
static int ks_wlan_set_beacon_lost(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_beacon_lost(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_phy_type(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_phy_type(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_cts_mode(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_cts_mode(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2,"\n");
struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "GET_SLEEP_MODE %d\n", priv->sleep_mode);
*uwrq = priv->sleep_mode;
static int ks_wlan_set_phy_information_timer(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_phy_information_timer(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_wps_enable(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2,"\n");
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_wps_enable(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2,"\n");
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
{
uint8_t *p = extra;
unsigned char len;
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2,"\n");
struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
DPRINTK(2,"\n");
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_tx_gain(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_tx_gain(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_rx_gain(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_rx_gain(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_set_region(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)dev->priv;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv;
if (priv->sleep_mode == SLP_SLEEP){ return -EPERM; } /* for SLEEP MODE */
static int ks_wlan_get_eeprom_cksum(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra)
{
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
*uwrq = priv->eeprom_checksum;
return 0;
__u32 *uwrq, char *extra)
{
int i,event;
- ks_wlan_private *priv = (ks_wlan_private *)netdev_priv(dev);
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)netdev_priv(dev);
for(i = 63; i >= 0; i--){
event = priv->hostt.buff[(priv->hostt.qtail -1 -i)%SME_EVENT_BUFF_SIZE] ;
static
struct net_device_stats *ks_wlan_get_stats(struct net_device *dev)
{
- ks_wlan_private *priv = netdev_priv(dev);
+ struct ks_wlan_private *priv = netdev_priv(dev);
if (priv->dev_state < DEVICE_STATE_READY) {
return NULL; /* not finished initialize */
static
int ks_wlan_set_mac_address(struct net_device *dev, void *addr)
{
- ks_wlan_private *priv = netdev_priv(dev);
+ struct ks_wlan_private *priv = netdev_priv(dev);
struct sockaddr *mac_addr=(struct sockaddr *)addr;
if (netif_running(dev))
return -EBUSY;
static
void ks_wlan_tx_timeout(struct net_device *dev)
{
- ks_wlan_private *priv = netdev_priv(dev);
+ struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(1,"head(%d) tail(%d)!!\n",priv->tx_dev.qhead, priv->tx_dev.qtail);
if(!netif_queue_stopped(dev)){
static
int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- ks_wlan_private *priv = netdev_priv(dev);
+ struct ks_wlan_private *priv = netdev_priv(dev);
int rc = 0;
DPRINTK(3,"in_interrupt()=%ld\n",in_interrupt());
void send_packet_complete(void *arg1, void *arg2)
{
- ks_wlan_private *priv = (ks_wlan_private *)arg1;
+ struct ks_wlan_private *priv = (struct ks_wlan_private *)arg1;
struct sk_buff *packet = (struct sk_buff *)arg2;
DPRINTK(3,"\n");
static
void ks_wlan_set_multicast_list(struct net_device *dev)
{
- ks_wlan_private *priv = netdev_priv(dev);
+ struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(4,"\n");
if (priv->dev_state < DEVICE_STATE_READY) {
static
int ks_wlan_open(struct net_device *dev)
{
- ks_wlan_private *priv = netdev_priv(dev);
+ struct ks_wlan_private *priv = netdev_priv(dev);
priv->cur_rx = 0;
int ks_wlan_net_start(struct net_device *dev)
{
- ks_wlan_private *priv;
+ struct ks_wlan_private *priv;
/* int rc; */
priv = netdev_priv(dev);
int ks_wlan_net_stop(struct net_device *dev)
{
- ks_wlan_private *priv = netdev_priv(dev);
+ struct ks_wlan_private *priv = netdev_priv(dev);
int ret = 0;
priv->device_open_status = 0;