aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-ep93xx/ep93xx-regs.h1
-rw-r--r--include/asm-arm/arch-ep93xx/platform.h6
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/net/ieee80211.h9
-rw-r--r--include/net/ieee80211softmac.h60
5 files changed, 71 insertions, 7 deletions
diff --git a/include/asm-arm/arch-ep93xx/ep93xx-regs.h b/include/asm-arm/arch-ep93xx/ep93xx-regs.h
index 8c322975f96e..593f562f85c3 100644
--- a/include/asm-arm/arch-ep93xx/ep93xx-regs.h
+++ b/include/asm-arm/arch-ep93xx/ep93xx-regs.h
@@ -27,6 +27,7 @@
27#define EP93XX_DMA_BASE (EP93XX_AHB_VIRT_BASE + 0x00000000) 27#define EP93XX_DMA_BASE (EP93XX_AHB_VIRT_BASE + 0x00000000)
28 28
29#define EP93XX_ETHERNET_BASE (EP93XX_AHB_VIRT_BASE + 0x00010000) 29#define EP93XX_ETHERNET_BASE (EP93XX_AHB_VIRT_BASE + 0x00010000)
30#define EP93XX_ETHERNET_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00010000)
30 31
31#define EP93XX_USB_BASE (EP93XX_AHB_VIRT_BASE + 0x00020000) 32#define EP93XX_USB_BASE (EP93XX_AHB_VIRT_BASE + 0x00020000)
32#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000) 33#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000)
diff --git a/include/asm-arm/arch-ep93xx/platform.h b/include/asm-arm/arch-ep93xx/platform.h
index d7a34ce20293..b4a8deb8bdef 100644
--- a/include/asm-arm/arch-ep93xx/platform.h
+++ b/include/asm-arm/arch-ep93xx/platform.h
@@ -11,5 +11,11 @@ void ep93xx_init_devices(void);
11void ep93xx_clock_init(void); 11void ep93xx_clock_init(void);
12extern struct sys_timer ep93xx_timer; 12extern struct sys_timer ep93xx_timer;
13 13
14struct ep93xx_eth_data
15{
16 unsigned char dev_addr[6];
17 unsigned char phy_id;
18};
19
14 20
15#endif 21#endif
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4f2c2b6beb5e..43289127b458 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -342,7 +342,7 @@ struct net_device
342 /* Instance data managed by the core of Wireless Extensions. */ 342 /* Instance data managed by the core of Wireless Extensions. */
343 struct iw_public_data * wireless_data; 343 struct iw_public_data * wireless_data;
344 344
345 struct ethtool_ops *ethtool_ops; 345 const struct ethtool_ops *ethtool_ops;
346 346
347 /* 347 /*
348 * This marks the end of the "visible" part of the structure. All 348 * This marks the end of the "visible" part of the structure. All
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index ecc42864b001..b174ebb277a9 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -240,6 +240,11 @@ struct ieee80211_snap_hdr {
240#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) 240#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
241#define WLAN_CAPABILITY_DSSS_OFDM (1<<13) 241#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
242 242
243/* 802.11g ERP information element */
244#define WLAN_ERP_NON_ERP_PRESENT (1<<0)
245#define WLAN_ERP_USE_PROTECTION (1<<1)
246#define WLAN_ERP_BARKER_PREAMBLE (1<<2)
247
243/* Status codes */ 248/* Status codes */
244enum ieee80211_statuscode { 249enum ieee80211_statuscode {
245 WLAN_STATUS_SUCCESS = 0, 250 WLAN_STATUS_SUCCESS = 0,
@@ -747,6 +752,8 @@ struct ieee80211_txb {
747#define NETWORK_HAS_IBSS_DFS (1<<8) 752#define NETWORK_HAS_IBSS_DFS (1<<8)
748#define NETWORK_HAS_TPC_REPORT (1<<9) 753#define NETWORK_HAS_TPC_REPORT (1<<9)
749 754
755#define NETWORK_HAS_ERP_VALUE (1<<10)
756
750#define QOS_QUEUE_NUM 4 757#define QOS_QUEUE_NUM 4
751#define QOS_OUI_LEN 3 758#define QOS_OUI_LEN 3
752#define QOS_OUI_TYPE 2 759#define QOS_OUI_TYPE 2
@@ -1252,6 +1259,8 @@ extern int ieee80211_tx_frame(struct ieee80211_device *ieee,
1252 int total_len, int encrypt_mpdu); 1259 int total_len, int encrypt_mpdu);
1253 1260
1254/* ieee80211_rx.c */ 1261/* ieee80211_rx.c */
1262extern void ieee80211_rx_any(struct ieee80211_device *ieee,
1263 struct sk_buff *skb, struct ieee80211_rx_stats *stats);
1255extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, 1264extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
1256 struct ieee80211_rx_stats *rx_stats); 1265 struct ieee80211_rx_stats *rx_stats);
1257/* make sure to set stats->len */ 1266/* make sure to set stats->len */
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h
index 00ad810eb883..425b3a57ac74 100644
--- a/include/net/ieee80211softmac.h
+++ b/include/net/ieee80211softmac.h
@@ -86,9 +86,6 @@ struct ieee80211softmac_assoc_info {
86 86
87 /* BSSID we're trying to associate to */ 87 /* BSSID we're trying to associate to */
88 char bssid[ETH_ALEN]; 88 char bssid[ETH_ALEN];
89
90 /* Rates supported by the network */
91 struct ieee80211softmac_ratesinfo supported_rates;
92 89
93 /* some flags. 90 /* some flags.
94 * static_essid is valid if the essid is constant, 91 * static_essid is valid if the essid is constant,
@@ -103,6 +100,7 @@ struct ieee80211softmac_assoc_info {
103 * bssfixed is used for SIOCSIWAP. 100 * bssfixed is used for SIOCSIWAP.
104 */ 101 */
105 u8 static_essid:1, 102 u8 static_essid:1,
103 short_preamble_available:1,
106 associating:1, 104 associating:1,
107 assoc_wait:1, 105 assoc_wait:1,
108 bssvalid:1, 106 bssvalid:1,
@@ -115,6 +113,19 @@ struct ieee80211softmac_assoc_info {
115 struct work_struct timeout; 113 struct work_struct timeout;
116}; 114};
117 115
116struct ieee80211softmac_bss_info {
117 /* Rates supported by the network */
118 struct ieee80211softmac_ratesinfo supported_rates;
119
120 /* This indicates whether frames can currently be transmitted with
121 * short preamble (only use this variable during TX at CCK rates) */
122 u8 short_preamble:1;
123
124 /* This indicates whether protection (e.g. self-CTS) should be used
125 * when transmitting with OFDM modulation */
126 u8 use_protection:1;
127};
128
118enum { 129enum {
119 IEEE80211SOFTMAC_AUTH_OPEN_REQUEST = 1, 130 IEEE80211SOFTMAC_AUTH_OPEN_REQUEST = 1,
120 IEEE80211SOFTMAC_AUTH_OPEN_RESPONSE = 2, 131 IEEE80211SOFTMAC_AUTH_OPEN_RESPONSE = 2,
@@ -157,6 +168,10 @@ struct ieee80211softmac_txrates {
157#define IEEE80211SOFTMAC_TXRATECHG_MCAST (1 << 2) /* mcast_rate */ 168#define IEEE80211SOFTMAC_TXRATECHG_MCAST (1 << 2) /* mcast_rate */
158#define IEEE80211SOFTMAC_TXRATECHG_MGT_MCAST (1 << 3) /* mgt_mcast_rate */ 169#define IEEE80211SOFTMAC_TXRATECHG_MGT_MCAST (1 << 3) /* mgt_mcast_rate */
159 170
171#define IEEE80211SOFTMAC_BSSINFOCHG_RATES (1 << 0) /* supported_rates */
172#define IEEE80211SOFTMAC_BSSINFOCHG_SHORT_PREAMBLE (1 << 1) /* short_preamble */
173#define IEEE80211SOFTMAC_BSSINFOCHG_PROTECTION (1 << 2) /* use_protection */
174
160struct ieee80211softmac_device { 175struct ieee80211softmac_device {
161 /* 802.11 structure for data stuff */ 176 /* 802.11 structure for data stuff */
162 struct ieee80211_device *ieee; 177 struct ieee80211_device *ieee;
@@ -200,10 +215,16 @@ struct ieee80211softmac_device {
200 * The driver just needs to read them. 215 * The driver just needs to read them.
201 */ 216 */
202 struct ieee80211softmac_txrates txrates; 217 struct ieee80211softmac_txrates txrates;
203 /* If the driver needs to do stuff on TX rate changes, assign this callback. */ 218
219 /* If the driver needs to do stuff on TX rate changes, assign this
220 * callback. See IEEE80211SOFTMAC_TXRATECHG for change flags. */
204 void (*txrates_change)(struct net_device *dev, 221 void (*txrates_change)(struct net_device *dev,
205 u32 changes, /* see IEEE80211SOFTMAC_TXRATECHG flags */ 222 u32 changes);
206 const struct ieee80211softmac_txrates *rates_before_change); 223
224 /* If the driver needs to do stuff when BSS properties change, assign
225 * this callback. see IEEE80211SOFTMAC_BSSINFOCHG for change flags. */
226 void (*bssinfo_change)(struct net_device *dev,
227 u32 changes);
207 228
208 /* private stuff follows */ 229 /* private stuff follows */
209 /* this lock protects this structure */ 230 /* this lock protects this structure */
@@ -216,6 +237,7 @@ struct ieee80211softmac_device {
216 237
217 struct ieee80211softmac_scaninfo *scaninfo; 238 struct ieee80211softmac_scaninfo *scaninfo;
218 struct ieee80211softmac_assoc_info associnfo; 239 struct ieee80211softmac_assoc_info associnfo;
240 struct ieee80211softmac_bss_info bssinfo;
219 241
220 struct list_head auth_queue; 242 struct list_head auth_queue;
221 struct list_head events; 243 struct list_head events;
@@ -257,6 +279,14 @@ extern void ieee80211softmac_fragment_lost(struct net_device *dev,
257 * Note that the rates need to be sorted. */ 279 * Note that the rates need to be sorted. */
258extern void ieee80211softmac_set_rates(struct net_device *dev, u8 count, u8 *rates); 280extern void ieee80211softmac_set_rates(struct net_device *dev, u8 count, u8 *rates);
259 281
282/* Finds the highest rate which is:
283 * 1. Present in ri (optionally a basic rate)
284 * 2. Supported by the device
285 * 3. Less than or equal to the user-defined rate
286 */
287extern u8 ieee80211softmac_highest_supported_rate(struct ieee80211softmac_device *mac,
288 struct ieee80211softmac_ratesinfo *ri, int basic_only);
289
260/* Helper function which advises you the rate at which a frame should be 290/* Helper function which advises you the rate at which a frame should be
261 * transmitted at. */ 291 * transmitted at. */
262static inline u8 ieee80211softmac_suggest_txrate(struct ieee80211softmac_device *mac, 292static inline u8 ieee80211softmac_suggest_txrate(struct ieee80211softmac_device *mac,
@@ -279,6 +309,24 @@ static inline u8 ieee80211softmac_suggest_txrate(struct ieee80211softmac_device
279 return txrates->mcast_rate; 309 return txrates->mcast_rate;
280} 310}
281 311
312/* Helper function which advises you when it is safe to transmit with short
313 * preamble.
314 * You should only call this function when transmitting at CCK rates. */
315static inline int ieee80211softmac_short_preamble_ok(struct ieee80211softmac_device *mac,
316 int is_multicast,
317 int is_mgt)
318{
319 return (is_multicast && is_mgt) ? 0 : mac->bssinfo.short_preamble;
320}
321
322/* Helper function which advises you whether protection (e.g. self-CTS) is
323 * needed. 1 = protection needed, 0 = no protection needed
324 * Only use this function when transmitting with OFDM modulation. */
325static inline int ieee80211softmac_protection_needed(struct ieee80211softmac_device *mac)
326{
327 return mac->bssinfo.use_protection;
328}
329
282/* Start the SoftMAC. Call this after you initialized the device 330/* Start the SoftMAC. Call this after you initialized the device
283 * and it is ready to run. 331 * and it is ready to run.
284 */ 332 */