Lines 47-53
Link Here
|
47 |
#include "dot11d.h" |
47 |
#include "dot11d.h" |
48 |
static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee, |
48 |
static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee, |
49 |
struct sk_buff *skb, |
49 |
struct sk_buff *skb, |
50 |
struct ieee80211_rx_stats *rx_stats) |
50 |
struct rtl8187se_rx_stats *rx_stats) |
51 |
{ |
51 |
{ |
52 |
struct ieee80211_hdr_4addr *hdr = |
52 |
struct ieee80211_hdr_4addr *hdr = |
53 |
(struct ieee80211_hdr_4addr *)skb->data; |
53 |
(struct ieee80211_hdr_4addr *)skb->data; |
Lines 205-218
static int ieee80211_frag_cache_invalida
Link Here
|
205 |
|
205 |
|
206 |
|
206 |
|
207 |
|
207 |
|
208 |
/* ieee80211_rx_frame_mgtmt |
208 |
/* rtl8187se_rx_frame_mgtmt |
209 |
* |
209 |
* |
210 |
* Responsible for handling management control frames |
210 |
* Responsible for handling management control frames |
211 |
* |
211 |
* |
212 |
* Called by ieee80211_rx */ |
212 |
* Called by rtl8187se_rx */ |
213 |
static inline int |
213 |
static inline int |
214 |
ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb, |
214 |
rtl8187se_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb, |
215 |
struct ieee80211_rx_stats *rx_stats, u16 type, |
215 |
struct rtl8187se_rx_stats *rx_stats, u16 type, |
216 |
u16 stype) |
216 |
u16 stype) |
217 |
{ |
217 |
{ |
218 |
struct ieee80211_hdr_4addr *hdr; |
218 |
struct ieee80211_hdr_4addr *hdr; |
Lines 225-231
ieee80211_rx_frame_mgmt(struct ieee80211
Link Here
|
225 |
* response parser uses it |
225 |
* response parser uses it |
226 |
*/ |
226 |
*/ |
227 |
rx_stats->len = skb->len; |
227 |
rx_stats->len = skb->len; |
228 |
ieee80211_rx_mgt(ieee, (struct ieee80211_hdr_4addr *)skb->data, |
228 |
rtl8187se_rx_mgt(ieee, (struct ieee80211_hdr_4addr *)skb->data, |
229 |
rx_stats); |
229 |
rx_stats); |
230 |
|
230 |
|
231 |
if((ieee->state == IEEE80211_LINKED)&&(memcmp(hdr->addr3,ieee->current_network.bssid,ETH_ALEN))) { |
231 |
if((ieee->state == IEEE80211_LINKED)&&(memcmp(hdr->addr3,ieee->current_network.bssid,ETH_ALEN))) { |
Lines 233-239
ieee80211_rx_frame_mgmt(struct ieee80211
Link Here
|
233 |
return 0; |
233 |
return 0; |
234 |
} |
234 |
} |
235 |
|
235 |
|
236 |
ieee80211_rx_frame_softmac(ieee, skb, rx_stats, type, stype); |
236 |
rtl8187se_rx_frame_softmac(ieee, skb, rx_stats, type, stype); |
237 |
|
237 |
|
238 |
dev_kfree_skb_any(skb); |
238 |
dev_kfree_skb_any(skb); |
239 |
|
239 |
|
Lines 252-258
static unsigned char bridge_tunnel_heade
Link Here
|
252 |
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; |
252 |
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; |
253 |
/* No encapsulation header if EtherType < 0x600 (=length) */ |
253 |
/* No encapsulation header if EtherType < 0x600 (=length) */ |
254 |
|
254 |
|
255 |
/* Called by ieee80211_rx_frame_decrypt */ |
255 |
/* Called by rtl8187se_rx_frame_decrypt */ |
256 |
static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee, |
256 |
static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee, |
257 |
struct sk_buff *skb, size_t hdrlen) |
257 |
struct sk_buff *skb, size_t hdrlen) |
258 |
{ |
258 |
{ |
Lines 293-301
static int ieee80211_is_eapol_frame(stru
Link Here
|
293 |
return 0; |
293 |
return 0; |
294 |
} |
294 |
} |
295 |
|
295 |
|
296 |
/* Called only as a tasklet (software IRQ), by ieee80211_rx */ |
296 |
/* Called only as a tasklet (software IRQ), by rtl8187se_rx */ |
297 |
static inline int |
297 |
static inline int |
298 |
ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, |
298 |
rtl8187se_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, |
299 |
struct ieee80211_crypt_data *crypt) |
299 |
struct ieee80211_crypt_data *crypt) |
300 |
{ |
300 |
{ |
301 |
struct ieee80211_hdr_4addr *hdr; |
301 |
struct ieee80211_hdr_4addr *hdr; |
Lines 338-346
ieee80211_rx_frame_decrypt(struct ieee80
Link Here
|
338 |
} |
338 |
} |
339 |
|
339 |
|
340 |
|
340 |
|
341 |
/* Called only as a tasklet (software IRQ), by ieee80211_rx */ |
341 |
/* Called only as a tasklet (software IRQ), by rtl8187se_rx */ |
342 |
static inline int |
342 |
static inline int |
343 |
ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *skb, |
343 |
rtl8187se_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *skb, |
344 |
int keyidx, struct ieee80211_crypt_data *crypt) |
344 |
int keyidx, struct ieee80211_crypt_data *crypt) |
345 |
{ |
345 |
{ |
346 |
struct ieee80211_hdr_4addr *hdr; |
346 |
struct ieee80211_hdr_4addr *hdr; |
Lines 470-477
drop:
Link Here
|
470 |
/* All received frames are sent to this function. @skb contains the frame in |
470 |
/* All received frames are sent to this function. @skb contains the frame in |
471 |
* IEEE 802.11 format, i.e., in the format it was sent over air. |
471 |
* IEEE 802.11 format, i.e., in the format it was sent over air. |
472 |
* This function is called only as a tasklet (software IRQ). */ |
472 |
* This function is called only as a tasklet (software IRQ). */ |
473 |
int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, |
473 |
int rtl8187se_rx(struct ieee80211_device *ieee, struct sk_buff *skb, |
474 |
struct ieee80211_rx_stats *rx_stats) |
474 |
struct rtl8187se_rx_stats *rx_stats) |
475 |
{ |
475 |
{ |
476 |
struct net_device *dev = ieee->dev; |
476 |
struct net_device *dev = ieee->dev; |
477 |
//struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); |
477 |
//struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); |
Lines 567-573
int ieee80211_rx(struct ieee80211_device
Link Here
|
567 |
|
567 |
|
568 |
|
568 |
|
569 |
if (type == IEEE80211_FTYPE_MGMT) { |
569 |
if (type == IEEE80211_FTYPE_MGMT) { |
570 |
if (ieee80211_rx_frame_mgmt(ieee, skb, rx_stats, type, stype)) |
570 |
if (rtl8187se_rx_frame_mgmt(ieee, skb, rx_stats, type, stype)) |
571 |
goto rx_dropped; |
571 |
goto rx_dropped; |
572 |
else |
572 |
else |
573 |
goto rx_exit; |
573 |
goto rx_exit; |
Lines 628-634
int ieee80211_rx(struct ieee80211_device
Link Here
|
628 |
/* skb: hdr + (possibly fragmented, possibly encrypted) payload */ |
628 |
/* skb: hdr + (possibly fragmented, possibly encrypted) payload */ |
629 |
|
629 |
|
630 |
if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && |
630 |
if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && |
631 |
(keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0) |
631 |
(keyidx = rtl8187se_rx_frame_decrypt(ieee, skb, crypt)) < 0) |
632 |
goto rx_dropped; |
632 |
goto rx_dropped; |
633 |
|
633 |
|
634 |
hdr = (struct ieee80211_hdr_4addr *)skb->data; |
634 |
hdr = (struct ieee80211_hdr_4addr *)skb->data; |
Lines 691-697
int ieee80211_rx(struct ieee80211_device
Link Here
|
691 |
/* skb: hdr + (possible reassembled) full MSDU payload; possibly still |
691 |
/* skb: hdr + (possible reassembled) full MSDU payload; possibly still |
692 |
* encrypted/authenticated */ |
692 |
* encrypted/authenticated */ |
693 |
if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && |
693 |
if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && |
694 |
ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) |
694 |
rtl8187se_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) |
695 |
goto rx_dropped; |
695 |
goto rx_dropped; |
696 |
|
696 |
|
697 |
hdr = (struct ieee80211_hdr_4addr *)skb->data; |
697 |
hdr = (struct ieee80211_hdr_4addr *)skb->data; |
Lines 914-920
inline int ieee80211_network_init(
Link Here
|
914 |
struct ieee80211_device *ieee, |
914 |
struct ieee80211_device *ieee, |
915 |
struct ieee80211_probe_response *beacon, |
915 |
struct ieee80211_probe_response *beacon, |
916 |
struct ieee80211_network *network, |
916 |
struct ieee80211_network *network, |
917 |
struct ieee80211_rx_stats *stats) |
917 |
struct rtl8187se_rx_stats *stats) |
918 |
{ |
918 |
{ |
919 |
#ifdef CONFIG_IEEE80211_DEBUG |
919 |
#ifdef CONFIG_IEEE80211_DEBUG |
920 |
char rates_str[64]; |
920 |
char rates_str[64]; |
Lines 1251-1257
inline void update_network(struct ieee80
Link Here
|
1251 |
noise = (dst->stats.noise * 5 + src->stats.noise)/6; |
1251 |
noise = (dst->stats.noise * 5 + src->stats.noise)/6; |
1252 |
//if(strcmp(dst->ssid, "linksys_lzm000") == 0) |
1252 |
//if(strcmp(dst->ssid, "linksys_lzm000") == 0) |
1253 |
// printk("ssid:%s, quality:%d, signal:%d\n", dst->ssid, quality, signal); |
1253 |
// printk("ssid:%s, quality:%d, signal:%d\n", dst->ssid, quality, signal); |
1254 |
memcpy(&dst->stats, &src->stats, sizeof(struct ieee80211_rx_stats)); |
1254 |
memcpy(&dst->stats, &src->stats, sizeof(struct rtl8187se_rx_stats)); |
1255 |
dst->stats.signalstrength = quality; |
1255 |
dst->stats.signalstrength = quality; |
1256 |
dst->stats.signal = signal; |
1256 |
dst->stats.signal = signal; |
1257 |
// printk("==================>stats.signal is %d\n",dst->stats.signal); |
1257 |
// printk("==================>stats.signal is %d\n",dst->stats.signal); |
Lines 1326-1332
inline void update_network(struct ieee80
Link Here
|
1326 |
inline void ieee80211_process_probe_response( |
1326 |
inline void ieee80211_process_probe_response( |
1327 |
struct ieee80211_device *ieee, |
1327 |
struct ieee80211_device *ieee, |
1328 |
struct ieee80211_probe_response *beacon, |
1328 |
struct ieee80211_probe_response *beacon, |
1329 |
struct ieee80211_rx_stats *stats) |
1329 |
struct rtl8187se_rx_stats *stats) |
1330 |
{ |
1330 |
{ |
1331 |
struct ieee80211_network network; |
1331 |
struct ieee80211_network network; |
1332 |
struct ieee80211_network *target; |
1332 |
struct ieee80211_network *target; |
Lines 1524-1532
inline void ieee80211_process_probe_resp
Link Here
|
1524 |
spin_unlock_irqrestore(&ieee->lock, flags); |
1524 |
spin_unlock_irqrestore(&ieee->lock, flags); |
1525 |
} |
1525 |
} |
1526 |
|
1526 |
|
1527 |
void ieee80211_rx_mgt(struct ieee80211_device *ieee, |
1527 |
void rtl8187se_rx_mgt(struct ieee80211_device *ieee, |
1528 |
struct ieee80211_hdr_4addr *header, |
1528 |
struct ieee80211_hdr_4addr *header, |
1529 |
struct ieee80211_rx_stats *stats) |
1529 |
struct rtl8187se_rx_stats *stats) |
1530 |
{ |
1530 |
{ |
1531 |
switch (WLAN_FC_GET_STYPE(header->frame_ctl)) { |
1531 |
switch (WLAN_FC_GET_STYPE(header->frame_ctl)) { |
1532 |
|
1532 |
|