~ubuntu-branches/ubuntu/saucy/bcmwl/saucy

« back to all changes in this revision

Viewing changes to src/src/wl/sys/wl_iw.h

  • Committer: Bazaar Package Importer
  • Author(s): Tim Gardner
  • Date: 2009-05-11 16:04:29 UTC
  • Revision ID: james.westby@ubuntu.com-20090511160429-lciigiqnpp0fpu2k
Tags: 5.10.91.9-2
Add src/lib/LICENSE.txt to copyright notice. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Linux Wireless Extensions support
 
3
 *
 
4
 * Copyright 2008, Broadcom Corporation
 
5
 * All Rights Reserved.
 
6
 * 
 
7
 *      Unless you and Broadcom execute a separate written software license
 
8
 * agreement governing use of this software, this software is licensed to you
 
9
 * under the terms of the GNU General Public License version 2, available at
 
10
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (the "GPL"), with the
 
11
 * following added to such license:
 
12
 *      As a special exception, the copyright holders of this software give you
 
13
 * permission to link this software with independent modules, regardless of the
 
14
 * license terms of these independent modules, and to copy and distribute the
 
15
 * resulting executable under terms of your choice, provided that you also meet,
 
16
 * for each linked independent module, the terms and conditions of the license
 
17
 * of that module. An independent module is a module which is not derived from
 
18
 * this software.
 
19
 *
 
20
 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
 
21
 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
 
22
 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
 
23
 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
 
24
 *
 
25
 * $Id: wl_iw.h,v 1.5.32.7 2009/03/02 21:54:59 Exp $
 
26
 */
 
27
 
 
28
#ifndef _wl_iw_h_
 
29
#define _wl_iw_h_
 
30
 
 
31
#include <linux/wireless.h>
 
32
 
 
33
#include <typedefs.h>
 
34
#include <proto/ethernet.h>
 
35
#include <wlioctl.h>
 
36
 
 
37
#define WL_IW_RSSI_MINVAL               -200    
 
38
#define WL_IW_RSSI_NO_SIGNAL    -91     
 
39
#define WL_IW_RSSI_VERY_LOW     -80     
 
40
#define WL_IW_RSSI_LOW          -70     
 
41
#define WL_IW_RSSI_GOOD         -68     
 
42
#define WL_IW_RSSI_VERY_GOOD    -58     
 
43
#define WL_IW_RSSI_EXCELLENT    -57     
 
44
#define WL_IW_RSSI_INVALID       0      
 
45
 
 
46
typedef struct wl_iw {
 
47
        char nickname[IW_ESSID_MAX_SIZE];
 
48
 
 
49
        struct iw_statistics wstats;
 
50
 
 
51
        int spy_num;
 
52
        uint32 pwsec;                   
 
53
        uint32 gwsec;                   
 
54
 
 
55
        struct ether_addr spy_addr[IW_MAX_SPY];
 
56
        struct iw_quality spy_qual[IW_MAX_SPY];
 
57
        void  *wlinfo;
 
58
} wl_iw_t;
 
59
 
 
60
#if WIRELESS_EXT > 12
 
61
#include <net/iw_handler.h>
 
62
extern const struct iw_handler_def wl_iw_handler_def;
 
63
#endif 
 
64
 
 
65
extern int wl_iw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 
66
extern void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data);
 
67
extern int wl_iw_get_wireless_stats(struct net_device *dev, struct iw_statistics *wstats);
 
68
 
 
69
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
 
70
#define IWE_STREAM_ADD_EVENT(info, stream, ends, iwe, extra) \
 
71
        iwe_stream_add_event(info, stream, ends, iwe, extra)
 
72
#define IWE_STREAM_ADD_VALUE(info, event, value, ends, iwe, event_len) \
 
73
        iwe_stream_add_value(info, event, value, ends, iwe, event_len)
 
74
#define IWE_STREAM_ADD_POINT(info, stream, ends, iwe, extra) \
 
75
        iwe_stream_add_point(info, stream, ends, iwe, extra)
 
76
#else
 
77
#define IWE_STREAM_ADD_EVENT(info, stream, ends, iwe, extra) \
 
78
        iwe_stream_add_event(stream, ends, iwe, extra)
 
79
#define IWE_STREAM_ADD_VALUE(info, event, value, ends, iwe, event_len) \
 
80
        iwe_stream_add_value(event, value, ends, iwe, event_len)
 
81
#define IWE_STREAM_ADD_POINT(info, stream, ends, iwe, extra) \
 
82
        iwe_stream_add_point(stream, ends, iwe, extra)
 
83
#endif
 
84
 
 
85
#endif