~ubuntu-branches/ubuntu/raring/bcmwl/raring

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Alberto Milone
  • Date: 2012-12-11 17:06:22 UTC
  • mfrom: (2.1.6)
  • Revision ID: package-import@ubuntu.com-20121211170622-7bd9yp2wm1plhhu1
Tags: 6.20.155.1+bdcom-0ubuntu1
* New upstream release (LP: #923809):
  - Added 43142 support.
  - Added 4331 support.
* debian/control:
  - depend on the different flavours of the linux-headers.
* Refresh 0002-Makefile.patch and 0001-MODULE_LICENSE.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Linux-specific portion of Broadcom 802.11abg Networking Device Driver
3
3
 * cfg80211 interface
4
4
 *
5
 
 * Copyright (C) 2010, Broadcom Corporation
6
 
 * All Rights Reserved.
7
 
 * 
8
 
 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
9
 
 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
10
 
 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
11
 
 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
 
5
 * Copyright (C) 2011, Broadcom Corporation. All Rights Reserved.
 
6
 * 
 
7
 * Permission to use, copy, modify, and/or distribute this software for any
 
8
 * purpose with or without fee is hereby granted, provided that the above
 
9
 * copyright notice and this permission notice appear in all copies.
 
10
 * 
 
11
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 
12
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 
13
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 
14
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
15
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 
16
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 
17
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
12
18
 *
13
 
 * $Id: wl_cfg80211.h,v 1.1.8.1 2011-01-26 00:57:46 Exp $
 
19
 * $Id: wl_cfg80211.h,v 1.1.8.1 2011-01-26 00:57:46 $
14
20
 */
15
21
 
16
22
#ifndef _wl_cfg80211_h_
19
25
#include <net/cfg80211.h>
20
26
#include <wlioctl.h>
21
27
 
22
 
struct wl_conf;
23
 
struct wl_priv;
24
 
struct wl_security;
 
28
struct wl_cfg80211_conf;
 
29
struct wl_cfg80211_priv;
 
30
struct wl_cfg80211_security;
25
31
 
26
32
#define htod32(i) i
27
33
#define htod16(i) i
82
88
#define WL_EXTRA_BUF_MAX        2048
83
89
#define WL_AP_MAX       256     
84
90
 
85
 
enum wl_status {
86
 
        WL_STATUS_READY,
87
 
        WL_STATUS_SCANNING,
88
 
        WL_STATUS_SCAN_ABORTING,
 
91
enum wl_cfg80211_status {
89
92
        WL_STATUS_CONNECTING,
90
93
        WL_STATUS_CONNECTED
91
94
};
92
95
 
93
 
enum wl_mode {
 
96
enum wl_cfg80211_mode {
94
97
        WL_MODE_BSS,
95
98
        WL_MODE_IBSS,
96
99
        WL_MODE_AP
103
106
        u8 variable[0];
104
107
} __attribute__ ((packed));
105
108
 
106
 
struct wl_conf {
 
109
struct wl_cfg80211_conf {
107
110
        u32 mode;               
108
111
        u32 frag_threshold;
109
112
        u32 rts_threshold;
113
116
        struct ieee80211_channel channel;
114
117
};
115
118
 
116
 
struct wl_event_loop {
117
 
        s32(*handler[WLC_E_LAST]) (struct wl_priv *wl, struct net_device *ndev,
 
119
struct wl_cfg80211_event_loop {
 
120
        s32(*handler[WLC_E_LAST]) (struct wl_cfg80211_priv *wl, struct net_device *ndev,
118
121
                                   const wl_event_msg_t *e, void *data);
119
122
};
120
123
 
126
129
        u8 frame_buf[1];
127
130
};
128
131
 
129
 
struct wl_scan_req {
130
 
        struct wlc_ssid ssid;
 
132
struct wl_cfg80211_scan_req {
 
133
        wl_scan_params_hyb_t    wl_scan_req;
131
134
};
132
135
 
133
 
struct wl_ie {
 
136
struct wl_cfg80211_ie {
134
137
        u16 offset;
135
138
        u8 buf[WL_TLV_INFO_MAX];
136
139
};
137
140
 
138
 
struct wl_event_q {
 
141
struct wl_cfg80211_event_q {
139
142
        struct list_head eq_list;
140
143
        u32 etype;
141
144
        wl_event_msg_t emsg;
142
145
        s8 edata[1];
143
146
};
144
147
 
145
 
struct wl_security {
 
148
struct wl_cfg80211_security {
146
149
        u32 wpa_versions;
147
150
        u32 auth_type;
148
151
        u32 cipher_pairwise;
150
153
        u32 wpa_auth;
151
154
};
152
155
 
153
 
struct wl_profile {
 
156
struct wl_cfg80211_profile {
154
157
        struct wlc_ssid ssid;
155
158
        u8 bssid[ETHER_ADDR_LEN];
156
 
        struct wl_security sec;
 
159
        struct wl_cfg80211_security sec;
157
160
        bool active;
158
161
};
159
162
 
160
 
struct wl_connect_info {
 
163
struct wl_cfg80211_connect_info {
161
164
        u8 *req_ie;
162
165
        s32 req_ie_len;
163
166
        u8 *resp_ie;
164
167
        s32 resp_ie_len;
165
168
};
166
169
 
167
 
struct wl_assoc_ielen {
 
170
struct wl_cfg80211_assoc_ielen {
168
171
        u32 req_len;
169
172
        u32 resp_len;
170
173
};
171
174
 
172
 
struct wl_pmk_list {
 
175
struct wl_cfg80211_pmk_list {
173
176
        pmkid_list_t pmkids;
174
177
        pmkid_t foo[MAXPMKID - 1];
175
178
};
176
179
 
177
 
struct wl_priv {
 
180
struct wl_cfg80211_priv {
178
181
        struct wireless_dev *wdev;      
179
 
        struct wl_conf *conf;   
 
182
        struct wl_cfg80211_conf *conf;  
180
183
        struct cfg80211_scan_request *scan_request;     
181
 
        struct wl_event_loop el;        
 
184
        struct wl_cfg80211_event_loop el;       
182
185
        struct list_head eq_list;       
183
186
        spinlock_t eq_lock;     
184
 
        struct wl_scan_req *scan_req_int;       
185
 
        struct wl_ie ie;         
 
187
        struct wl_cfg80211_scan_req *scan_req_int;  
 
188
        struct wl_cfg80211_ie ie;        
186
189
        struct ether_addr bssid;        
187
190
        struct semaphore event_sync;    
188
 
        struct wl_profile *profile;     
189
 
        struct wl_connect_info conn_info;       
190
 
        struct wl_pmk_list *pmk_list;   
 
191
        struct wl_cfg80211_profile *profile;    
 
192
        struct wl_cfg80211_connect_info conn_info;      
 
193
        struct wl_cfg80211_pmk_list *pmk_list;  
191
194
        struct task_struct *event_tsk;  
192
195
        unsigned long status;           
193
196
        bool active_scan;       
194
 
        bool link_up;           
195
197
        u8 *ioctl_buf;  
196
198
        u8 *extra_buf;  
197
199
        u8 ci[0] __attribute__ ((__aligned__(NETDEV_ALIGN)));
199
201
 
200
202
#define wl_to_dev(w) (wiphy_dev(wl->wdev->wiphy))
201
203
#define wl_to_wiphy(w) (w->wdev->wiphy)
202
 
#define wiphy_to_wl(w) ((struct wl_priv *)(wiphy_priv(w)))
 
204
#define wiphy_to_wl(w) ((struct wl_cfg80211_priv *)(wiphy_priv(w)))
203
205
#define wl_to_wdev(w) (w->wdev)
204
 
#define wdev_to_wl(w) ((struct wl_priv *)(wdev_priv(w)))
 
206
#define wdev_to_wl(w) ((struct wl_cfg80211_priv *)(wdev_priv(w)))
205
207
#define wl_to_ndev(w) (w->wdev->netdev)
206
208
#define ndev_to_wl(n) (wdev_to_wl(n->ieee80211_ptr))
207
209
#define wl_to_sr(w) (w->scan_req_int)