diff options
author | Mike McCormack <mikem@ring3k.org> | 2011-01-24 23:15:40 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-25 06:34:39 +0800 |
commit | 85c876e412c18d95cd430598255f829e64ae9141 (patch) | |
tree | 0260dffc1dbab61b0630428cd217c119edf20ec4 /drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c | |
parent | c8881632daf373f5544a3f64d70cd9b3da47aa89 (diff) |
staging: rtl8192e: Delete dead code in ieee80211 lib
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c')
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c | 194 |
1 files changed, 15 insertions, 179 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c index 4db6944cb6d..e2eac7cadf4 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c @@ -22,7 +22,6 @@ #include <linux/compiler.h> -//#include <linux/config.h> #include <linux/errno.h> #include <linux/if_arp.h> #include <linux/in6.h> @@ -225,7 +224,6 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb, rx_stats->len = skb->len; ieee80211_rx_mgt(ieee,(struct ieee80211_hdr_4addr *)skb->data,rx_stats); - //if ((ieee->state == IEEE80211_LINKED) && (memcmp(hdr->addr3, ieee->current_network.bssid, ETH_ALEN))) if ((memcmp(hdr->addr1, ieee->dev->dev_addr, ETH_ALEN)))//use ADDR1 to perform address matching for Management frames { dev_kfree_skb_any(skb); @@ -243,9 +241,6 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb, printk(KERN_DEBUG "%s: Master mode not yet suppported.\n", ieee->dev->name); return 0; -/* - hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr_4addr *) - skb->data);*/ } if (ieee->hostapd && type == IEEE80211_TYPE_MGMT) { @@ -308,7 +303,6 @@ static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee, if (skb->len < 24) return 0; -#if 1 if (ieee->hwsec_active) { cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE); @@ -317,7 +311,6 @@ static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee, if(ieee->need_sw_enc) tcb_desc->bHwSec = 0; } -#endif hdr = (struct ieee80211_hdr_4addr *) skb->data; fc = le16_to_cpu(hdr->frame_ctl); @@ -339,7 +332,6 @@ static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee, return 0; /* check for port access entity Ethernet type */ -// pos = skb->data + 24; pos = skb->data + hdrlen; ethertype = (pos[6] << 8) | pos[7]; if (ethertype == ETH_P_PAE) @@ -358,13 +350,13 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) return 0; -#if 1 + if (ieee->hwsec_active) { cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE); tcb_desc->bHwSec = 1; } -#endif + hdr = (struct ieee80211_hdr_4addr *) skb->data; hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); @@ -474,14 +466,13 @@ static int is_duplicate_packet(struct ieee80211_device *ieee, struct ieee_ibss_seq *entry = NULL; u8 *mac = header->addr2; int index = mac[5] % IEEE_IBSS_MAC_HASH_SIZE; - //for (pos = (head)->next; pos != (head); pos = pos->next) - //__list_for_each(p, &ieee->ibss_mac_hash[index]) { + list_for_each(p, &ieee->ibss_mac_hash[index]) { entry = list_entry(p, struct ieee_ibss_seq, list); if (!memcmp(entry->mac, mac, ETH_ALEN)) break; } - // if (memcmp(entry->mac, mac, ETH_ALEN)){ + if (p == &ieee->ibss_mac_hash[index]) { entry = kmalloc(sizeof(struct ieee_ibss_seq), GFP_ATOMIC); if (!entry) { @@ -537,7 +528,7 @@ AddReorderEntry( ) { struct list_head *pList = &pTS->RxPendingPktList; -#if 1 + while(pList->next != &pTS->RxPendingPktList) { if( SN_LESS(pReorderEntry->SeqNum, ((PRX_REORDER_ENTRY)list_entry(pList->next,RX_REORDER_ENTRY,List))->SeqNum) ) @@ -553,7 +544,7 @@ AddReorderEntry( break; } } -#endif + pReorderEntry->List.next = pList->next; pReorderEntry->List.next->prev = &pReorderEntry->List; pReorderEntry->List.prev = pList; @@ -566,8 +557,7 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_ { u8 i = 0 , j=0; u16 ethertype; -// if(index > 1) -// IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): hahahahhhh, We indicate packet from reorder list, index is %u\n",__FUNCTION__,index); + for(j = 0; j<index; j++) { //added by amy for reorder @@ -594,8 +584,6 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_ memcpy(skb_push(sub_skb, ETH_ALEN), prxb->src, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), prxb->dst, ETH_ALEN); } - //stats->rx_packets++; - //stats->rx_bytes += sub_skb->len; /* Indicat the packets to upper layer */ if (sub_skb) { @@ -603,7 +591,6 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_ memset(sub_skb->cb, 0, sizeof(sub_skb->cb)); sub_skb->dev = ieee->dev; sub_skb->ip_summed = CHECKSUM_NONE; /* 802.11 crc not sufficient */ - //skb->ip_summed = CHECKSUM_UNNECESSARY; /* 802.11 crc not sufficient */ ieee->last_rx_ps_time = jiffies; netif_rx(sub_skb); } @@ -627,10 +614,7 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee, u8 index = 0; bool bMatchWinStart = false, bPktInBuf = false; IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): Seq is %d,pTS->RxIndicateSeq is %d, WinSize is %d\n",__FUNCTION__,SeqNum,pTS->RxIndicateSeq,WinSize); -#if 0 - if(!list_empty(&ieee->RxReorder_Unused_List)) - IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): ieee->RxReorder_Unused_List is nut NULL\n"); -#endif + /* Rx Reorder initialize condition.*/ if(pTS->RxIndicateSeq == 0xffff) { pTS->RxIndicateSeq = SeqNum; @@ -686,7 +670,6 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee, index = 1; } else { /* Current packet is going to be inserted into pending list.*/ - //IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): We RX no ordered packed, insert to orderd list\n",__FUNCTION__); if(!list_empty(&ieee->RxReorder_Unused_List)) { pReorderEntry = (PRX_REORDER_ENTRY)list_entry(ieee->RxReorder_Unused_List.next,RX_REORDER_ENTRY,List); list_del_init(&pReorderEntry->List); @@ -694,9 +677,7 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee, /* Make a reorder entry and insert into a the packet list.*/ pReorderEntry->SeqNum = SeqNum; pReorderEntry->prxb = prxb; - // IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): pREorderEntry->SeqNum is %d\n",__FUNCTION__,pReorderEntry->SeqNum); -#if 1 if(!AddReorderEntry(pTS, pReorderEntry)) { IEEE80211_DEBUG(IEEE80211_DL_REORDER, "%s(): Duplicate packet is dropped!! IndicateSeq: %d, NewSeq: %d\n", __FUNCTION__, pTS->RxIndicateSeq, SeqNum); @@ -713,7 +694,6 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee, IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n",pTS->RxIndicateSeq, SeqNum); } -#endif } else { /* @@ -781,21 +761,13 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee, bPktInBuf = false; } -#if 1 if(bPktInBuf && pTS->RxTimeoutIndicateSeq==0xffff) { // Set new pending timer. IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): SET rx timeout timer\n", __FUNCTION__); pTS->RxTimeoutIndicateSeq = pTS->RxIndicateSeq; -#if 0 - if(timer_pending(&pTS->RxPktPendingTimer)) - del_timer_sync(&pTS->RxPktPendingTimer); - pTS->RxPktPendingTimer.expires = jiffies + MSECS(pHTInfo->RxReorderPendingTime); - add_timer(&pTS->RxPktPendingTimer); -#else + mod_timer(&pTS->RxPktPendingTimer, jiffies + MSECS(pHTInfo->RxReorderPendingTime)); -#endif } -#endif } u8 parse_subframe(struct ieee80211_device* ieee,struct sk_buff *skb, @@ -862,11 +834,6 @@ u8 parse_subframe(struct ieee80211_device* ieee,struct sk_buff *skb, nSubframe_Length = (nSubframe_Length>>8) + (nSubframe_Length<<8); if(skb->len<(ETHERNET_HEADER_SIZE + nSubframe_Length)) { -#if 0//cosa - RT_ASSERT( - (nRemain_Length>=(ETHERNET_HEADER_SIZE + nSubframe_Length)), - ("ParseSubframe(): A-MSDU subframe parse error!! Subframe Length: %d\n", nSubframe_Length) ); -#endif printk("%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",\ __FUNCTION__,rxb->nr_subframes); printk("%s: A-MSDU parse error!! Subframe Length: %d\n",__FUNCTION__, nSubframe_Length); @@ -924,7 +891,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, { struct net_device *dev = ieee->dev; struct ieee80211_hdr_4addr *hdr; - //struct ieee80211_hdr_3addrqos *hdr; size_t hdrlen; u16 fc, type, stype, sc; @@ -937,7 +903,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, u16 SeqNum = 0; PRX_TS_RECORD pTS = NULL; bool unicast_packet = false; - //bool bIsAggregateFrame = false; //added by amy for reorder #ifdef NOT_YET struct net_device *wds = NULL; @@ -947,7 +912,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, int from_assoc_ap = 0; void *sta = NULL; #endif -// u16 qos_ctl = 0; u8 dst[ETH_ALEN]; u8 src[ETH_ALEN]; u8 bssid[ETH_ALEN]; @@ -982,7 +946,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, rx_stats->bContainHTC = 1; } - //IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len); #ifdef NOT_YET #if WIRELESS_EXT > 15 /* Put this code here so that we avoid duplicating it in all @@ -1061,19 +1024,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, else { PRX_TS_RECORD pRxTS = NULL; - #if 0 - struct ieee80211_hdr_3addr *hdr; - u16 fc; - hdr = (struct ieee80211_hdr_3addr *)skb->data; - fc = le16_to_cpu(hdr->frame_ctl); - u8 tmp = (fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS); - - u8 tid = (*((u8*)skb->data + (((fc& IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))?30:24)))&0xf; - printk("====================>fc:%x, tid:%d, tmp:%d\n", fc, tid, tmp); - //u8 tid = (u8)((frameqos*)(buf + ((fc & IEEE80211_FCTL_TODS)&&(fc & IEEE80211_FCTL_FROMDS))? 30 : 24))->field.tid; - #endif - //IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): QOS ENABLE AND RECEIVE QOS DATA , we will get Ts, tid:%d\n",__FUNCTION__, tid); -#if 1 + if(GetTs( ieee, (PTS_COMMON_INFO*) &pRxTS, @@ -1083,7 +1034,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, true)) { - // IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): pRxTS->RxLastFragNum is %d,frag is %d,pRxTS->RxLastSeqNum is %d,seq is %d\n",__FUNCTION__,pRxTS->RxLastFragNum,frag,pRxTS->RxLastSeqNum,WLAN_GET_SEQ_SEQ(sc)); if( (fc & (1<<11)) && (frag == pRxTS->RxLastFragNum) && (WLAN_GET_SEQ_SEQ(sc) == pRxTS->RxLastSeqNum) ) @@ -1102,24 +1052,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, goto rx_dropped; } } -#endif - if (type == IEEE80211_FTYPE_MGMT) { - #if 0 - if ( stype == IEEE80211_STYPE_AUTH && - fc & IEEE80211_FCTL_WEP && ieee->host_decrypt && - (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) - { - printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " - "from %pM\n", dev->name, - hdr->addr2); - /* TODO: could inform hostapd about this so that it - * could send auth failure report */ - goto rx_dropped; - } - #endif + if (type == IEEE80211_FTYPE_MGMT) { - //IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len); if (ieee80211_rx_frame_mgmt(ieee, skb, rx_stats, type, stype)) goto rx_dropped; else @@ -1192,7 +1127,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, } } #endif - //IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len); /* Nullfunc frames may have PS-bit set, so they must be passed to * hostap_handle_sta_rx() before being dropped here. */ if (stype != IEEE80211_STYPE_DATA && @@ -1354,13 +1288,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, hdr->addr2); goto rx_dropped; } -/* - if(ieee80211_is_eapol_frame(ieee, skb, hdrlen)) { - printk(KERN_WARNING "RX: IEEE802.1X EPAOL frame!\n"); - } -*/ //added by amy for reorder -#if 1 if(ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data) && !is_multicast_ether_addr(hdr->addr1) && !is_broadcast_ether_addr(hdr->addr1)) { @@ -1372,11 +1300,11 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, ieee->bis_any_nonbepkts = true; } } -#endif + //added by amy for reorder /* skb: hdr + (possible reassembled) full plaintext payload */ payload = skb->data + hdrlen; - //ethertype = (payload[6] << 8) | payload[7]; + rxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC); if(rxb == NULL) { @@ -1407,7 +1335,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, ieee->LinkDetectInfo.NumRxUnicastOkInPeriod++; // 2009.03.03 Leave DC mode immediately when detect high traffic - // DbgPrint("ending Seq %d\n", Frame_SeqNum(pduOS)); if((ieee->state == IEEE80211_LINKED) /*&& !MgntInitAdapterInProgress(pMgntInfo)*/) { if( ((ieee->LinkDetectInfo.NumRxUnicastOkInPeriod +ieee->LinkDetectInfo.NumTxOkInPeriod) > 8 ) || @@ -1460,7 +1387,6 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, memset(sub_skb->cb, 0, sizeof(sub_skb->cb)); sub_skb->dev = dev; sub_skb->ip_summed = CHECKSUM_NONE; /* 802.11 crc not sufficient */ - //skb->ip_summed = CHECKSUM_UNNECESSARY; /* 802.11 crc not sufficient */ netif_rx(sub_skb); } } @@ -1593,8 +1519,6 @@ static int ieee80211_qos_convert_ac_to_parameters(struct int i; struct ieee80211_qos_ac_parameter *ac_params; u8 aci; - //u8 cw_min; - //u8 cw_max; for (i = 0; i < QOS_QUEUE_NUM; i++) { ac_params = &(param_elm->ac_params_record[i]); @@ -1745,7 +1669,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, u16 tmp_htinfo_len=0; u16 ht_realtek_agg_len=0; u8 ht_realtek_agg_buf[MAX_IE_LEN]; -// u16 broadcom_len = 0; #ifdef CONFIG_IEEE80211_DEBUG char rates_str[64]; char *p; @@ -1862,12 +1785,8 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, network->dtim_period = info_element->data[1]; if(ieee->state != IEEE80211_LINKED) break; -#if 0 - network->last_dtim_sta_time[0] = stats->mac_time[0]; -#else //we use jiffies for legacy Power save network->last_dtim_sta_time[0] = jiffies; -#endif network->last_dtim_sta_time[1] = stats->mac_time[1]; network->dtim_data = IEEE80211_DTIM_VALID; @@ -2004,8 +1923,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, } - //if(tmp_htcap_len !=0 || tmp_htinfo_len != 0) - { if((info_element->len >= 3 && info_element->data[0] == 0x00 && info_element->data[1] == 0x05 && @@ -2022,17 +1939,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, network->broadcom_cap_exist = true; } - } -#if 0 - if (tmp_htcap_len !=0) - { - u16 cap_ext = ((PHT_CAPABILITY_ELE)&info_element->data[0])->ExtHTCapInfo; - if ((cap_ext & 0x0c00) == 0x0c00) - { - network->ralink_cap_exist = true; - } - } -#endif + if(info_element->len >= 3 && info_element->data[0] == 0x00 && info_element->data[1] == 0x0c && @@ -2211,45 +2118,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, ieee80211_extract_country_ie(ieee, info_element, network, network->bssid);//addr2 is same as addr3 when from an AP break; #endif -/* TODO */ -#if 0 - /* 802.11h */ - case MFIE_TYPE_POWER_CONSTRAINT: - network->power_constraint = info_element->data[0]; - network->flags |= NETWORK_HAS_POWER_CONSTRAINT; - break; - case MFIE_TYPE_CSA: - network->power_constraint = info_element->data[0]; - network->flags |= NETWORK_HAS_CSA; - break; - - case MFIE_TYPE_QUIET: - network->quiet.count = info_element->data[0]; - network->quiet.period = info_element->data[1]; - network->quiet.duration = info_element->data[2]; - network->quiet.offset = info_element->data[3]; - network->flags |= NETWORK_HAS_QUIET; - break; - - case MFIE_TYPE_IBSS_DFS: - if (network->ibss_dfs) - break; - network->ibss_dfs = kmemdup(info_element->data, - info_element->len, - GFP_ATOMIC); - if (!network->ibss_dfs) - return 1; - network->flags |= NETWORK_HAS_IBSS_DFS; - break; - - case MFIE_TYPE_TPC_REPORT: - network->tpc_report.transmit_power = - info_element->data[0]; - network->tpc_report.link_margin = info_element->data[1]; - network->flags |= NETWORK_HAS_TPC_REPORT; - break; -#endif default: IEEE80211_DEBUG_MGMT ("Unsupported info element: %s (%d)\n", @@ -2324,11 +2193,6 @@ static inline u8 ieee80211_SignalStrengthTranslate( { RetSS = CurrSS; } - //RT_TRACE(COMP_DBG, DBG_LOUD, ("##### After Mapping: LastSS: %d, CurrSS: %d, RetSS: %d\n", LastSS, CurrSS, RetSS)); - - // Step 2. Smoothing. - - //RT_TRACE(COMP_DBG, DBG_LOUD, ("$$$$$ After Smoothing: LastSS: %d, CurrSS: %d, RetSS: %d\n", LastSS, CurrSS, RetSS)); return RetSS; } @@ -2350,11 +2214,6 @@ static inline int ieee80211_network_init( struct ieee80211_network *network, struct ieee80211_rx_stats *stats) { -#ifdef CONFIG_IEEE80211_DEBUG - //char rates_str[64]; - //char *p; -#endif - network->qos_data.active = 0; network->qos_data.supported = 0; network->qos_data.param_count = 0; @@ -2391,7 +2250,6 @@ static inline int ieee80211_network_init( memset(network->CountryIeBuf, 0, MAX_IE_LEN); #endif //Initialize HT parameters - //ieee80211_ht_initialize(&network->bssht); HTInitializeBssDesc(&network->bssht); if (stats->freq == IEEE80211_52GHZ_BAND) { /* for A band (No DS info) */ @@ -2434,11 +2292,8 @@ static inline int ieee80211_network_init( if (ieee80211_is_empty_essid(network->ssid, network->ssid_len)) network->flags |= NETWORK_EMPTY_ESSID; -#if 1 stats->signal = 30 + (stats->SignalStrength * 70) / 100; - //stats->signal = ieee80211_SignalStrengthTranslate(stats->signal); stats->noise = ieee80211_translate_todbm((u8)(100-stats->signal)) -25; -#endif memcpy(&network->stats, stats, sizeof(network->stats)); @@ -2452,11 +2307,9 @@ static inline int is_same_network(struct ieee80211_network *src, * and the capability field (in particular IBSS and BSS) all match. * We treat all <hidden> with the same BSSID and channel * as one network */ - return //((src->ssid_len == dst->ssid_len) && - (((src->ssid_len == dst->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && + return (((src->ssid_len == dst->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && (src->channel == dst->channel) && !memcmp(src->bssid, dst->bssid, ETH_ALEN) && - //!memcmp(src->ssid, dst->ssid, src->ssid_len) && (!memcmp(src->ssid, dst->ssid, src->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && ((src->capability & WLAN_CAPABILITY_IBSS) == (dst->capability & WLAN_CAPABILITY_IBSS)) && @@ -2521,9 +2374,7 @@ static inline void update_network(struct ieee80211_network *dst, dst->last_scanned = jiffies; /* qos related parameters */ - //qos_active = src->qos_data.active; qos_active = dst->qos_data.active; - //old_param = dst->qos_data.old_param_count; old_param = dst->qos_data.param_count; if(dst->flags & NETWORK_HAS_QOS_MASK){ //not update QOS paramter in beacon, as most AP will set all these parameter to 0.//WB @@ -2547,7 +2398,6 @@ static inline void update_network(struct ieee80211_network *dst, dst->qos_data.old_param_count = old_param; /* dst->last_associate is not overwritten */ -#if 1 dst->wmm_info = src->wmm_info; //sure to exist in beacon or probe response frame. if(src->wmm_param[0].ac_aci_acm_aifsn|| \ src->wmm_param[1].ac_aci_acm_aifsn|| \ @@ -2555,10 +2405,6 @@ static inline void update_network(struct ieee80211_network *dst, src->wmm_param[3].ac_aci_acm_aifsn) { memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN); } - //dst->QoS_Enable = src->QoS_Enable; -#else - dst->QoS_Enable = 1;//for Rtl8187 simulation -#endif #ifdef THOMAS_TURBO dst->Turbo_Enable = src->Turbo_Enable; #endif @@ -2599,7 +2445,6 @@ static inline void ieee80211_process_probe_response( #endif unsigned long flags; short renew; - //u8 wmm_info; memset(&network, 0, sizeof(struct ieee80211_network)); IEEE80211_DEBUG_SCAN( @@ -2801,15 +2646,6 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, struct ieee80211_hdr_4addr *header, struct ieee80211_rx_stats *stats) { -#if 0 - if(ieee->sta_sleep || (ieee->ps != IEEE80211_PS_DISABLED && - ieee->iw_mode == IW_MODE_INFRA && - ieee->state == IEEE80211_LINKED)) - { - tasklet_schedule(&ieee->ps_task); - } -#endif - if(WLAN_FC_GET_STYPE(header->frame_ctl) != IEEE80211_STYPE_PROBE_RESP && WLAN_FC_GET_STYPE(header->frame_ctl) != IEEE80211_STYPE_BEACON) ieee->last_rx_ps_time = jiffies; |