/* * Linux Wireless Extensions support * * Copyright (C) 2010, Broadcom Corporation * All Rights Reserved. * * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * * $Id: wl_iw.h,v 1.15 2009/04/17 00:19:28 Exp $ */ #ifndef _wl_iw_h_ #define _wl_iw_h_ #include #include #include #include #define WL_IW_RSSI_MINVAL -200 #define WL_IW_RSSI_NO_SIGNAL -91 #define WL_IW_RSSI_VERY_LOW -80 #define WL_IW_RSSI_LOW -70 #define WL_IW_RSSI_GOOD -68 #define WL_IW_RSSI_VERY_GOOD -58 #define WL_IW_RSSI_EXCELLENT -57 #define WL_IW_RSSI_INVALID 0 #define MAX_WX_STRING 80 #define isprint(c) bcm_isprint(c) #define WL_IW_SET_ACTIVE_SCAN (SIOCIWFIRSTPRIV+1) #define WL_IW_GET_RSSI (SIOCIWFIRSTPRIV+3) #define WL_IW_SET_PASSIVE_SCAN (SIOCIWFIRSTPRIV+5) #define WL_IW_GET_LINK_SPEED (SIOCIWFIRSTPRIV+7) #define WL_IW_GET_CURR_MACADDR (SIOCIWFIRSTPRIV+9) #define WL_IW_SET_STOP (SIOCIWFIRSTPRIV+11) #define WL_IW_SET_START (SIOCIWFIRSTPRIV+13) #define G_SCAN_RESULTS 8*1024 #define WE_ADD_EVENT_FIX 0x80 #define G_WLAN_SET_ON 0 #define G_WLAN_SET_OFF 1 typedef struct wl_iw { char nickname[IW_ESSID_MAX_SIZE]; struct iw_statistics wstats; int spy_num; uint32 pwsec; uint32 gwsec; struct ether_addr spy_addr[IW_MAX_SPY]; struct iw_quality spy_qual[IW_MAX_SPY]; void *wlinfo; } wl_iw_t; struct wl_ctrl { struct timer_list *timer; struct net_device *dev; long sysioc_pid; struct semaphore sysioc_sem; struct completion sysioc_exited; }; #if WIRELESS_EXT > 12 #include extern const struct iw_handler_def wl_iw_handler_def; #endif extern int wl_iw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); extern void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data); extern int wl_iw_get_wireless_stats(struct net_device *dev, struct iw_statistics *wstats); int wl_iw_attach(struct net_device *dev); void wl_iw_detach(void); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) #define IWE_STREAM_ADD_EVENT(info, stream, ends, iwe, extra) \ iwe_stream_add_event(info, stream, ends, iwe, extra) #define IWE_STREAM_ADD_VALUE(info, event, value, ends, iwe, event_len) \ iwe_stream_add_value(info, event, value, ends, iwe, event_len) #define IWE_STREAM_ADD_POINT(info, stream, ends, iwe, extra) \ iwe_stream_add_point(info, stream, ends, iwe, extra) #else #define IWE_STREAM_ADD_EVENT(info, stream, ends, iwe, extra) \ iwe_stream_add_event(stream, ends, iwe, extra) #define IWE_STREAM_ADD_VALUE(info, event, value, ends, iwe, event_len) \ iwe_stream_add_value(event, value, ends, iwe, event_len) #define IWE_STREAM_ADD_POINT(info, stream, ends, iwe, extra) \ iwe_stream_add_point(stream, ends, iwe, extra) #endif #endif