Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5506cf2e authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman
Browse files

Staging: rtl8192e: Remove commented out printks

parent 7bb5e823
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -53,8 +53,6 @@ Dot11d_Reset(struct ieee80211_device *ieee)
	pDot11dInfo->State = DOT11D_STATE_NONE;
	pDot11dInfo->CountryIeLen = 0;
	RESET_CIE_WATCHDOG(ieee);

	//printk("Dot11d_Reset()\n");
}

//
@@ -109,7 +107,6 @@ Dot11d_UpdateCountryIe(
		pTriple = (PCHNL_TXPOWER_TRIPLE)((u8*)pTriple + 3);
	}
#if 1
	//printk("Dot11d_UpdateCountryIe(): Channel List:\n");
	printk("Channel List:");
	for(i=1; i<= MAX_CHANNEL_NUMBER; i++)
		if(pDot11dInfo->channel_map[i] > 0)
+0 −6
Original line number Diff line number Diff line
@@ -319,11 +319,6 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
	pos += 8;

	if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) {
		if (net_ratelimit()) {
			//printk(KERN_DEBUG "CCMP: replay detected: STA=%pM"
			//       " previous PN %pm received PN %pm\n",
			//       hdr->addr2, key->rx_pn, pn);
		}
		key->dot11RSNAStatsCCMPReplays++;
		return -4;
	}
@@ -456,7 +451,6 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv)

void ieee80211_ccmp_null(void)
{
//    printk("============>%s()\n", __FUNCTION__);
	return;
}

+0 −1
Original line number Diff line number Diff line
@@ -829,7 +829,6 @@ void ieee80211_crypto_tkip_exit(void)

void ieee80211_tkip_null(void)
{
//    printk("============>%s()\n", __FUNCTION__);
        return;
}
+0 −30
Original line number Diff line number Diff line
@@ -511,19 +511,14 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
		return 0;
	}

//	if(tid != 0) {
//		printk(KERN_WARNING ":)))))))))))%x %x %x, fc(%x)\n", tid, *last_seq, seq, header->frame_ctl);
//	}
	if ((*last_seq == seq) &&
	    time_after(*last_time + IEEE_PACKET_RETRY_TIME, jiffies)) {
		if (*last_frag == frag){
			//printk(KERN_WARNING "[1] go drop!\n");
			goto drop;

		}
		if (*last_frag + 1 != frag)
			/* out-of-order fragment */
			//printk(KERN_WARNING "[2] go drop!\n");
			goto drop;
	} else
		*last_seq = seq;
@@ -533,9 +528,6 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
	return 0;

drop:
//	BUG_ON(!(fc & IEEE80211_FCTL_RETRY));
//	printk("DUP\n");

	return 1;
}
bool
@@ -607,14 +599,12 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_

		/* Indicat the packets to upper layer */
			if (sub_skb) {
				//printk("0skb_len(%d)\n", skb->len);
				sub_skb->protocol = eth_type_trans(sub_skb, ieee->dev);
				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;
				//printk("1skb_len(%d)\n", skb->len);
				netif_rx(sub_skb);
			}
		}
@@ -693,7 +683,6 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee,
		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Packets indication!! IndicateSeq: %d, NewSeq: %d\n",\
				pTS->RxIndicateSeq, SeqNum);
		prxbIndicateArray[0] = prxb;
//		printk("========================>%s(): SeqNum is %d\n",__FUNCTION__,SeqNum);
		index = 1;
	} else {
		/* Current packet is going to be inserted into pending list.*/
@@ -766,7 +755,6 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee,

			IEEE80211_DEBUG(IEEE80211_DL_REORDER,"Packets indication!! IndicateSeq: %d, NewSeq: %d\n",pTS->RxIndicateSeq, SeqNum);
			prxbIndicateArray[index] = pReorderEntry->prxb;
		//	printk("========================>%s(): pReorderEntry->SeqNum is %d\n",__FUNCTION__,pReorderEntry->SeqNum);
			index++;

			list_add_tail(&pReorderEntry->List,&ieee->RxReorder_Unused_List);
@@ -841,7 +829,6 @@ u8 parse_subframe(struct ieee80211_device* ieee,struct sk_buff *skb,
	if(rx_stats->bContainHTC) {
		LLCOffset += sHTCLng;
	}
	//printk("ChkLength = %d\n", LLCOffset);
	// Null packet, don't indicate it to upper layer
	ChkLength = LLCOffset;/* + (Frame_WEP(frame)!=0 ?Adapter->MgntInfo.SecurityInfo.EncryptionHeadOverhead:0);*/

@@ -925,9 +912,6 @@ u8 parse_subframe(struct ieee80211_device* ieee,struct sk_buff *skb,
#ifdef JOHN_NOCPY
		dev_kfree_skb(skb);
#endif
		//{just for debug added by david
		//printk("AMSDU::rxb->nr_subframes = %d\n",rxb->nr_subframes);
		//}
		return rxb->nr_subframes;
	}
}
@@ -1472,13 +1456,11 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
				}

				/* Indicat the packets to upper layer */
				//printk("0skb_len(%d)\n", skb->len);
				sub_skb->protocol = eth_type_trans(sub_skb, dev);
				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 */
				//printk("1skb_len(%d)\n", skb->len);
				netif_rx(sub_skb);
			}
		}
@@ -1898,8 +1880,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,

                        offset = (info_element->data[2] >> 1)*2;

                        //printk("offset1:%x aid:%x\n",offset, ieee->assoc_id);

                        if(ieee->assoc_id < 8*offset ||
                                ieee->assoc_id > 8*(offset + info_element->len -3))

@@ -1910,7 +1890,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
                        if(info_element->data[3+offset] & (1<<(ieee->assoc_id%8)))
                                network->dtim_data |= IEEE80211_DTIM_UCAST;

			//IEEE80211_DEBUG_MGMT("MFIE_TYPE_TIM: partially ignored\n");
			break;

		case MFIE_TYPE_ERP:
@@ -2073,7 +2052,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
				info_element->data[1] == 0x13 &&
				info_element->data[2] == 0x74))
			{
				//printk("========>%s(): athros AP is exist\n",__FUNCTION__);
				network->atheros_cap_exist = true;
			}
			else
@@ -2085,7 +2063,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
						info_element->data[2] == 0x43) )
			{
				network->marvell_cap_exist = true;
				//printk("========>%s(): marvel AP is exist\n",__FUNCTION__);
			}


@@ -2231,7 +2208,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
		case MFIE_TYPE_COUNTRY:
			IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n",
					     info_element->len);
			//printk("=====>Receive <%s> Country IE\n",network->ssid);
			ieee80211_extract_country_ie(ieee, info_element, network, network->bssid);//addr2 is same as addr3 when from an AP
			break;
#endif
@@ -2551,9 +2527,6 @@ static inline void update_network(struct ieee80211_network *dst,
	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
	//	printk("====>%s(), aifs:%x, %x\n", __FUNCTION__, dst->qos_data.parameters.aifs[0], src->qos_data.parameters.aifs[0]);
	//	memcpy(&dst->qos_data, &src->qos_data,
	//		sizeof(struct ieee80211_qos_data));
	}
	else {
		dst->qos_data.supported = src->qos_data.supported;
@@ -2806,8 +2779,6 @@ static inline void ieee80211_process_probe_response(
		//YJ,add,080819,for hidden ap
		if(is_beacon(beacon->header.frame_ctl) == 0)
			network.flags = (~NETWORK_EMPTY_ESSID & network.flags)|(NETWORK_EMPTY_ESSID & target->flags);
		//if(strncmp(network.ssid, "linksys-c",9) == 0)
		//	printk("====>2 network.ssid=%s FLAG=%d target.ssid=%s FLAG=%d\n", network.ssid, network.flags, target->ssid, target->flags);
		if(((network.flags & NETWORK_EMPTY_ESSID) == NETWORK_EMPTY_ESSID) \
		    && (((network.ssid_len > 0) && (strncmp(target->ssid, network.ssid, network.ssid_len)))\
		    ||((ieee->current_network.ssid_len == network.ssid_len)&&(strncmp(ieee->current_network.ssid, network.ssid, network.ssid_len) == 0)&&(ieee->state == IEEE80211_NOLINK))))
@@ -2852,7 +2823,6 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
		ieee80211_process_probe_response(
			ieee, (struct ieee80211_probe_response *)header, stats);

		//printk("----------->%s()\n", __func__);
		if(ieee->sta_sleep || (ieee->ps != IEEE80211_PS_DISABLED &&
					ieee->iw_mode == IW_MODE_INFRA &&
					ieee->state == IEEE80211_LINKED))
+0 −32
Original line number Diff line number Diff line
@@ -280,10 +280,8 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
			/* as for the completion function, it does not need
			 * to check it any more.
			 * */
			//printk("%s():insert to waitqueue!\n",__FUNCTION__);
			skb_queue_tail(&ieee->skb_waitQ[tcb_desc->queue_index], skb);
		} else {
			//printk("TX packet!\n");
			ieee->softmac_hard_start_xmit(skb,ieee->dev);
			//dev_kfree_skb_any(skb);//edit by thomas
		}
@@ -304,7 +302,6 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i
	tcb_desc->RATRIndex = 7;
	tcb_desc->bTxDisableRateFallBack = 1;
	tcb_desc->bTxUseDriverAssingedRate = 1;
	//printk("=============>%s()\n", __FUNCTION__);
	if(single){

		header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
@@ -798,7 +795,6 @@ static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
		tmp_generic_ie_len = sizeof(ieee->pHTInfo->szRT2RTAggBuffer);
		HTConstructRT2RTAggElement(ieee, tmp_generic_ie_buf, &tmp_generic_ie_len);
        }
//	printk("===============>tmp_ht_cap_len is %d,tmp_ht_info_len is %d, tmp_generic_ie_len is %d\n",tmp_ht_cap_len,tmp_ht_info_len,tmp_generic_ie_len);
#endif
	beacon_size = sizeof(struct ieee80211_probe_response)+2+
		ssid_len
@@ -1344,8 +1340,6 @@ inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beaco
			memcpy(tag, realtek_ie_buf,realtek_ie_len -2 );
		}
	}
//	printk("<=====%s(), %p, %p\n", __FUNCTION__, ieee->dev, ieee->dev->dev_addr);
//	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
	return skb;
}

@@ -1399,7 +1393,6 @@ void ieee80211_associate_step1(struct ieee80211_device *ieee)
	else{
		ieee->state = IEEE80211_ASSOCIATING_AUTHENTICATING ;
		IEEE80211_DEBUG_MGMT("Sending authentication request\n");
		//printk(KERN_WARNING "Sending authentication request\n");
		softmac_mgmt_xmit(skb, ieee);
		//BUGON when you try to add_timer twice, using mod_timer may be better, john0709
		if(!timer_pending(&ieee->associate_timer)){
@@ -1915,28 +1908,23 @@ short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h, u32 *ti

	if(ieee->LPSDelayCnt)
	{
		//printk("===============>Delay enter LPS for DHCP and ARP packets...\n");
		ieee->LPSDelayCnt --;
		return 0;
	}

	dtim = ieee->current_network.dtim_data;
//	printk("%s():DTIM:%d\n",__FUNCTION__,dtim);
	if(!(dtim & IEEE80211_DTIM_VALID))
		return 0;
	timeout = ieee->current_network.beacon_interval; //should we use ps_timeout value or beacon_interval
	//printk("VALID\n");
	ieee->current_network.dtim_data = IEEE80211_DTIM_INVALID;
	/* there's no need to nofity AP that I find you buffered with broadcast packet */
	if(dtim & (IEEE80211_DTIM_UCAST & ieee->ps))
		return 2;

	if(!time_after(jiffies, ieee->dev->trans_start + MSECS(timeout))){
//		printk("%s():111Oh Oh ,it is not time out return 0\n",__FUNCTION__);
		return 0;
	}
	if(!time_after(jiffies, ieee->last_rx_ps_time + MSECS(timeout))){
//		printk("%s():222Oh Oh ,it is not time out return 0\n",__FUNCTION__);
		return 0;
	}
	if((ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE ) &&
@@ -1976,7 +1964,6 @@ short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h, u32 *ti
				else
					LPSAwakeIntvl_tmp = pPSC->LPSAwakeIntvl;//ieee->current_network.tim.tim_count;//pPSC->LPSAwakeIntvl;
			}
			//printk("=========>%s()assoc_id:%d(%#x),bAwakePktSent:%d,DTIM:%d, sleep interval:%d, LPSAwakeIntvl_tmp:%d, count:%d\n",__func__,ieee->assoc_id,cpu_to_le16(ieee->assoc_id),ieee->bAwakePktSent,ieee->current_network.dtim_period,pPSC->LPSAwakeIntvl,LPSAwakeIntvl_tmp,count);

		*time_l = ieee->current_network.last_dtim_sta_time[0]
			+ MSECS(ieee->current_network.beacon_interval * LPSAwakeIntvl_tmp);
@@ -2023,24 +2010,19 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
	/* 2 wake, 1 sleep, 0 do nothing */
	if(sleep == 0)//it is not time out or dtim is not valid
	{
		//printk("===========>sleep is 0,do nothing\n");
		goto out;
	}
	if(sleep == 1){
		//printk("===========>sleep is 1,to sleep\n");
		if(ieee->sta_sleep == 1){
			//printk("%s(1): sta_sleep = 1, sleep again ++++++++++ \n", __func__);
			ieee->enter_sleep_state(ieee->dev,th,tl);
		}

		else if(ieee->sta_sleep == 0){
		//	printk("send null 1\n");
			spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2);

			if(ieee->ps_is_queue_empty(ieee->dev)){
				ieee->sta_sleep = 2;
				ieee->ack_tx_to_ieee = 1;
				//printk("%s(2): sta_sleep = 0, notify AP we will sleeped ++++++++++ SendNullFunctionData\n", __func__);
				ieee80211_sta_ps_send_null_frame(ieee,1);
				ieee->ps_th = th;
				ieee->ps_tl = tl;
@@ -2052,10 +2034,8 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
		ieee->bAwakePktSent = false;//after null to power save we set it to false. not listen every beacon.

	}else if(sleep == 2){
		//printk("==========>sleep is 2,to wakeup\n");
		spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2);

		//printk("%s(3): pkt buffered in ap will awake ++++++++++ ieee80211_sta_wakeup\n", __func__);
		ieee80211_sta_wakeup(ieee,1);

		spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2);
@@ -2072,15 +2052,12 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl)
		if(nl){
			if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING)
			{
				//printk("%s(1): notify AP we are awaked ++++++++++ SendNullFunctionData\n", __func__);
				//printk("Warning: driver is probably failing to report TX ps error\n");
				ieee->ack_tx_to_ieee = 1;
				ieee80211_sta_ps_send_null_frame(ieee, 0);
			}
			else
			{
				ieee->ack_tx_to_ieee = 1;
				//printk("%s(2): notify AP we are awaked ++++++++++ Send PS-Poll\n", __func__);
				ieee80211_sta_ps_send_pspoll_frame(ieee);
			}
		}
@@ -2094,8 +2071,6 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl)

			if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING)
			{
				//printk("%s(3): notify AP we are awaked ++++++++++ SendNullFunctionData\n", __func__);
				//printk("Warning: driver is probably failing to report TX ps error\n");
				ieee->ack_tx_to_ieee = 1;
				ieee80211_sta_ps_send_null_frame(ieee, 0);
			}
@@ -2103,7 +2078,6 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl)
			{
				ieee->ack_tx_to_ieee = 1;
			ieee->polling = true;
				//printk("%s(4): notify AP we are awaked ++++++++++ Send PS-Poll\n", __func__);
				//ieee80211_sta_ps_send_null_frame(ieee, 0);
				ieee80211_sta_ps_send_pspoll_frame(ieee);
			}
@@ -2124,7 +2098,6 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
		/* Null frame with PS bit set */
		if(success){
			ieee->sta_sleep = 1;
			//printk("notify AP we will sleep and send null ok, so sleep now++++++++++ enter_sleep_state\n");
			ieee->enter_sleep_state(ieee->dev,ieee->ps_th,ieee->ps_tl);
		}
	} else {/* 21112005 - tx again null without PS bit if lost */
@@ -2134,12 +2107,10 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
			//ieee80211_sta_ps_send_null_frame(ieee, 0);
			if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING)
			{
				//printk("notify AP we will sleep but send bull failed, so resend++++++++++ SendNullFunctionData\n");
				ieee80211_sta_ps_send_null_frame(ieee, 0);
			}
			else
			{
				//printk("notify AP we are awaked but send pspoll failed, so resend++++++++++ Send PS-Poll\n");
				ieee80211_sta_ps_send_pspoll_frame(ieee);
			}
			spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2);
@@ -2431,7 +2402,6 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
			/* as for the completion function, it does not need
			 * to check it any more.
			 * */
			//printk("error:no descriptor left@queue_index %d\n", queue_index);
			//ieee80211_rtl_stop_queue(ieee);
#ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
			skb_queue_tail(&ieee->skb_drv_aggQ[queue_index], txb->fragments[i]);
@@ -2937,8 +2907,6 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee)

	if (ieee->current_network.beacon_interval == 0)
		ieee->current_network.beacon_interval = 100;
//	printk("===>%s(), chan:%d\n", __FUNCTION__, ieee->current_network.channel);
//	ieee->set_chan(ieee->dev,ieee->current_network.channel);

       	for(i = 0; i < 17; i++) {
	  ieee->last_rxseq_num[i] = -1;
Loading