Commit 989f8afb authored by Lidza Louina's avatar Lidza Louina Committed by Greg Kroah-Hartman

Staging:csr - Fixes whitespace around commas in unifi_pdu_processing.c.

Fixes whitepace around commas. Caught by checkpatch.pl.

ERROR: space required after that ','
Signed-off-by: default avatarLidza Louina <lidza.louina@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4f70a8d4
...@@ -38,7 +38,7 @@ static void _update_buffered_pkt_params_after_alignment(unifi_priv_t *priv, bulk ...@@ -38,7 +38,7 @@ static void _update_buffered_pkt_params_after_alignment(unifi_priv_t *priv, bulk
skb = (struct sk_buff*)bulkdata->d[0].os_net_buf_ptr; skb = (struct sk_buff*)bulkdata->d[0].os_net_buf_ptr;
align_offset = (u32)(long)(bulkdata->d[0].os_data_ptr) & (CSR_WIFI_ALIGN_BYTES-1); align_offset = (u32)(long)(bulkdata->d[0].os_data_ptr) & (CSR_WIFI_ALIGN_BYTES-1);
if(align_offset){ if(align_offset){
skb_pull(skb,align_offset); skb_pull(skb, align_offset);
} }
buffered_pkt->bulkdata.os_data_ptr = bulkdata->d[0].os_data_ptr; buffered_pkt->bulkdata.os_data_ptr = bulkdata->d[0].os_data_ptr;
...@@ -86,7 +86,7 @@ unifi_frame_ma_packet_req(unifi_priv_t *priv, CSR_PRIORITY priority, ...@@ -86,7 +86,7 @@ unifi_frame_ma_packet_req(unifi_priv_t *priv, CSR_PRIORITY priority,
*/ */
req->TransmissionControl = transmissionControl; req->TransmissionControl = transmissionControl;
req->VirtualInterfaceIdentifier = req->VirtualInterfaceIdentifier =
uf_get_vif_identifier(interfacePriv->interfaceMode,interfaceTag); uf_get_vif_identifier(interfacePriv->interfaceMode, interfaceTag);
memcpy(req->Ra.x, peerMacAddress, ETH_ALEN); memcpy(req->Ra.x, peerMacAddress, ETH_ALEN);
if (hostTag == 0xffffffff) { if (hostTag == 0xffffffff) {
...@@ -124,8 +124,8 @@ unifi_frame_ma_packet_req(unifi_priv_t *priv, CSR_PRIORITY priority, ...@@ -124,8 +124,8 @@ unifi_frame_ma_packet_req(unifi_priv_t *priv, CSR_PRIORITY priority,
#define TRANSMISSION_CONTROL_EOSP_MASK 0x0002 #define TRANSMISSION_CONTROL_EOSP_MASK 0x0002
static static
int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered_pkt, int frame_and_send_queued_pdu(unifi_priv_t* priv, tx_buffered_packets_t* buffered_pkt,
CsrWifiRouterCtrlStaInfo_t *staRecord,u8 moreData , u8 eosp) CsrWifiRouterCtrlStaInfo_t *staRecord, u8 moreData , u8 eosp)
{ {
CSR_SIGNAL signal; CSR_SIGNAL signal;
...@@ -135,7 +135,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered ...@@ -135,7 +135,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered
u8 *qc; u8 *qc;
u16 *fc = (u16*)(buffered_pkt->bulkdata.os_data_ptr); u16 *fc = (u16*)(buffered_pkt->bulkdata.os_data_ptr);
unsigned long lock_flags; unsigned long lock_flags;
unifi_trace(priv, UDBG3, "frame_and_send_queued_pdu with moreData: %d , EOSP: %d\n",moreData,eosp); unifi_trace(priv, UDBG3, "frame_and_send_queued_pdu with moreData: %d , EOSP: %d\n", moreData, eosp);
unifi_frame_ma_packet_req(priv, buffered_pkt->priority, buffered_pkt->rate, buffered_pkt->hostTag, unifi_frame_ma_packet_req(priv, buffered_pkt->priority, buffered_pkt->rate, buffered_pkt->hostTag,
buffered_pkt->interfaceTag, buffered_pkt->transmissionControl, buffered_pkt->interfaceTag, buffered_pkt->transmissionControl,
buffered_pkt->leSenderProcessId, buffered_pkt->peerMacAddress.a, &signal); buffered_pkt->leSenderProcessId, buffered_pkt->peerMacAddress.a, &signal);
...@@ -156,7 +156,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered ...@@ -156,7 +156,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered
if((staRecord != NULL)&& (staRecord->wmmOrQosEnabled == TRUE)) if((staRecord != NULL)&& (staRecord->wmmOrQosEnabled == TRUE))
{ {
unifi_trace(priv, UDBG3, "frame_and_send_queued_pdu WMM Enabled: %d \n",staRecord->wmmOrQosEnabled); unifi_trace(priv, UDBG3, "frame_and_send_queued_pdu WMM Enabled: %d \n", staRecord->wmmOrQosEnabled);
toDs = (*fc & cpu_to_le16(IEEE802_11_FC_TO_DS_MASK))?1 : 0; toDs = (*fc & cpu_to_le16(IEEE802_11_FC_TO_DS_MASK))?1 : 0;
fromDs = (*fc & cpu_to_le16(IEEE802_11_FC_FROM_DS_MASK))? 1: 0; fromDs = (*fc & cpu_to_le16(IEEE802_11_FC_FROM_DS_MASK))? 1: 0;
...@@ -190,7 +190,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered ...@@ -190,7 +190,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered
} }
result = ul_send_signal_unpacked(priv, &signal, &bulkdata); result = ul_send_signal_unpacked(priv, &signal, &bulkdata);
if(result){ if(result){
_update_buffered_pkt_params_after_alignment(priv, &bulkdata,buffered_pkt); _update_buffered_pkt_params_after_alignment(priv, &bulkdata, buffered_pkt);
} }
/* Decrement the packet counts queued in driver */ /* Decrement the packet counts queued in driver */
...@@ -199,13 +199,13 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered ...@@ -199,13 +199,13 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered
if (!priv->noOfPktQueuedInDriver) { if (!priv->noOfPktQueuedInDriver) {
unifi_error(priv, "packets queued in driver 0 still decrementing\n"); unifi_error(priv, "packets queued in driver 0 still decrementing\n");
} else { } else {
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
priv->noOfPktQueuedInDriver--; priv->noOfPktQueuedInDriver--;
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
} }
/* Sta Record is available for all unicast (except genericMgt Frames) & in other case its NULL */ /* Sta Record is available for all unicast (except genericMgt Frames) & in other case its NULL */
if (staRecord) { if (staRecord) {
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
if (!staRecord->noOfPktQueued) { if (!staRecord->noOfPktQueued) {
unifi_error(priv, "packets queued in driver per station is 0 still decrementing\n"); unifi_error(priv, "packets queued in driver per station is 0 still decrementing\n");
} else { } else {
...@@ -217,7 +217,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered ...@@ -217,7 +217,7 @@ int frame_and_send_queued_pdu(unifi_priv_t* priv,tx_buffered_packets_t* buffered
staRecord->nullDataHostTag = INVALID_HOST_TAG; staRecord->nullDataHostTag = INVALID_HOST_TAG;
} }
} }
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} }
} }
...@@ -243,24 +243,24 @@ void set_eosp_transmit_ctrl(unifi_priv_t *priv, struct list_head *txList) ...@@ -243,24 +243,24 @@ void set_eosp_transmit_ctrl(unifi_priv_t *priv, struct list_head *txList)
/* return the last node , and modify it. */ /* return the last node , and modify it. */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_for_each_prev_safe(listHead, placeHolder, txList) { list_for_each_prev_safe(listHead, placeHolder, txList) {
tx_q_item = list_entry(listHead, tx_buffered_packets_t, q); tx_q_item = list_entry(listHead, tx_buffered_packets_t, q);
tx_q_item->transmissionControl |= TRANSMISSION_CONTROL_EOSP_MASK; tx_q_item->transmissionControl |= TRANSMISSION_CONTROL_EOSP_MASK;
tx_q_item->transmissionControl = (tx_q_item->transmissionControl & ~(CSR_NO_CONFIRM_REQUIRED)); tx_q_item->transmissionControl = (tx_q_item->transmissionControl & ~(CSR_NO_CONFIRM_REQUIRED));
unifi_trace(priv, UDBG1, unifi_trace(priv, UDBG1,
"set_eosp_transmit_ctrl Transmission Control = 0x%x hostTag = 0x%x \n",tx_q_item->transmissionControl,tx_q_item->hostTag); "set_eosp_transmit_ctrl Transmission Control = 0x%x hostTag = 0x%x \n", tx_q_item->transmissionControl, tx_q_item->hostTag);
unifi_trace(priv,UDBG3,"in set_eosp_transmit_ctrl no.of buffered frames %d\n",priv->noOfPktQueuedInDriver); unifi_trace(priv, UDBG3, "in set_eosp_transmit_ctrl no.of buffered frames %d\n", priv->noOfPktQueuedInDriver);
break; break;
} }
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
unifi_trace(priv, UDBG1,"List Empty %d\n",list_empty(txList)); unifi_trace(priv, UDBG1, "List Empty %d\n", list_empty(txList));
unifi_trace(priv, UDBG5, "leaving set_eosp_transmit_ctrl\n"); unifi_trace(priv, UDBG5, "leaving set_eosp_transmit_ctrl\n");
return; return;
} }
static static
void send_vif_availibility_rsp(unifi_priv_t *priv,CSR_VIF_IDENTIFIER vif,CSR_RESULT_CODE resultCode) void send_vif_availibility_rsp(unifi_priv_t *priv, CSR_VIF_IDENTIFIER vif, CSR_RESULT_CODE resultCode)
{ {
CSR_SIGNAL signal; CSR_SIGNAL signal;
CSR_MA_VIF_AVAILABILITY_RESPONSE *rsp; CSR_MA_VIF_AVAILABILITY_RESPONSE *rsp;
...@@ -269,7 +269,7 @@ void send_vif_availibility_rsp(unifi_priv_t *priv,CSR_VIF_IDENTIFIER vif,CSR_RES ...@@ -269,7 +269,7 @@ void send_vif_availibility_rsp(unifi_priv_t *priv,CSR_VIF_IDENTIFIER vif,CSR_RES
unifi_trace(priv, UDBG3, "send_vif_availibility_rsp : invoked with resultCode = %d \n", resultCode); unifi_trace(priv, UDBG3, "send_vif_availibility_rsp : invoked with resultCode = %d \n", resultCode);
memset(&signal,0,sizeof(CSR_SIGNAL)); memset(&signal, 0, sizeof(CSR_SIGNAL));
rsp = &signal.u.MaVifAvailabilityResponse; rsp = &signal.u.MaVifAvailabilityResponse;
rsp->VirtualInterfaceIdentifier = vif; rsp->VirtualInterfaceIdentifier = vif;
rsp->ResultCode = resultCode; rsp->ResultCode = resultCode;
...@@ -280,7 +280,7 @@ void send_vif_availibility_rsp(unifi_priv_t *priv,CSR_VIF_IDENTIFIER vif,CSR_RES ...@@ -280,7 +280,7 @@ void send_vif_availibility_rsp(unifi_priv_t *priv,CSR_VIF_IDENTIFIER vif,CSR_RES
/* Send the signal to UniFi */ /* Send the signal to UniFi */
r = ul_send_signal_unpacked(priv, &signal, bulkdata); r = ul_send_signal_unpacked(priv, &signal, bulkdata);
if(r) { if(r) {
unifi_error(priv,"Availibility response sending failed %x status %d\n",vif,r); unifi_error(priv, "Availibility response sending failed %x status %d\n", vif, r);
} }
else { else {
unifi_trace(priv, UDBG3, "send_vif_availibility_rsp : status = %d \n", r); unifi_trace(priv, UDBG3, "send_vif_availibility_rsp : status = %d \n", r);
...@@ -295,7 +295,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv) ...@@ -295,7 +295,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv)
unsigned long lock_flags; unsigned long lock_flags;
struct list_head *listHead, *list; struct list_head *listHead, *list;
struct list_head *placeHolder; struct list_head *placeHolder;
u8 i, j,eospFramedeleted=0; u8 i, j, eospFramedeleted=0;
u8 thresholdExcedeDueToBroadcast = TRUE; u8 thresholdExcedeDueToBroadcast = TRUE;
/* it will be made it interface Specific in the future when multi interfaces are supported , /* it will be made it interface Specific in the future when multi interfaces are supported ,
right now interface 0 is considered */ right now interface 0 is considered */
...@@ -311,10 +311,10 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv) ...@@ -311,10 +311,10 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv)
* packets for station record crossed the threshold limit (64 for AP supporting * packets for station record crossed the threshold limit (64 for AP supporting
* 8 peers) * 8 peers)
*/ */
unifi_trace(priv,UDBG3,"number of station pkts queued= %d for sta id = %d\n", staInfo->noOfPktQueued, staInfo->aid); unifi_trace(priv, UDBG3, "number of station pkts queued= %d for sta id = %d\n", staInfo->noOfPktQueued, staInfo->aid);
for(j = 0; j < MAX_ACCESS_CATOGORY; j++) { for(j = 0; j < MAX_ACCESS_CATOGORY; j++) {
list = &staInfo->dataPdu[j]; list = &staInfo->dataPdu[j];
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_for_each_safe(listHead, placeHolder, list) { list_for_each_safe(listHead, placeHolder, list) {
tx_q_item = list_entry(listHead, tx_buffered_packets_t, q); tx_q_item = list_entry(listHead, tx_buffered_packets_t, q);
list_del(listHead); list_del(listHead);
...@@ -339,7 +339,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv) ...@@ -339,7 +339,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv)
} }
break; break;
} }
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
} }
} }
} }
...@@ -347,13 +347,13 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv) ...@@ -347,13 +347,13 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv)
/* Remove the packets from genericMulticastOrBroadCastFrames queue /* Remove the packets from genericMulticastOrBroadCastFrames queue
* (the max packets in driver is reached due to broadcast/multicast frames) * (the max packets in driver is reached due to broadcast/multicast frames)
*/ */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_for_each_safe(listHead, placeHolder, &interfacePriv->genericMulticastOrBroadCastFrames) { list_for_each_safe(listHead, placeHolder, &interfacePriv->genericMulticastOrBroadCastFrames) {
tx_q_item = list_entry(listHead, tx_buffered_packets_t, q); tx_q_item = list_entry(listHead, tx_buffered_packets_t, q);
if(eospFramedeleted){ if(eospFramedeleted){
tx_q_item->transmissionControl |= TRANSMISSION_CONTROL_EOSP_MASK; tx_q_item->transmissionControl |= TRANSMISSION_CONTROL_EOSP_MASK;
tx_q_item->transmissionControl = (tx_q_item->transmissionControl & ~(CSR_NO_CONFIRM_REQUIRED)); tx_q_item->transmissionControl = (tx_q_item->transmissionControl & ~(CSR_NO_CONFIRM_REQUIRED));
unifi_trace(priv, UDBG1,"updating eosp for next packet hostTag:= 0x%x ",tx_q_item->hostTag); unifi_trace(priv, UDBG1, "updating eosp for next packet hostTag:= 0x%x ", tx_q_item->hostTag);
eospFramedeleted =0; eospFramedeleted =0;
break; break;
} }
...@@ -361,7 +361,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv) ...@@ -361,7 +361,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv)
if(tx_q_item->transmissionControl & TRANSMISSION_CONTROL_EOSP_MASK ){ if(tx_q_item->transmissionControl & TRANSMISSION_CONTROL_EOSP_MASK ){
eospFramedeleted = 1; eospFramedeleted = 1;
} }
unifi_trace(priv,UDBG1, "freeing of multicast packets ToC = 0x%x hostTag = 0x%x \n",tx_q_item->transmissionControl,tx_q_item->hostTag); unifi_trace(priv, UDBG1, "freeing of multicast packets ToC = 0x%x hostTag = 0x%x \n", tx_q_item->transmissionControl, tx_q_item->hostTag);
list_del(listHead); list_del(listHead);
unifi_net_data_free(priv, &tx_q_item->bulkdata); unifi_net_data_free(priv, &tx_q_item->bulkdata);
kfree(tx_q_item); kfree(tx_q_item);
...@@ -373,7 +373,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv) ...@@ -373,7 +373,7 @@ void verify_and_accomodate_tx_packet(unifi_priv_t *priv)
break; break;
} }
} }
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
} }
unifi_trace(priv, UDBG3, "leaving verify_and_accomodate_tx_packet\n"); unifi_trace(priv, UDBG3, "leaving verify_and_accomodate_tx_packet\n");
} }
...@@ -391,13 +391,13 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata, ...@@ -391,13 +391,13 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata,
unifi_trace(priv, UDBG5, "entering enque_tx_data_pdu\n"); unifi_trace(priv, UDBG5, "entering enque_tx_data_pdu\n");
if(!list) { if(!list) {
unifi_error(priv,"List is not specified\n"); unifi_error(priv, "List is not specified\n");
return CSR_RESULT_FAILURE; return CSR_RESULT_FAILURE;
} }
/* Removes aged packets & adds the incoming packet */ /* Removes aged packets & adds the incoming packet */
if (priv->noOfPktQueuedInDriver >= CSR_WIFI_DRIVER_SUPPORT_FOR_MAX_PKT_QUEUEING) { if (priv->noOfPktQueuedInDriver >= CSR_WIFI_DRIVER_SUPPORT_FOR_MAX_PKT_QUEUEING) {
unifi_trace(priv,UDBG3,"number of pkts queued= %d \n", priv->noOfPktQueuedInDriver); unifi_trace(priv, UDBG3, "number of pkts queued= %d \n", priv->noOfPktQueuedInDriver);
verify_and_accomodate_tx_packet(priv); verify_and_accomodate_tx_packet(priv);
} }
...@@ -412,7 +412,7 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata, ...@@ -412,7 +412,7 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata,
} }
/* disable the preemption */ /* disable the preemption */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
INIT_LIST_HEAD(&tx_q_item->q); INIT_LIST_HEAD(&tx_q_item->q);
/* fill the tx_q structure members */ /* fill the tx_q structure members */
tx_q_item->bulkdata.os_data_ptr = bulkdata->d[0].os_data_ptr; tx_q_item->bulkdata.os_data_ptr = bulkdata->d[0].os_data_ptr;
...@@ -437,7 +437,7 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata, ...@@ -437,7 +437,7 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata,
/* Count of packet queued in driver */ /* Count of packet queued in driver */
priv->noOfPktQueuedInDriver++; priv->noOfPktQueuedInDriver++;
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
unifi_trace(priv, UDBG5, "leaving enque_tx_data_pdu\n"); unifi_trace(priv, UDBG5, "leaving enque_tx_data_pdu\n");
return CSR_RESULT_SUCCESS; return CSR_RESULT_SUCCESS;
} }
...@@ -655,13 +655,13 @@ void uf_handle_tim_cfm(unifi_priv_t *priv, CSR_MLME_SET_TIM_CONFIRM *cfm, u16 re ...@@ -655,13 +655,13 @@ void uf_handle_tim_cfm(unifi_priv_t *priv, CSR_MLME_SET_TIM_CONFIRM *cfm, u16 re
} }
if (handle != CSR_WIFI_BROADCAST_OR_MULTICAST_HANDLE) { if (handle != CSR_WIFI_BROADCAST_OR_MULTICAST_HANDLE) {
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
if ((staRecord = ((CsrWifiRouterCtrlStaInfo_t *) (interfacePriv->staInfo[handle]))) == NULL) { if ((staRecord = ((CsrWifiRouterCtrlStaInfo_t *) (interfacePriv->staInfo[handle]))) == NULL) {
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
unifi_warning(priv, "uf_handle_tim_cfm: station record is NULL handle = %x\n", handle); unifi_warning(priv, "uf_handle_tim_cfm: station record is NULL handle = %x\n", handle);
return; return;
} }
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} }
switch(timSetStatus) switch(timSetStatus)
{ {
...@@ -909,13 +909,13 @@ void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, u32 h ...@@ -909,13 +909,13 @@ void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, u32 h
(u8*)&signal.SignalPrimitiveHeader.SenderProcessId); (u8*)&signal.SignalPrimitiveHeader.SenderProcessId);
/* set The virtual interfaceIdentifier, aid, tim value */ /* set The virtual interfaceIdentifier, aid, tim value */
req->VirtualInterfaceIdentifier = uf_get_vif_identifier(interfacePriv->interfaceMode,interfaceTag); req->VirtualInterfaceIdentifier = uf_get_vif_identifier(interfacePriv->interfaceMode, interfaceTag);
req->AssociationId = aid; req->AssociationId = aid;
req->TimValue = setTim; req->TimValue = setTim;
unifi_trace(priv, UDBG2, "update_tim:AID %x,senderIdLsb = 0x%x, handle = 0x%x, timSetStatus = %x, sender proceesID = %x \n", unifi_trace(priv, UDBG2, "update_tim:AID %x,senderIdLsb = 0x%x, handle = 0x%x, timSetStatus = %x, sender proceesID = %x \n",
aid,senderIdLsb, handle, timSetStatus, signal.SignalPrimitiveHeader.SenderProcessId); aid, senderIdLsb, handle, timSetStatus, signal.SignalPrimitiveHeader.SenderProcessId);
/* Send the signal to UniFi */ /* Send the signal to UniFi */
r = ul_send_signal_unpacked(priv, &signal, bulkdata); r = ul_send_signal_unpacked(priv, &signal, bulkdata);
...@@ -953,17 +953,17 @@ void process_peer_active_transition(unifi_priv_t * priv, ...@@ -953,17 +953,17 @@ void process_peer_active_transition(unifi_priv_t * priv,
CsrWifiRouterCtrlStaInfo_t *staRecord, CsrWifiRouterCtrlStaInfo_t *staRecord,
u16 interfaceTag) u16 interfaceTag)
{ {
int r,i; int r, i;
u8 spaceAvail[4] = {TRUE,TRUE,TRUE,TRUE}; u8 spaceAvail[4] = {TRUE, TRUE, TRUE, TRUE};
tx_buffered_packets_t * buffered_pkt = NULL; tx_buffered_packets_t * buffered_pkt = NULL;
unsigned long lock_flags; unsigned long lock_flags;
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag]; netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
unifi_trace(priv, UDBG5, "entering process_peer_active_transition\n"); unifi_trace(priv, UDBG5, "entering process_peer_active_transition\n");
if(IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag)) { if(IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag)) {
/* giving more priority to multicast packets so delaying unicast packets*/ /* giving more priority to multicast packets so delaying unicast packets*/
unifi_trace(priv,UDBG2, "Multicast transmission is going on so resume unicast transmission after DTIM over\n"); unifi_trace(priv, UDBG2, "Multicast transmission is going on so resume unicast transmission after DTIM over\n");
/* As station is active now, even though AP is not able to send frames to it /* As station is active now, even though AP is not able to send frames to it
* because of DTIM, it needs to reset the TIM here * because of DTIM, it needs to reset the TIM here
...@@ -987,12 +987,12 @@ void process_peer_active_transition(unifi_priv_t * priv, ...@@ -987,12 +987,12 @@ void process_peer_active_transition(unifi_priv_t * priv,
while((buffered_pkt=dequeue_tx_data_pdu(priv, &staRecord->mgtFrames))) { while((buffered_pkt=dequeue_tx_data_pdu(priv, &staRecord->mgtFrames))) {
buffered_pkt->transmissionControl &= buffered_pkt->transmissionControl &=
~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK); ~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staRecord,0,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staRecord, 0, FALSE)) == -ENOSPC) {
unifi_trace(priv, UDBG2, "p_p_a_t:(ENOSPC) Mgt Frame queueing \n"); unifi_trace(priv, UDBG2, "p_p_a_t:(ENOSPC) Mgt Frame queueing \n");
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staRecord->mgtFrames); list_add(&buffered_pkt->q, &staRecord->mgtFrames);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[3]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[3]=(u8)(staRecord->assignedHandle);
spaceAvail[3] = FALSE; spaceAvail[3] = FALSE;
break; break;
...@@ -1008,7 +1008,7 @@ void process_peer_active_transition(unifi_priv_t * priv, ...@@ -1008,7 +1008,7 @@ void process_peer_active_transition(unifi_priv_t * priv,
if (!staRecord->timRequestPendingFlag) { if (!staRecord->timRequestPendingFlag) {
if (staRecord->txSuspend) { if (staRecord->txSuspend) {
if(staRecord->timSet == CSR_WIFI_TIM_SET) { if(staRecord->timSet == CSR_WIFI_TIM_SET) {
update_tim(priv,staRecord->aid,0,interfaceTag, staRecord->assignedHandle); update_tim(priv, staRecord->aid, 0, interfaceTag, staRecord->assignedHandle);
} }
return; return;
} }
...@@ -1025,16 +1025,16 @@ void process_peer_active_transition(unifi_priv_t * priv, ...@@ -1025,16 +1025,16 @@ void process_peer_active_transition(unifi_priv_t * priv,
for(i=3;i>=0;i--) { for(i=3;i>=0;i--) {
if(!spaceAvail[i]) if(!spaceAvail[i])
continue; continue;
unifi_trace(priv, UDBG6, "p_p_a_t:data pkt sending for AC %d \n",i); unifi_trace(priv, UDBG6, "p_p_a_t:data pkt sending for AC %d \n", i);
while((buffered_pkt=dequeue_tx_data_pdu(priv, &staRecord->dataPdu[i]))) { while((buffered_pkt=dequeue_tx_data_pdu(priv, &staRecord->dataPdu[i]))) {
buffered_pkt->transmissionControl &= buffered_pkt->transmissionControl &=
~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK); ~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staRecord,0,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staRecord, 0, FALSE)) == -ENOSPC) {
/* Clear the trigger bit transmission control*/ /* Clear the trigger bit transmission control*/
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staRecord->dataPdu[i]); list_add(&buffered_pkt->q, &staRecord->dataPdu[i]);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[i]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[i]=(u8)(staRecord->assignedHandle);
break; break;
} else { } else {
...@@ -1050,7 +1050,7 @@ void process_peer_active_transition(unifi_priv_t * priv, ...@@ -1050,7 +1050,7 @@ void process_peer_active_transition(unifi_priv_t * priv,
if (!staRecord->timRequestPendingFlag){ if (!staRecord->timRequestPendingFlag){
if((staRecord->timSet == CSR_WIFI_TIM_SET) || (staRecord->timSet == CSR_WIFI_TIM_SETTING)) { if((staRecord->timSet == CSR_WIFI_TIM_SET) || (staRecord->timSet == CSR_WIFI_TIM_SETTING)) {
unifi_trace(priv, UDBG3, "p_p_a_t:resetting tim .....\n"); unifi_trace(priv, UDBG3, "p_p_a_t:resetting tim .....\n");
update_tim(priv,staRecord->aid,0,interfaceTag, staRecord->assignedHandle); update_tim(priv, staRecord->aid, 0, interfaceTag, staRecord->assignedHandle);
} }
} }
else else
...@@ -1067,7 +1067,7 @@ void process_peer_active_transition(unifi_priv_t * priv, ...@@ -1067,7 +1067,7 @@ void process_peer_active_transition(unifi_priv_t * priv,
void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv,u16 interfaceTag, const CSR_MA_PACKET_CONFIRM *pkt_cfm) void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv, u16 interfaceTag, const CSR_MA_PACKET_CONFIRM *pkt_cfm)
{ {
netInterface_priv_t *interfacePriv; netInterface_priv_t *interfacePriv;
u8 i; u8 i;
...@@ -1076,16 +1076,16 @@ void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv,u16 interfaceTag, const CSR ...@@ -1076,16 +1076,16 @@ void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv,u16 interfaceTag, const CSR
if(pkt_cfm->HostTag == interfacePriv->multicastPduHostTag) { if(pkt_cfm->HostTag == interfacePriv->multicastPduHostTag) {
unifi_trace(priv,UDBG2,"CFM for marked Multicast Tag = %x\n",interfacePriv->multicastPduHostTag); unifi_trace(priv, UDBG2, "CFM for marked Multicast Tag = %x\n", interfacePriv->multicastPduHostTag);
interfacePriv->multicastPduHostTag = 0xffffffff; interfacePriv->multicastPduHostTag = 0xffffffff;
resume_suspended_uapsd(priv,interfaceTag); resume_suspended_uapsd(priv, interfaceTag);
resume_unicast_buffered_frames(priv,interfaceTag); resume_unicast_buffered_frames(priv, interfaceTag);
if(list_empty(&interfacePriv->genericMulticastOrBroadCastMgtFrames) && if(list_empty(&interfacePriv->genericMulticastOrBroadCastMgtFrames) &&
list_empty(&interfacePriv->genericMulticastOrBroadCastFrames)) { list_empty(&interfacePriv->genericMulticastOrBroadCastFrames)) {
unifi_trace(priv,UDBG1,"Resetting multicastTIM"); unifi_trace(priv, UDBG1, "Resetting multicastTIM");
if (!interfacePriv->bcTimSetReqPendingFlag) if (!interfacePriv->bcTimSetReqPendingFlag)
{ {
update_tim(priv,0,CSR_WIFI_TIM_RESET,interfaceTag, 0xFFFFFFFF); update_tim(priv, 0, CSR_WIFI_TIM_RESET, interfaceTag, 0xFFFFFFFF);
} }
else else
{ {
...@@ -1164,7 +1164,7 @@ void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv,u16 interfaceTag, const CSR ...@@ -1164,7 +1164,7 @@ void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv,u16 interfaceTag, const CSR
&send_cfm_list, &send_cfm_list,
&(staRecord->dataPdu[j])); &(staRecord->dataPdu[j]));
uf_flush_list(priv,&(staRecord->dataPdu[j])); uf_flush_list(priv, &(staRecord->dataPdu[j]));
} }
send_auto_ma_packet_confirm(priv, staRecord->interfacePriv, &send_cfm_list); send_auto_ma_packet_confirm(priv, staRecord->interfacePriv, &send_cfm_list);
...@@ -1469,7 +1469,7 @@ static int update_macheader(unifi_priv_t *priv, struct sk_buff *skb, ...@@ -1469,7 +1469,7 @@ static int update_macheader(unifi_priv_t *priv, struct sk_buff *skb,
} }
/* prepare the complete skb, by pushing the MAC header to the beginning of the skb->data */ /* prepare the complete skb, by pushing the MAC header to the beginning of the skb->data */
unifi_trace(priv, UDBG5, "updated Mac Header: %d \n",macHeaderLengthInBytes); unifi_trace(priv, UDBG5, "updated Mac Header: %d \n", macHeaderLengthInBytes);
memcpy(bufPtr, macHeaderBuf, macHeaderLengthInBytes); memcpy(bufPtr, macHeaderBuf, macHeaderLengthInBytes);
unifi_trace(priv, UDBG5, "leaving the update_macheader function\n"); unifi_trace(priv, UDBG5, "leaving the update_macheader function\n");
...@@ -1515,7 +1515,7 @@ uf_ap_process_data_pdu(unifi_priv_t *priv, struct sk_buff *skb, ...@@ -1515,7 +1515,7 @@ uf_ap_process_data_pdu(unifi_priv_t *priv, struct sk_buff *skb,
CsrWifiRouterCtrlStaInfo_t *dstStaInfo = NULL; CsrWifiRouterCtrlStaInfo_t *dstStaInfo = NULL;
netInterface_priv_t *interfacePriv; netInterface_priv_t *interfacePriv;
unifi_trace(priv, UDBG5, "entering uf_ap_process_data_pdu %d\n",macHeaderLengthInBytes); unifi_trace(priv, UDBG5, "entering uf_ap_process_data_pdu %d\n", macHeaderLengthInBytes);
/* InterfaceTag validation from MA_PACKET.indication */ /* InterfaceTag validation from MA_PACKET.indication */
if (interfaceTag >= CSR_WIFI_NUM_INTERFACES) { if (interfaceTag >= CSR_WIFI_NUM_INTERFACES) {
unifi_trace(priv, UDBG1, "Interface Tag is Invalid in uf_ap_process_data_pdu\n"); unifi_trace(priv, UDBG1, "Interface Tag is Invalid in uf_ap_process_data_pdu\n");
...@@ -1608,7 +1608,7 @@ uf_ap_process_data_pdu(unifi_priv_t *priv, struct sk_buff *skb, ...@@ -1608,7 +1608,7 @@ uf_ap_process_data_pdu(unifi_priv_t *priv, struct sk_buff *skb,
unifi_trace(priv, UDBG3, "Mac Header updated...calling uf_process_ma_packet_req \n"); unifi_trace(priv, UDBG3, "Mac Header updated...calling uf_process_ma_packet_req \n");
/* Packet is ready to send to unifi ,transmissionControl = 0x0004, confirmation is not needed for data packets */ /* Packet is ready to send to unifi ,transmissionControl = 0x0004, confirmation is not needed for data packets */
if (uf_process_ma_packet_req(priv, ehdr->h_dest, 0xffffffff, interfaceTag, CSR_NO_CONFIRM_REQUIRED, (CSR_RATE)0,priority, priv->netdev_client->sender_id, bulkdata)) { if (uf_process_ma_packet_req(priv, ehdr->h_dest, 0xffffffff, interfaceTag, CSR_NO_CONFIRM_REQUIRED, (CSR_RATE)0, priority, priv->netdev_client->sender_id, bulkdata)) {
if (sendToNetdev) { if (sendToNetdev) {
unifi_trace(priv, UDBG1, "In uf_ap_process_data_pdu, (Packet Drop) uf_process_ma_packet_req failed. freeing skb_copy data (original data sent to Netdev)\n"); unifi_trace(priv, UDBG1, "In uf_ap_process_data_pdu, (Packet Drop) uf_process_ma_packet_req failed. freeing skb_copy data (original data sent to Netdev)\n");
/* Free's the skb_copy(skbPtr) data since packet processing failed */ /* Free's the skb_copy(skbPtr) data since packet processing failed */
...@@ -1750,7 +1750,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1750,7 +1750,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
/* push the packet to the unifi if list is empty (if packet lost how to re-enque) */ /* push the packet to the unifi if list is empty (if packet lost how to re-enque) */
if (list_empty(&interfacePriv->genericMgtFrames)) { if (list_empty(&interfacePriv->genericMgtFrames)) {
#ifdef CSR_SUPPORT_SME #ifdef CSR_SUPPORT_SME
if(!(IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag))) { if(!(IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag))) {
#endif #endif
unifi_trace(priv, UDBG3, "genericMgtFrames list is empty uf_process_ma_packet_req \n"); unifi_trace(priv, UDBG3, "genericMgtFrames list is empty uf_process_ma_packet_req \n");
...@@ -1765,8 +1765,8 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1765,8 +1765,8 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
#ifdef CSR_SUPPORT_SME #ifdef CSR_SUPPORT_SME
}else{ }else{
list = &interfacePriv->genericMgtFrames; list = &interfacePriv->genericMgtFrames;
unifi_trace(priv, UDBG3, "genericMgtFrames queue empty and dtim started\n hosttag is 0x%x,\n",signal.u.MaPacketRequest.HostTag); unifi_trace(priv, UDBG3, "genericMgtFrames queue empty and dtim started\n hosttag is 0x%x,\n", signal.u.MaPacketRequest.HostTag);
update_eosp_to_head_of_broadcast_list_head(priv,interfaceTag); update_eosp_to_head_of_broadcast_list_head(priv, interfaceTag);
} }
#endif #endif
} else { } else {
...@@ -1776,15 +1776,15 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1776,15 +1776,15 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
} }
} else { } else {
/* check peer power state */ /* check peer power state */
if (queuePacketDozing || !list_empty(&staRecord->mgtFrames) || IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag)) { if (queuePacketDozing || !list_empty(&staRecord->mgtFrames) || IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag)) {
/* peer is in dozing mode, so queue packet in mgt frame list of station record */ /* peer is in dozing mode, so queue packet in mgt frame list of station record */
/*if multicast traffic is going on, buffer the unicast packets*/ /*if multicast traffic is going on, buffer the unicast packets*/
list = &staRecord->mgtFrames; list = &staRecord->mgtFrames;
unifi_trace(priv, UDBG1, "staRecord->MgtFrames list empty? = %s, handle = %d, queuePacketDozing = %d\n", unifi_trace(priv, UDBG1, "staRecord->MgtFrames list empty? = %s, handle = %d, queuePacketDozing = %d\n",
(list_empty(&staRecord->mgtFrames))? "YES": "NO", staRecord->assignedHandle, queuePacketDozing); (list_empty(&staRecord->mgtFrames))? "YES": "NO", staRecord->assignedHandle, queuePacketDozing);
if(IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag)){ if(IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag)){
update_eosp_to_head_of_broadcast_list_head(priv,interfaceTag); update_eosp_to_head_of_broadcast_list_head(priv, interfaceTag);
} }
} else { } else {
...@@ -1794,7 +1794,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1794,7 +1794,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
/* requeue the failed packet to staRecord->mgtFrames with same position */ /* requeue the failed packet to staRecord->mgtFrames with same position */
list = &staRecord->mgtFrames; list = &staRecord->mgtFrames;
requeueOnSamePos = TRUE; requeueOnSamePos = TRUE;
unifi_trace(priv, UDBG1, "(ENOSPC) Sending MgtFrames Failed handle = %d so buffering\n",staRecord->assignedHandle); unifi_trace(priv, UDBG1, "(ENOSPC) Sending MgtFrames Failed handle = %d so buffering\n", staRecord->assignedHandle);
priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle);
} else if (result) { } else if (result) {
status = CSR_RESULT_FAILURE; status = CSR_RESULT_FAILURE;
...@@ -1827,11 +1827,11 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1827,11 +1827,11 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
if(!staRecord) { if(!staRecord) {
unifi_error(priv, "In %s unicast but staRecord = NULL\n", __FUNCTION__); unifi_error(priv, "In %s unicast but staRecord = NULL\n", __FUNCTION__);
return CSR_RESULT_FAILURE; return CSR_RESULT_FAILURE;
} else if (queuePacketDozing || isRouterBufferEnabled(priv,priority_q)|| !list_empty(&staRecord->dataPdu[priority_q]) || IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag)) { } else if (queuePacketDozing || isRouterBufferEnabled(priv, priority_q)|| !list_empty(&staRecord->dataPdu[priority_q]) || IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag)) {
/* peer is in dozing mode, so queue packet in mgt frame list of station record */ /* peer is in dozing mode, so queue packet in mgt frame list of station record */
/* if multicast traffic is going on, buffet the unicast packets */ /* if multicast traffic is going on, buffet the unicast packets */
unifi_trace(priv, UDBG2, "Enqueued to staRecord->dataPdu[%d] queuePacketDozing=%d,\ unifi_trace(priv, UDBG2, "Enqueued to staRecord->dataPdu[%d] queuePacketDozing=%d,\
Buffering enabled = %d \n", priority_q,queuePacketDozing,isRouterBufferEnabled(priv,priority_q)); Buffering enabled = %d \n", priority_q, queuePacketDozing, isRouterBufferEnabled(priv, priority_q));
list = &staRecord->dataPdu[priority_q]; list = &staRecord->dataPdu[priority_q];
} else { } else {
unifi_trace(priv, UDBG5, "staRecord->dataPdu[%d] list is empty uf_process_ma_packet_req \n", priority_q); unifi_trace(priv, UDBG5, "staRecord->dataPdu[%d] list is empty uf_process_ma_packet_req \n", priority_q);
...@@ -1839,12 +1839,12 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1839,12 +1839,12 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
result = ul_send_signal_unpacked(priv, &signal, bulkdata); result = ul_send_signal_unpacked(priv, &signal, bulkdata);
if(result == -ENOSPC) { if(result == -ENOSPC) {
/* requeue the failed packet to staRecord->dataPdu[priority_q] with same position */ /* requeue the failed packet to staRecord->dataPdu[priority_q] with same position */
unifi_trace(priv, UDBG1, "(ENOSPC) Sending Unicast DataPDU to queue %d Failed so buffering\n",priority_q); unifi_trace(priv, UDBG1, "(ENOSPC) Sending Unicast DataPDU to queue %d Failed so buffering\n", priority_q);
requeueOnSamePos = TRUE; requeueOnSamePos = TRUE;
list = &staRecord->dataPdu[priority_q]; list = &staRecord->dataPdu[priority_q];
priv->pausedStaHandle[priority_q]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[priority_q]=(u8)(staRecord->assignedHandle);
if(!isRouterBufferEnabled(priv,priority_q)) { if(!isRouterBufferEnabled(priv, priority_q)) {
unifi_error(priv,"Buffering Not enabled for queue %d \n",priority_q); unifi_error(priv, "Buffering Not enabled for queue %d \n", priority_q);
} }
} else if (result) { } else if (result) {
status = CSR_RESULT_FAILURE; status = CSR_RESULT_FAILURE;
...@@ -1869,19 +1869,19 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1869,19 +1869,19 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
unifi_error(priv, "unrecognized frame type\n"); unifi_error(priv, "unrecognized frame type\n");
} }
if(list) { if(list) {
status = enque_tx_data_pdu(priv, bulkdata,list, &signal,requeueOnSamePos); status = enque_tx_data_pdu(priv, bulkdata, list, &signal, requeueOnSamePos);
/* Record no. of packet queued for each peer */ /* Record no. of packet queued for each peer */
if (staRecord && (pktType == CSR_WIFI_UNICAST_PDU) && (!status)) { if (staRecord && (pktType == CSR_WIFI_UNICAST_PDU) && (!status)) {
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
staRecord->noOfPktQueued++; staRecord->noOfPktQueued++;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} }
else if ((pktType == CSR_WIFI_MULTICAST_PDU) && (!status)) else if ((pktType == CSR_WIFI_MULTICAST_PDU) && (!status))
{ {
/* If broadcast Tim is set && queuing is successful, then only update TIM */ /* If broadcast Tim is set && queuing is successful, then only update TIM */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
interfacePriv->noOfbroadcastPktQueued++; interfacePriv->noOfbroadcastPktQueued++;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} }
} }
/* If broadcast Tim is set && queuing is successful, then only update TIM */ /* If broadcast Tim is set && queuing is successful, then only update TIM */
...@@ -1889,7 +1889,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1889,7 +1889,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
unifi_trace(priv, UDBG3, "tim set due to broadcast pkt\n"); unifi_trace(priv, UDBG3, "tim set due to broadcast pkt\n");
if (!interfacePriv->bcTimSetReqPendingFlag) if (!interfacePriv->bcTimSetReqPendingFlag)
{ {
update_tim(priv,0,CSR_WIFI_TIM_SET,interfaceTag, handle); update_tim(priv, 0, CSR_WIFI_TIM_SET, interfaceTag, handle);
} }
else else
{ {
...@@ -1909,7 +1909,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1909,7 +1909,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
!list_empty(&staRecord->dataPdu[UNIFI_TRAFFIC_Q_CONTENTION])) { !list_empty(&staRecord->dataPdu[UNIFI_TRAFFIC_Q_CONTENTION])) {
unifi_trace(priv, UDBG3, "tim set due to unicast pkt & peer in powersave\n"); unifi_trace(priv, UDBG3, "tim set due to unicast pkt & peer in powersave\n");
if (!staRecord->timRequestPendingFlag){ if (!staRecord->timRequestPendingFlag){
update_tim(priv,staRecord->aid,1,interfaceTag, handle); update_tim(priv, staRecord->aid, 1, interfaceTag, handle);
} }
else else
{ {
...@@ -1929,7 +1929,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1929,7 +1929,7 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
if (uf_is_more_data_for_non_delivery_ac(staRecord) || (allDeliveryEnabled && dataAvailable) if (uf_is_more_data_for_non_delivery_ac(staRecord) || (allDeliveryEnabled && dataAvailable)
|| (!list_empty(&staRecord->mgtFrames))) { || (!list_empty(&staRecord->mgtFrames))) {
if (!staRecord->timRequestPendingFlag) { if (!staRecord->timRequestPendingFlag) {
update_tim(priv,staRecord->aid,1,interfaceTag, handle); update_tim(priv, staRecord->aid, 1, interfaceTag, handle);
} }
else else
{ {
...@@ -1945,8 +1945,8 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, ...@@ -1945,8 +1945,8 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
} }
} }
if((list) && (pktType == CSR_WIFI_UNICAST_PDU && !queuePacketDozing) && !(isRouterBufferEnabled(priv,priority_q)) && !(IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag))) { if((list) && (pktType == CSR_WIFI_UNICAST_PDU && !queuePacketDozing) && !(isRouterBufferEnabled(priv, priority_q)) && !(IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag))) {
unifi_trace(priv, UDBG2, "buffering cleared for queue = %d So resending buffered frames\n",priority_q); unifi_trace(priv, UDBG2, "buffering cleared for queue = %d So resending buffered frames\n", priority_q);
uf_send_buffered_frames(priv, priority_q); uf_send_buffered_frames(priv, priority_q);
} }
unifi_trace(priv, UDBG5, "leaving uf_process_ma_packet_req \n"); unifi_trace(priv, UDBG5, "leaving uf_process_ma_packet_req \n");
...@@ -2022,23 +2022,23 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag) ...@@ -2022,23 +2022,23 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag)
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag]; netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
u32 hostTag = 0xffffffff; u32 hostTag = 0xffffffff;
if(!isRouterBufferEnabled(priv,UNIFI_TRAFFIC_Q_VO)) { if(!isRouterBufferEnabled(priv, UNIFI_TRAFFIC_Q_VO)) {
while((interfacePriv->dtimActive)&& (buffered_pkt=dequeue_tx_data_pdu(priv,&interfacePriv->genericMulticastOrBroadCastMgtFrames))) { while((interfacePriv->dtimActive)&& (buffered_pkt=dequeue_tx_data_pdu(priv, &interfacePriv->genericMulticastOrBroadCastMgtFrames))) {
buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK); buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK);
moreData = (buffered_pkt->transmissionControl & TRANSMISSION_CONTROL_EOSP_MASK)?FALSE:TRUE; moreData = (buffered_pkt->transmissionControl & TRANSMISSION_CONTROL_EOSP_MASK)?FALSE:TRUE;
unifi_trace(priv,UDBG2,"DTIM Occurred for interface:sending Mgt packet %d\n",interfaceTag); unifi_trace(priv, UDBG2, "DTIM Occurred for interface:sending Mgt packet %d\n", interfaceTag);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,NULL,moreData,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, NULL, moreData, FALSE)) == -ENOSPC) {
unifi_trace(priv,UDBG1,"frame_and_send_queued_pdu failed with ENOSPC for host tag = %x\n", buffered_pkt->hostTag); unifi_trace(priv, UDBG1, "frame_and_send_queued_pdu failed with ENOSPC for host tag = %x\n", buffered_pkt->hostTag);
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &interfacePriv->genericMulticastOrBroadCastMgtFrames); list_add(&buffered_pkt->q, &interfacePriv->genericMulticastOrBroadCastMgtFrames);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
break; break;
} else { } else {
unifi_trace(priv,UDBG1,"send_multicast_frames: Send genericMulticastOrBroadCastMgtFrames (%x, %x)\n", unifi_trace(priv, UDBG1, "send_multicast_frames: Send genericMulticastOrBroadCastMgtFrames (%x, %x)\n",
buffered_pkt->hostTag, buffered_pkt->hostTag,
r); r);
if(r) { if(r) {
...@@ -2051,35 +2051,35 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag) ...@@ -2051,35 +2051,35 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag)
hostTag = buffered_pkt->hostTag; hostTag = buffered_pkt->hostTag;
pduSent++; pduSent++;
} else { } else {
send_vif_availibility_rsp(priv,uf_get_vif_identifier(interfacePriv->interfaceMode,interfaceTag),CSR_RC_UNSPECIFIED_FAILURE); send_vif_availibility_rsp(priv, uf_get_vif_identifier(interfacePriv->interfaceMode, interfaceTag), CSR_RC_UNSPECIFIED_FAILURE);
} }
} }
/* Buffered frame sent successfully */ /* Buffered frame sent successfully */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
interfacePriv->noOfbroadcastPktQueued--; interfacePriv->noOfbroadcastPktQueued--;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
kfree(buffered_pkt); kfree(buffered_pkt);
} }
} }
} }
if(!isRouterBufferEnabled(priv,UNIFI_TRAFFIC_Q_CONTENTION)) { if(!isRouterBufferEnabled(priv, UNIFI_TRAFFIC_Q_CONTENTION)) {
while((interfacePriv->dtimActive)&& (buffered_pkt=dequeue_tx_data_pdu(priv,&interfacePriv->genericMulticastOrBroadCastFrames))) { while((interfacePriv->dtimActive)&& (buffered_pkt=dequeue_tx_data_pdu(priv, &interfacePriv->genericMulticastOrBroadCastFrames))) {
buffered_pkt->transmissionControl |= TRANSMISSION_CONTROL_TRIGGER_MASK; buffered_pkt->transmissionControl |= TRANSMISSION_CONTROL_TRIGGER_MASK;
moreData = (buffered_pkt->transmissionControl & TRANSMISSION_CONTROL_EOSP_MASK)?FALSE:TRUE; moreData = (buffered_pkt->transmissionControl & TRANSMISSION_CONTROL_EOSP_MASK)?FALSE:TRUE;
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,NULL,moreData,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, NULL, moreData, FALSE)) == -ENOSPC) {
/* Clear the trigger bit transmission control*/ /* Clear the trigger bit transmission control*/
buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK); buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK);
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &interfacePriv->genericMulticastOrBroadCastFrames); list_add(&buffered_pkt->q, &interfacePriv->genericMulticastOrBroadCastFrames);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
break; break;
} else { } else {
if(r) { if(r) {
unifi_trace(priv,UDBG1,"send_multicast_frames: Send genericMulticastOrBroadCastFrame failed (%x, %x)\n", unifi_trace(priv, UDBG1, "send_multicast_frames: Send genericMulticastOrBroadCastFrame failed (%x, %x)\n",
buffered_pkt->hostTag, buffered_pkt->hostTag,
r); r);
unifi_net_data_free(priv, &buffered_pkt->bulkdata); unifi_net_data_free(priv, &buffered_pkt->bulkdata);
...@@ -2090,26 +2090,26 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag) ...@@ -2090,26 +2090,26 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag)
pduSent ++; pduSent ++;
hostTag = buffered_pkt->hostTag; hostTag = buffered_pkt->hostTag;
} else { } else {
send_vif_availibility_rsp(priv,uf_get_vif_identifier(interfacePriv->interfaceMode,interfaceTag),CSR_RC_UNSPECIFIED_FAILURE); send_vif_availibility_rsp(priv, uf_get_vif_identifier(interfacePriv->interfaceMode, interfaceTag), CSR_RC_UNSPECIFIED_FAILURE);
} }
} }
/* Buffered frame sent successfully */ /* Buffered frame sent successfully */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
interfacePriv->noOfbroadcastPktQueued--; interfacePriv->noOfbroadcastPktQueued--;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
kfree(buffered_pkt); kfree(buffered_pkt);
} }
} }
} }
if((interfacePriv->dtimActive == FALSE)) { if((interfacePriv->dtimActive == FALSE)) {
/* Record the host Tag*/ /* Record the host Tag*/
unifi_trace(priv,UDBG2,"send_multicast_frames: Recorded hostTag of EOSP packet: = 0x%x\n",hostTag); unifi_trace(priv, UDBG2, "send_multicast_frames: Recorded hostTag of EOSP packet: = 0x%x\n", hostTag);
interfacePriv->multicastPduHostTag = hostTag; interfacePriv->multicastPduHostTag = hostTag;
} }
return pduSent; return pduSent;
} }
#endif #endif
void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata, void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv, u8 *sigdata,
u32 siglen) u32 siglen)
{ {
#ifdef CSR_SUPPORT_SME #ifdef CSR_SUPPORT_SME
...@@ -2148,15 +2148,15 @@ void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata, ...@@ -2148,15 +2148,15 @@ void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata,
/* This condition can occur because of a potential race where the /* This condition can occur because of a potential race where the
TIM is not yet reset as host is waiting for confirm but it is sent TIM is not yet reset as host is waiting for confirm but it is sent
by firmware and DTIM occurs*/ by firmware and DTIM occurs*/
unifi_notice(priv,"ma_vif_availibility_ind recevied for multicast but queues are empty%d\n",interfaceTag); unifi_notice(priv, "ma_vif_availibility_ind recevied for multicast but queues are empty%d\n", interfaceTag);
send_vif_availibility_rsp(priv,ind->VirtualInterfaceIdentifier,CSR_RC_NO_BUFFERED_BROADCAST_MULTICAST_FRAMES); send_vif_availibility_rsp(priv, ind->VirtualInterfaceIdentifier, CSR_RC_NO_BUFFERED_BROADCAST_MULTICAST_FRAMES);
interfacePriv->dtimActive = FALSE; interfacePriv->dtimActive = FALSE;
if(interfacePriv->multicastPduHostTag == 0xffffffff) { if(interfacePriv->multicastPduHostTag == 0xffffffff) {
unifi_notice(priv,"ma_vif_availibility_ind recevied for multicast but queues are empty%d\n",interfaceTag); unifi_notice(priv, "ma_vif_availibility_ind recevied for multicast but queues are empty%d\n", interfaceTag);
/* This may be an extra request in very rare race conditions but it is fine as it would atleast remove the potential lock up */ /* This may be an extra request in very rare race conditions but it is fine as it would atleast remove the potential lock up */
if (!interfacePriv->bcTimSetReqPendingFlag) if (!interfacePriv->bcTimSetReqPendingFlag)
{ {
update_tim(priv,0,CSR_WIFI_TIM_RESET,interfaceTag, 0xFFFFFFFF); update_tim(priv, 0, CSR_WIFI_TIM_RESET, interfaceTag, 0xFFFFFFFF);
} }
else else
{ {
...@@ -2171,23 +2171,23 @@ void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata, ...@@ -2171,23 +2171,23 @@ void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata,
return; return;
} }
if(interfacePriv->dtimActive) { if(interfacePriv->dtimActive) {
unifi_trace(priv,UDBG2,"DTIM Occurred for already active DTIM interface %d\n",interfaceTag); unifi_trace(priv, UDBG2, "DTIM Occurred for already active DTIM interface %d\n", interfaceTag);
return; return;
} else { } else {
unifi_trace(priv,UDBG2,"DTIM Occurred for interface %d\n",interfaceTag); unifi_trace(priv, UDBG2, "DTIM Occurred for interface %d\n", interfaceTag);
if(list_empty(&interfacePriv->genericMulticastOrBroadCastFrames)) { if(list_empty(&interfacePriv->genericMulticastOrBroadCastFrames)) {
set_eosp_transmit_ctrl(priv,&interfacePriv->genericMulticastOrBroadCastMgtFrames); set_eosp_transmit_ctrl(priv, &interfacePriv->genericMulticastOrBroadCastMgtFrames);
} else { } else {
set_eosp_transmit_ctrl(priv,&interfacePriv->genericMulticastOrBroadCastFrames); set_eosp_transmit_ctrl(priv, &interfacePriv->genericMulticastOrBroadCastFrames);
} }
} }
interfacePriv->dtimActive = TRUE; interfacePriv->dtimActive = TRUE;
pduSent = send_multicast_frames(priv,interfaceTag); pduSent = send_multicast_frames(priv, interfaceTag);
} }
else { else {
unifi_error(priv,"Interface switching is not supported %d\n",interfaceTag); unifi_error(priv, "Interface switching is not supported %d\n", interfaceTag);
resultCode = CSR_RC_NOT_SUPPORTED; resultCode = CSR_RC_NOT_SUPPORTED;
send_vif_availibility_rsp(priv,ind->VirtualInterfaceIdentifier,CSR_RC_NOT_SUPPORTED); send_vif_availibility_rsp(priv, ind->VirtualInterfaceIdentifier, CSR_RC_NOT_SUPPORTED);
} }
#endif #endif
} }
...@@ -2204,12 +2204,12 @@ static u8 uf_is_more_data_for_delivery_ac(unifi_priv_t *priv, CsrWifiRouterCtrlS ...@@ -2204,12 +2204,12 @@ static u8 uf_is_more_data_for_delivery_ac(unifi_priv_t *priv, CsrWifiRouterCtrlS
if(((staRecord->powersaveMode[i]==CSR_WIFI_AC_DELIVERY_ONLY_ENABLE) if(((staRecord->powersaveMode[i]==CSR_WIFI_AC_DELIVERY_ONLY_ENABLE)
||(staRecord->powersaveMode[i]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED)) ||(staRecord->powersaveMode[i]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED))
&&(!list_empty(&staRecord->dataPdu[i]))) { &&(!list_empty(&staRecord->dataPdu[i]))) {
unifi_trace(priv,UDBG2,"uf_is_more_data_for_delivery_ac: Data Available AC = %d\n", i); unifi_trace(priv, UDBG2, "uf_is_more_data_for_delivery_ac: Data Available AC = %d\n", i);
return TRUE; return TRUE;
} }
} }
unifi_trace(priv,UDBG2,"uf_is_more_data_for_delivery_ac: Data NOT Available \n"); unifi_trace(priv, UDBG2, "uf_is_more_data_for_delivery_ac: Data NOT Available \n");
return FALSE; return FALSE;
} }
...@@ -2222,12 +2222,12 @@ static u8 uf_is_more_data_for_usp_delivery(unifi_priv_t *priv, CsrWifiRouterCtrl ...@@ -2222,12 +2222,12 @@ static u8 uf_is_more_data_for_usp_delivery(unifi_priv_t *priv, CsrWifiRouterCtrl
if(((staRecord->powersaveMode[i]==CSR_WIFI_AC_DELIVERY_ONLY_ENABLE) if(((staRecord->powersaveMode[i]==CSR_WIFI_AC_DELIVERY_ONLY_ENABLE)
||(staRecord->powersaveMode[i]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED)) ||(staRecord->powersaveMode[i]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED))
&&(!list_empty(&staRecord->dataPdu[i]))) { &&(!list_empty(&staRecord->dataPdu[i]))) {
unifi_trace(priv,UDBG2,"uf_is_more_data_for_usp_delivery: Data Available AC = %d\n", i); unifi_trace(priv, UDBG2, "uf_is_more_data_for_usp_delivery: Data Available AC = %d\n", i);
return TRUE; return TRUE;
} }
} }
unifi_trace(priv,UDBG2,"uf_is_more_data_for_usp_delivery: Data NOT Available \n"); unifi_trace(priv, UDBG2, "uf_is_more_data_for_usp_delivery: Data NOT Available \n");
return FALSE; return FALSE;
} }
...@@ -2272,18 +2272,18 @@ void uf_send_buffered_data_from_delivery_ac(unifi_priv_t *priv, ...@@ -2272,18 +2272,18 @@ void uf_send_buffered_data_from_delivery_ac(unifi_priv_t *priv,
return; return;
} }
while((buffered_pkt=dequeue_tx_data_pdu(priv, txList))) { while((buffered_pkt=dequeue_tx_data_pdu(priv, txList))) {
if((IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag))) { if((IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag))) {
unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_delivery_ac: DTIM Active, suspend UAPSD, staId: 0x%x\n", unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_delivery_ac: DTIM Active, suspend UAPSD, staId: 0x%x\n",
staInfo->aid); staInfo->aid);
/* Once resume called, the U-APSD delivery operation will resume */ /* Once resume called, the U-APSD delivery operation will resume */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
staInfo->uspSuspend = TRUE; staInfo->uspSuspend = TRUE;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
/* re-queueing the packet as DTIM started */ /* re-queueing the packet as DTIM started */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q,txList); list_add(&buffered_pkt->q, txList);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
break; break;
} }
...@@ -2315,20 +2315,20 @@ void uf_send_buffered_data_from_delivery_ac(unifi_priv_t *priv, ...@@ -2315,20 +2315,20 @@ void uf_send_buffered_data_from_delivery_ac(unifi_priv_t *priv,
unifi_warning(priv, "uf_send_buffered_data_from_delivery_ac: non U-APSD !!! \n"); unifi_warning(priv, "uf_send_buffered_data_from_delivery_ac: non U-APSD !!! \n");
} }
unifi_trace(priv,UDBG2,"uf_send_buffered_data_from_delivery_ac : MoreData:%d, EOSP:%d\n",moreData,eosp); unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_delivery_ac : MoreData:%d, EOSP:%d\n", moreData, eosp);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staInfo,moreData,eosp)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staInfo, moreData, eosp)) == -ENOSPC) {
unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_delivery_ac: UASPD suspended, ENOSPC in hipQ=%x\n", queue); unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_delivery_ac: UASPD suspended, ENOSPC in hipQ=%x\n", queue);
/* Once resume called, the U-APSD delivery operation will resume */ /* Once resume called, the U-APSD delivery operation will resume */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
staInfo->uspSuspend = TRUE; staInfo->uspSuspend = TRUE;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q,txList); list_add(&buffered_pkt->q, txList);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[queue]=(u8)(staInfo->assignedHandle); priv->pausedStaHandle[queue]=(u8)(staInfo->assignedHandle);
break; break;
} else { } else {
...@@ -2337,17 +2337,17 @@ void uf_send_buffered_data_from_delivery_ac(unifi_priv_t *priv, ...@@ -2337,17 +2337,17 @@ void uf_send_buffered_data_from_delivery_ac(unifi_priv_t *priv,
unifi_net_data_free(priv, &buffered_pkt->bulkdata); unifi_net_data_free(priv, &buffered_pkt->bulkdata);
} }
kfree(buffered_pkt); kfree(buffered_pkt);
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
staInfo->noOfSpFramesSent++; staInfo->noOfSpFramesSent++;
if((!moreData) || (staInfo->noOfSpFramesSent == staInfo->maxSpLength)) { if((!moreData) || (staInfo->noOfSpFramesSent == staInfo->maxSpLength)) {
unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_delivery_ac: Terminating USP\n"); unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_delivery_ac: Terminating USP\n");
staInfo->uapsdActive = FALSE; staInfo->uapsdActive = FALSE;
staInfo->uspSuspend = FALSE; staInfo->uspSuspend = FALSE;
staInfo->noOfSpFramesSent = 0; staInfo->noOfSpFramesSent = 0;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
break; break;
} }
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} }
} }
unifi_trace(priv, UDBG2, "--uf_send_buffered_data_from_delivery_ac, active=%x\n", staInfo->uapsdActive); unifi_trace(priv, UDBG2, "--uf_send_buffered_data_from_delivery_ac, active=%x\n", staInfo->uapsdActive);
...@@ -2364,25 +2364,25 @@ void uf_send_buffered_data_from_ac(unifi_priv_t *priv, ...@@ -2364,25 +2364,25 @@ void uf_send_buffered_data_from_ac(unifi_priv_t *priv,
u8 moreData = FALSE; u8 moreData = FALSE;
s8 r =0; s8 r =0;
unifi_trace(priv,UDBG2,"uf_send_buffered_data_from_ac :\n"); unifi_trace(priv, UDBG2, "uf_send_buffered_data_from_ac :\n");
while(!isRouterBufferEnabled(priv,queue) && while(!isRouterBufferEnabled(priv, queue) &&
((buffered_pkt=dequeue_tx_data_pdu(priv, txList))!=NULL)){ ((buffered_pkt=dequeue_tx_data_pdu(priv, txList))!=NULL)){
buffered_pkt->transmissionControl &= buffered_pkt->transmissionControl &=
~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK); ~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK);
unifi_trace(priv,UDBG3,"uf_send_buffered_data_from_ac : MoreData:%d, EOSP:%d\n",moreData,eosp); unifi_trace(priv, UDBG3, "uf_send_buffered_data_from_ac : MoreData:%d, EOSP:%d\n", moreData, eosp);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staInfo,moreData,eosp)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staInfo, moreData, eosp)) == -ENOSPC) {
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q,txList); list_add(&buffered_pkt->q, txList);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
if(staInfo != NULL){ if(staInfo != NULL){
priv->pausedStaHandle[queue]=(u8)(staInfo->assignedHandle); priv->pausedStaHandle[queue]=(u8)(staInfo->assignedHandle);
} }
unifi_trace(priv,UDBG3," uf_send_buffered_data_from_ac: PDU sending failed .. no space for queue %d \n",queue); unifi_trace(priv, UDBG3, " uf_send_buffered_data_from_ac: PDU sending failed .. no space for queue %d \n", queue);
} else { } else {
if(r){ if(r){
/* the PDU failed where we can't do any thing so free the storage */ /* the PDU failed where we can't do any thing so free the storage */
...@@ -2394,10 +2394,10 @@ void uf_send_buffered_data_from_ac(unifi_priv_t *priv, ...@@ -2394,10 +2394,10 @@ void uf_send_buffered_data_from_ac(unifi_priv_t *priv,
} }
void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q) void uf_send_buffered_frames(unifi_priv_t *priv, unifi_TrafficQueue q)
{ {
u16 interfaceTag = GET_ACTIVE_INTERFACE_TAG(priv); u16 interfaceTag = GET_ACTIVE_INTERFACE_TAG(priv);
u32 startIndex=0,endIndex=0; u32 startIndex=0, endIndex=0;
CsrWifiRouterCtrlStaInfo_t * staInfo = NULL; CsrWifiRouterCtrlStaInfo_t * staInfo = NULL;
u8 queue; u8 queue;
u8 moreData = FALSE; u8 moreData = FALSE;
...@@ -2412,14 +2412,14 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q) ...@@ -2412,14 +2412,14 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
if(interfacePriv->dtimActive) { if(interfacePriv->dtimActive) {
/* this function updates dtimActive*/ /* this function updates dtimActive*/
send_multicast_frames(priv,interfaceTag); send_multicast_frames(priv, interfaceTag);
if(!interfacePriv->dtimActive) { if(!interfacePriv->dtimActive) {
moreData = (!list_empty(&interfacePriv->genericMulticastOrBroadCastMgtFrames) || moreData = (!list_empty(&interfacePriv->genericMulticastOrBroadCastMgtFrames) ||
!list_empty(&interfacePriv->genericMulticastOrBroadCastFrames)); !list_empty(&interfacePriv->genericMulticastOrBroadCastFrames));
if(!moreData) { if(!moreData) {
if (!interfacePriv->bcTimSetReqPendingFlag) if (!interfacePriv->bcTimSetReqPendingFlag)
{ {
update_tim(priv,0,CSR_WIFI_TIM_RESET,interfaceTag, 0XFFFFFFFF); update_tim(priv, 0, CSR_WIFI_TIM_RESET, interfaceTag, 0XFFFFFFFF);
} }
else else
{ {
...@@ -2436,8 +2436,8 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q) ...@@ -2436,8 +2436,8 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
!list_empty(&interfacePriv->genericMulticastOrBroadCastFrames)); !list_empty(&interfacePriv->genericMulticastOrBroadCastFrames));
if(!moreData) { if(!moreData) {
/* This should never happen but if it happens, we need a way out */ /* This should never happen but if it happens, we need a way out */
unifi_error(priv,"ERROR: No More Data but DTIM is active sending Response\n"); unifi_error(priv, "ERROR: No More Data but DTIM is active sending Response\n");
send_vif_availibility_rsp(priv,uf_get_vif_identifier(interfacePriv->interfaceMode,interfaceTag),CSR_RC_NO_BUFFERED_BROADCAST_MULTICAST_FRAMES); send_vif_availibility_rsp(priv, uf_get_vif_identifier(interfacePriv->interfaceMode, interfaceTag), CSR_RC_NO_BUFFERED_BROADCAST_MULTICAST_FRAMES);
interfacePriv->dtimActive = FALSE; interfacePriv->dtimActive = FALSE;
} }
} }
...@@ -2450,9 +2450,9 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q) ...@@ -2450,9 +2450,9 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
if(queue == UNIFI_TRAFFIC_Q_VO) { if(queue == UNIFI_TRAFFIC_Q_VO) {
unifi_trace(priv,UDBG2,"uf_send_buffered_frames : trying mgt from queue=%d\n",queue); unifi_trace(priv, UDBG2, "uf_send_buffered_frames : trying mgt from queue=%d\n", queue);
for(startIndex= 0; startIndex < UNIFI_MAX_CONNECTIONS;startIndex++) { for(startIndex= 0; startIndex < UNIFI_MAX_CONNECTIONS;startIndex++) {
staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv,startIndex,interfaceTag); staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv, startIndex, interfaceTag);
if(!staInfo ) { if(!staInfo ) {
continue; continue;
} else if((staInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_POWER_SAVE) } else if((staInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_POWER_SAVE)
...@@ -2464,31 +2464,31 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q) ...@@ -2464,31 +2464,31 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
&&(staInfo->uapsdActive == FALSE)){ &&(staInfo->uapsdActive == FALSE)){
/*Non-UAPSD case push the management frames out*/ /*Non-UAPSD case push the management frames out*/
if(!list_empty(&staInfo->mgtFrames)){ if(!list_empty(&staInfo->mgtFrames)){
uf_send_buffered_data_from_ac(priv,staInfo, UNIFI_TRAFFIC_Q_VO, &staInfo->mgtFrames); uf_send_buffered_data_from_ac(priv, staInfo, UNIFI_TRAFFIC_Q_VO, &staInfo->mgtFrames);
} }
} }
if(isRouterBufferEnabled(priv,queue)) { if(isRouterBufferEnabled(priv, queue)) {
unifi_notice(priv,"uf_send_buffered_frames : No space Left for queue = %d\n",queue); unifi_notice(priv, "uf_send_buffered_frames : No space Left for queue = %d\n", queue);
break; break;
} }
} }
/*push generic management frames out*/ /*push generic management frames out*/
if(!list_empty(&interfacePriv->genericMgtFrames)) { if(!list_empty(&interfacePriv->genericMgtFrames)) {
unifi_trace(priv,UDBG2,"uf_send_buffered_frames : trying generic mgt from queue=%d\n",queue); unifi_trace(priv, UDBG2, "uf_send_buffered_frames : trying generic mgt from queue=%d\n", queue);
uf_send_buffered_data_from_ac(priv,staInfo, UNIFI_TRAFFIC_Q_VO, &interfacePriv->genericMgtFrames); uf_send_buffered_data_from_ac(priv, staInfo, UNIFI_TRAFFIC_Q_VO, &interfacePriv->genericMgtFrames);
} }
} }
unifi_trace(priv,UDBG2,"uf_send_buffered_frames : Resume called for Queue=%d\n",queue); unifi_trace(priv, UDBG2, "uf_send_buffered_frames : Resume called for Queue=%d\n", queue);
unifi_trace(priv,UDBG2,"uf_send_buffered_frames : start=%d end=%d\n",startIndex,endIndex); unifi_trace(priv, UDBG2, "uf_send_buffered_frames : start=%d end=%d\n", startIndex, endIndex);
startIndex = priv->pausedStaHandle[queue]; startIndex = priv->pausedStaHandle[queue];
endIndex = (startIndex + UNIFI_MAX_CONNECTIONS -1) % UNIFI_MAX_CONNECTIONS; endIndex = (startIndex + UNIFI_MAX_CONNECTIONS -1) % UNIFI_MAX_CONNECTIONS;
while(startIndex != endIndex) { while(startIndex != endIndex) {
staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv,startIndex,interfaceTag); staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv, startIndex, interfaceTag);
if(!staInfo) { if(!staInfo) {
startIndex ++; startIndex ++;
if(startIndex >= UNIFI_MAX_CONNECTIONS) { if(startIndex >= UNIFI_MAX_CONNECTIONS) {
...@@ -2504,7 +2504,7 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q) ...@@ -2504,7 +2504,7 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
continue; continue;
} }
/* Peer is active or U-APSD is active so send PDUs to the peer */ /* Peer is active or U-APSD is active so send PDUs to the peer */
unifi_trace(priv,UDBG2,"uf_send_buffered_frames : trying data from queue=%d\n",queue); unifi_trace(priv, UDBG2, "uf_send_buffered_frames : trying data from queue=%d\n", queue);
if((staInfo != NULL)&&(staInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE) if((staInfo != NULL)&&(staInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE)
...@@ -2520,7 +2520,7 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q) ...@@ -2520,7 +2520,7 @@ void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
startIndex = 0; startIndex = 0;
} }
} }
if(isRouterBufferEnabled(priv,queue)) { if(isRouterBufferEnabled(priv, queue)) {
priv->pausedStaHandle[queue] = endIndex; priv->pausedStaHandle[queue] = endIndex;
} else { } else {
priv->pausedStaHandle[queue] = 0; priv->pausedStaHandle[queue] = 0;
...@@ -2561,7 +2561,7 @@ u8 uf_is_more_data_for_non_delivery_ac(CsrWifiRouterCtrlStaInfo_t *staRecord) ...@@ -2561,7 +2561,7 @@ u8 uf_is_more_data_for_non_delivery_ac(CsrWifiRouterCtrlStaInfo_t *staRecord)
} }
int uf_process_station_records_for_sending_data(unifi_priv_t *priv,u16 interfaceTag, int uf_process_station_records_for_sending_data(unifi_priv_t *priv, u16 interfaceTag,
CsrWifiRouterCtrlStaInfo_t *srcStaInfo, CsrWifiRouterCtrlStaInfo_t *srcStaInfo,
CsrWifiRouterCtrlStaInfo_t *dstStaInfo) CsrWifiRouterCtrlStaInfo_t *dstStaInfo)
{ {
...@@ -2647,10 +2647,10 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS ...@@ -2647,10 +2647,10 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS
return; return;
} }
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
staInfo->uapsdActive = TRUE; staInfo->uapsdActive = TRUE;
staInfo->uspSuspend = FALSE; staInfo->uspSuspend = FALSE;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
if(((staInfo->powersaveMode[UNIFI_TRAFFIC_Q_VO]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED)|| if(((staInfo->powersaveMode[UNIFI_TRAFFIC_Q_VO]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED)||
(staInfo->powersaveMode[UNIFI_TRAFFIC_Q_VO]==CSR_WIFI_AC_DELIVERY_ONLY_ENABLE)) (staInfo->powersaveMode[UNIFI_TRAFFIC_Q_VO]==CSR_WIFI_AC_DELIVERY_ONLY_ENABLE))
...@@ -2666,9 +2666,9 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS ...@@ -2666,9 +2666,9 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS
* NOTE: If we have sent Mgt frame also, we must send QNULL followed to terminate USP * NOTE: If we have sent Mgt frame also, we must send QNULL followed to terminate USP
*/ */
if (!staInfo->uspSuspend) { if (!staInfo->uspSuspend) {
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
staInfo->uapsdActive = FALSE; staInfo->uapsdActive = FALSE;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
unifi_trace(priv, UDBG2, "uf_handle_uspframes_delivery: sending QNull for trigger\n"); unifi_trace(priv, UDBG2, "uf_handle_uspframes_delivery: sending QNull for trigger\n");
uf_send_qos_null(priv, interfaceTag, staInfo->peerMacAddress.a, (CSR_PRIORITY) staInfo->triggerFramePriority, staInfo); uf_send_qos_null(priv, interfaceTag, staInfo->peerMacAddress.a, (CSR_PRIORITY) staInfo->triggerFramePriority, staInfo);
...@@ -2687,12 +2687,12 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS ...@@ -2687,12 +2687,12 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS
} }
if ((!staInfo->uapsdActive) || if ((!staInfo->uapsdActive) ||
(staInfo->uspSuspend && IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag))) { (staInfo->uspSuspend && IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag))) {
/* If DTIM active found on one AC, No need to parse the remaining AC's /* If DTIM active found on one AC, No need to parse the remaining AC's
* as USP suspended. Break out of loop * as USP suspended. Break out of loop
*/ */
unifi_trace(priv, UDBG2, "uf_handle_uspframes_delivery: suspend=%x, DTIM=%x, USP terminated=%s\n", unifi_trace(priv, UDBG2, "uf_handle_uspframes_delivery: suspend=%x, DTIM=%x, USP terminated=%s\n",
staInfo->uspSuspend, IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag), staInfo->uspSuspend, IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag),
staInfo->uapsdActive?"NO":"YES"); staInfo->uapsdActive?"NO":"YES");
break; break;
} }
...@@ -2734,9 +2734,9 @@ void uf_process_wmm_deliver_ac_uapsd(unifi_priv_t * priv, ...@@ -2734,9 +2734,9 @@ void uf_process_wmm_deliver_ac_uapsd(unifi_priv_t * priv,
if((srcStaInfo->powersaveMode[priority_q]==CSR_WIFI_AC_TRIGGER_ONLY_ENABLED) if((srcStaInfo->powersaveMode[priority_q]==CSR_WIFI_AC_TRIGGER_ONLY_ENABLED)
||(srcStaInfo->powersaveMode[priority_q]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED)) { ||(srcStaInfo->powersaveMode[priority_q]==CSR_WIFI_AC_TRIGGER_AND_DELIVERY_ENABLED)) {
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
srcStaInfo->triggerFramePriority = priority; srcStaInfo->triggerFramePriority = priority;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
unifi_trace(priv, UDBG2, "uf_process_wmm_deliver_ac_uapsd: trigger frame, Begin U-APSD, triggerQ=%x\n", priority_q); unifi_trace(priv, UDBG2, "uf_process_wmm_deliver_ac_uapsd: trigger frame, Begin U-APSD, triggerQ=%x\n", priority_q);
uf_handle_uspframes_delivery(priv, srcStaInfo, interfaceTag); uf_handle_uspframes_delivery(priv, srcStaInfo, interfaceTag);
} }
...@@ -2744,7 +2744,7 @@ void uf_process_wmm_deliver_ac_uapsd(unifi_priv_t * priv, ...@@ -2744,7 +2744,7 @@ void uf_process_wmm_deliver_ac_uapsd(unifi_priv_t * priv,
} }
void uf_send_qos_null(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRIORITY priority,CsrWifiRouterCtrlStaInfo_t * srcStaInfo) void uf_send_qos_null(unifi_priv_t * priv, u16 interfaceTag, const u8 *da, CSR_PRIORITY priority, CsrWifiRouterCtrlStaInfo_t * srcStaInfo)
{ {
bulk_data_param_t bulkdata; bulk_data_param_t bulkdata;
CsrResult csrResult; CsrResult csrResult;
...@@ -2806,14 +2806,14 @@ void uf_send_qos_null(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRI ...@@ -2806,14 +2806,14 @@ void uf_send_qos_null(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRI
r = ul_send_signal_unpacked(priv, &signal, &bulkdata); r = ul_send_signal_unpacked(priv, &signal, &bulkdata);
if(r) { if(r) {
unifi_error(priv, "failed to send QOS data null packet result: %d\n",r); unifi_error(priv, "failed to send QOS data null packet result: %d\n", r);
unifi_net_data_free(priv, &bulkdata.d[0]); unifi_net_data_free(priv, &bulkdata.d[0]);
} }
return; return;
} }
void uf_send_nulldata(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRIORITY priority,CsrWifiRouterCtrlStaInfo_t * srcStaInfo) void uf_send_nulldata(unifi_priv_t * priv, u16 interfaceTag, const u8 *da, CSR_PRIORITY priority, CsrWifiRouterCtrlStaInfo_t * srcStaInfo)
{ {
bulk_data_param_t bulkdata; bulk_data_param_t bulkdata;
CsrResult csrResult; CsrResult csrResult;
...@@ -2882,14 +2882,14 @@ void uf_send_nulldata(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRI ...@@ -2882,14 +2882,14 @@ void uf_send_nulldata(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRI
if(r == -ENOSPC) { if(r == -ENOSPC) {
unifi_trace(priv, UDBG1, "uf_send_nulldata: ENOSPC Requeue the Null frame\n"); unifi_trace(priv, UDBG1, "uf_send_nulldata: ENOSPC Requeue the Null frame\n");
enque_tx_data_pdu(priv, &bulkdata, &srcStaInfo->dataPdu[priority_q], &signal, 1); enque_tx_data_pdu(priv, &bulkdata, &srcStaInfo->dataPdu[priority_q], &signal, 1);
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
srcStaInfo->noOfPktQueued++; srcStaInfo->noOfPktQueued++;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} }
if(r && r != -ENOSPC){ if(r && r != -ENOSPC){
unifi_error(priv, "uf_send_nulldata: Failed to send Null frame Error = %d\n",r); unifi_error(priv, "uf_send_nulldata: Failed to send Null frame Error = %d\n", r);
unifi_net_data_free(priv, &bulkdata.d[0]); unifi_net_data_free(priv, &bulkdata.d[0]);
srcStaInfo->nullDataHostTag = INVALID_HOST_TAG; srcStaInfo->nullDataHostTag = INVALID_HOST_TAG;
} }
...@@ -2939,7 +2939,7 @@ u8 uf_check_broadcast_bssid(unifi_priv_t *priv, const bulk_data_param_t *bulkdat ...@@ -2939,7 +2939,7 @@ u8 uf_check_broadcast_bssid(unifi_priv_t *priv, const bulk_data_param_t *bulkdat
u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t * srcStaInfo, u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t * srcStaInfo,
u8 pmBit,u16 interfaceTag) u8 pmBit, u16 interfaceTag)
{ {
u8 moreData = FALSE; u8 moreData = FALSE;
u8 powerSaveChanged = FALSE; u8 powerSaveChanged = FALSE;
...@@ -2955,22 +2955,22 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t * ...@@ -2955,22 +2955,22 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t *
if(srcStaInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE) { if(srcStaInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE) {
/* disable the preemption */ /* disable the preemption */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
srcStaInfo->currentPeerState =CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_POWER_SAVE; srcStaInfo->currentPeerState =CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_POWER_SAVE;
powerSaveChanged = TRUE; powerSaveChanged = TRUE;
/* enable the preemption */ /* enable the preemption */
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} else { } else {
return powerSaveChanged; return powerSaveChanged;
} }
} else { } else {
if(srcStaInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_POWER_SAVE) { if(srcStaInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_POWER_SAVE) {
/* disable the preemption */ /* disable the preemption */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
srcStaInfo->currentPeerState = CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE; srcStaInfo->currentPeerState = CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE;
powerSaveChanged = TRUE; powerSaveChanged = TRUE;
/* enable the preemption */ /* enable the preemption */
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
}else { }else {
return powerSaveChanged; return powerSaveChanged;
} }
...@@ -2978,10 +2978,10 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t * ...@@ -2978,10 +2978,10 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t *
if(srcStaInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE) { if(srcStaInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE) {
unifi_trace(priv,UDBG3, "Peer with AID = %d is active now\n",srcStaInfo->aid); unifi_trace(priv, UDBG3, "Peer with AID = %d is active now\n", srcStaInfo->aid);
process_peer_active_transition(priv,srcStaInfo,interfaceTag); process_peer_active_transition(priv, srcStaInfo, interfaceTag);
} else { } else {
unifi_trace(priv,UDBG3, "Peer with AID = %d is in PS Now\n",srcStaInfo->aid); unifi_trace(priv, UDBG3, "Peer with AID = %d is in PS Now\n", srcStaInfo->aid);
/* Set TIM if needed */ /* Set TIM if needed */
if(!srcStaInfo->wmmOrQosEnabled) { if(!srcStaInfo->wmmOrQosEnabled) {
moreData = (!list_empty(&srcStaInfo->mgtFrames) || moreData = (!list_empty(&srcStaInfo->mgtFrames) ||
...@@ -2990,7 +2990,7 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t * ...@@ -2990,7 +2990,7 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t *
if(moreData && (srcStaInfo->timSet == CSR_WIFI_TIM_RESET)) { if(moreData && (srcStaInfo->timSet == CSR_WIFI_TIM_RESET)) {
unifi_trace(priv, UDBG3, "This condition should not occur\n"); unifi_trace(priv, UDBG3, "This condition should not occur\n");
if (!srcStaInfo->timRequestPendingFlag){ if (!srcStaInfo->timRequestPendingFlag){
update_tim(priv,srcStaInfo->aid,1,interfaceTag, srcStaInfo->assignedHandle); update_tim(priv, srcStaInfo->aid, 1, interfaceTag, srcStaInfo->assignedHandle);
} }
else else
{ {
...@@ -3013,7 +3013,7 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t * ...@@ -3013,7 +3013,7 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t *
if(moreData && (srcStaInfo->timSet == CSR_WIFI_TIM_RESET)) { if(moreData && (srcStaInfo->timSet == CSR_WIFI_TIM_RESET)) {
if (!srcStaInfo->timRequestPendingFlag){ if (!srcStaInfo->timRequestPendingFlag){
update_tim(priv,srcStaInfo->aid,1,interfaceTag, srcStaInfo->assignedHandle); update_tim(priv, srcStaInfo->aid, 1, interfaceTag, srcStaInfo->assignedHandle);
} }
else else
{ {
...@@ -3033,7 +3033,7 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t * ...@@ -3033,7 +3033,7 @@ u8 uf_process_pm_bit_for_peer(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t *
void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceTag) void uf_process_ps_poll(unifi_priv_t *priv, u8* sa, u8* da, u8 pmBit, u16 interfaceTag)
{ {
CsrWifiRouterCtrlStaInfo_t *staRecord = CsrWifiRouterCtrlStaInfo_t *staRecord =
CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv, sa, interfaceTag); CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv, sa, interfaceTag);
...@@ -3046,27 +3046,27 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3046,27 +3046,27 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
unifi_trace(priv, UDBG3, "entering uf_process_ps_poll\n"); unifi_trace(priv, UDBG3, "entering uf_process_ps_poll\n");
if(!staRecord) { if(!staRecord) {
memcpy(peerMacAddress.a,sa,ETH_ALEN); memcpy(peerMacAddress.a, sa, ETH_ALEN);
unifi_trace(priv, UDBG3, "In uf_process_ps_poll, sta record not found:unexpected frame addr = %x:%x:%x:%x:%x:%x\n", unifi_trace(priv, UDBG3, "In uf_process_ps_poll, sta record not found:unexpected frame addr = %x:%x:%x:%x:%x:%x\n",
sa[0], sa[1],sa[2], sa[3], sa[4],sa[5]); sa[0], sa[1], sa[2], sa[3], sa[4], sa[5]);
CsrWifiRouterCtrlUnexpectedFrameIndSend(priv->CSR_WIFI_SME_IFACEQUEUE,0,interfaceTag,peerMacAddress); CsrWifiRouterCtrlUnexpectedFrameIndSend(priv->CSR_WIFI_SME_IFACEQUEUE, 0, interfaceTag, peerMacAddress);
return; return;
} }
uf_process_pm_bit_for_peer(priv,staRecord,pmBit,interfaceTag); uf_process_pm_bit_for_peer(priv, staRecord, pmBit, interfaceTag);
/* Update station last activity time */ /* Update station last activity time */
staRecord->activity_flag = TRUE; staRecord->activity_flag = TRUE;
/* This should not change the PM bit as PS-POLL has PM bit always set */ /* This should not change the PM bit as PS-POLL has PM bit always set */
if(!pmBit) { if(!pmBit) {
unifi_notice (priv," PM bit reset in PS-POLL\n"); unifi_notice (priv, " PM bit reset in PS-POLL\n");
return; return;
} }
if(IS_DTIM_ACTIVE(interfacePriv->dtimActive,interfacePriv->multicastPduHostTag)) { if(IS_DTIM_ACTIVE(interfacePriv->dtimActive, interfacePriv->multicastPduHostTag)) {
/* giving more priority to multicast packets so dropping ps-poll*/ /* giving more priority to multicast packets so dropping ps-poll*/
unifi_notice (priv," multicast transmission is going on so don't take action on PS-POLL\n"); unifi_notice (priv, " multicast transmission is going on so don't take action on PS-POLL\n");
return; return;
} }
...@@ -3078,13 +3078,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3078,13 +3078,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
!list_empty(&staRecord->mgtFrames)); !list_empty(&staRecord->mgtFrames));
buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staRecord,moreData,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staRecord, moreData, FALSE)) == -ENOSPC) {
/* Clear the trigger bit transmission control*/ /* Clear the trigger bit transmission control*/
buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staRecord->mgtFrames); list_add(&buffered_pkt->q, &staRecord->mgtFrames);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n"); unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n");
priv->pausedStaHandle[3]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[3]=(u8)(staRecord->assignedHandle);
} else { } else {
...@@ -3101,13 +3101,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3101,13 +3101,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
!list_empty(&staRecord->dataPdu[UNIFI_TRAFFIC_Q_VO])); !list_empty(&staRecord->dataPdu[UNIFI_TRAFFIC_Q_VO]));
buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staRecord,moreData,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staRecord, moreData, FALSE)) == -ENOSPC) {
/* Clear the trigger bit transmission control*/ /* Clear the trigger bit transmission control*/
buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staRecord->dataPdu[UNIFI_TRAFFIC_Q_VO]); list_add(&buffered_pkt->q, &staRecord->dataPdu[UNIFI_TRAFFIC_Q_VO]);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[3]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[3]=(u8)(staRecord->assignedHandle);
unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n"); unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n");
} else { } else {
...@@ -3123,13 +3123,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3123,13 +3123,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
moreData = !list_empty(&staRecord->dataPdu[UNIFI_TRAFFIC_Q_CONTENTION]); moreData = !list_empty(&staRecord->dataPdu[UNIFI_TRAFFIC_Q_CONTENTION]);
buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staRecord,moreData,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staRecord, moreData, FALSE)) == -ENOSPC) {
/* Clear the trigger bit transmission control*/ /* Clear the trigger bit transmission control*/
buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staRecord->dataPdu[UNIFI_TRAFFIC_Q_CONTENTION]); list_add(&buffered_pkt->q, &staRecord->dataPdu[UNIFI_TRAFFIC_Q_CONTENTION]);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle);
unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n"); unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n");
} else { } else {
...@@ -3150,7 +3150,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3150,7 +3150,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
if(!moreData && (staRecord->timSet == CSR_WIFI_TIM_SET)) { if(!moreData && (staRecord->timSet == CSR_WIFI_TIM_SET)) {
unifi_trace(priv, UDBG3, "more data = NULL, set tim to 0 in uf_process_ps_poll\n"); unifi_trace(priv, UDBG3, "more data = NULL, set tim to 0 in uf_process_ps_poll\n");
if (!staRecord->timRequestPendingFlag){ if (!staRecord->timRequestPendingFlag){
update_tim(priv,staRecord->aid,0,interfaceTag, staRecord->assignedHandle); update_tim(priv, staRecord->aid, 0, interfaceTag, staRecord->assignedHandle);
} }
else else
{ {
...@@ -3165,7 +3165,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3165,7 +3165,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
} else { } else {
u8 allDeliveryEnabled = 0, dataAvailable = 0; u8 allDeliveryEnabled = 0, dataAvailable = 0;
unifi_trace(priv, UDBG3,"Qos Support station.Processing PS-Poll\n"); unifi_trace(priv, UDBG3, "Qos Support station.Processing PS-Poll\n");
/*Send Data From Management Frames*/ /*Send Data From Management Frames*/
/* Priority orders for delivering the buffered packets are /* Priority orders for delivering the buffered packets are
...@@ -3179,7 +3179,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3179,7 +3179,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
if (allDeliveryEnabled) { if (allDeliveryEnabled) {
unifi_trace(priv, UDBG3, "uf_process_ps_poll: All ACs are delivery enable so Sending QOS Null in response of Ps-poll\n"); unifi_trace(priv, UDBG3, "uf_process_ps_poll: All ACs are delivery enable so Sending QOS Null in response of Ps-poll\n");
uf_send_qos_null(priv,interfaceTag,sa,CSR_QOS_UP0,staRecord); uf_send_qos_null(priv, interfaceTag, sa, CSR_QOS_UP0, staRecord);
return; return;
} }
...@@ -3192,13 +3192,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3192,13 +3192,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
/* Last parameter is EOSP & its false always for PS-POLL processing */ /* Last parameter is EOSP & its false always for PS-POLL processing */
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staRecord,moreData,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staRecord, moreData, FALSE)) == -ENOSPC) {
/* Clear the trigger bit transmission control*/ /* Clear the trigger bit transmission control*/
buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staRecord->mgtFrames); list_add(&buffered_pkt->q, &staRecord->mgtFrames);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle);
unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n"); unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n");
} else { } else {
...@@ -3227,13 +3227,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3227,13 +3227,13 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl |= (TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
/* Last parameter is EOSP & its false always for PS-POLL processing */ /* Last parameter is EOSP & its false always for PS-POLL processing */
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staRecord,moreData,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staRecord, moreData, FALSE)) == -ENOSPC) {
/* Clear the trigger bit transmission control*/ /* Clear the trigger bit transmission control*/
buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK); buffered_pkt->transmissionControl &= ~(TRANSMISSION_CONTROL_TRIGGER_MASK | TRANSMISSION_CONTROL_EOSP_MASK);
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staRecord->dataPdu[i]); list_add(&buffered_pkt->q, &staRecord->dataPdu[i]);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle); priv->pausedStaHandle[0]=(u8)(staRecord->assignedHandle);
unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n"); unifi_trace(priv, UDBG1, "(ENOSPC) PS-POLL received : PDU sending failed \n");
} else { } else {
...@@ -3256,7 +3256,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT ...@@ -3256,7 +3256,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,u16 interfaceT
if(!moreData && (staRecord->timSet == CSR_WIFI_TIM_SET)) { if(!moreData && (staRecord->timSet == CSR_WIFI_TIM_SET)) {
unifi_trace(priv, UDBG3, "more data = NULL, set tim to 0 in uf_process_ps_poll\n"); unifi_trace(priv, UDBG3, "more data = NULL, set tim to 0 in uf_process_ps_poll\n");
if (!staRecord->timRequestPendingFlag){ if (!staRecord->timRequestPendingFlag){
update_tim(priv,staRecord->aid,0,interfaceTag, staRecord->assignedHandle); update_tim(priv, staRecord->aid, 0, interfaceTag, staRecord->assignedHandle);
} }
else else
{ {
...@@ -3311,7 +3311,7 @@ void uf_prepare_send_cfm_list_for_queued_pkts(unifi_priv_t * priv, ...@@ -3311,7 +3311,7 @@ void uf_prepare_send_cfm_list_for_queued_pkts(unifi_priv_t * priv,
struct list_head *placeHolder; struct list_head *placeHolder;
unsigned long lock_flags; unsigned long lock_flags;
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
/* Search through the list and if confirmation required for any frames, /* Search through the list and if confirmation required for any frames,
add it to the send_cfm list */ add it to the send_cfm list */
...@@ -3337,7 +3337,7 @@ void uf_prepare_send_cfm_list_for_queued_pkts(unifi_priv_t * priv, ...@@ -3337,7 +3337,7 @@ void uf_prepare_send_cfm_list_for_queued_pkts(unifi_priv_t * priv,
} }
} }
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
} }
...@@ -3352,7 +3352,7 @@ void uf_flush_list(unifi_priv_t * priv, struct list_head * list) ...@@ -3352,7 +3352,7 @@ void uf_flush_list(unifi_priv_t * priv, struct list_head * list)
unifi_trace(priv, UDBG5, "entering the uf_flush_list \n"); unifi_trace(priv, UDBG5, "entering the uf_flush_list \n");
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
/* go through list, delete & free memory */ /* go through list, delete & free memory */
list_for_each_safe(listHead, placeHolder, list) { list_for_each_safe(listHead, placeHolder, list) {
tx_q_item = list_entry(listHead, tx_buffered_packets_t, q); tx_q_item = list_entry(listHead, tx_buffered_packets_t, q);
...@@ -3378,7 +3378,7 @@ void uf_flush_list(unifi_priv_t * priv, struct list_head * list) ...@@ -3378,7 +3378,7 @@ void uf_flush_list(unifi_priv_t * priv, struct list_head * list)
priv->noOfPktQueuedInDriver--; priv->noOfPktQueuedInDriver--;
} }
} }
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
} }
tx_buffered_packets_t *dequeue_tx_data_pdu(unifi_priv_t *priv, struct list_head *txList) tx_buffered_packets_t *dequeue_tx_data_pdu(unifi_priv_t *priv, struct list_head *txList)
...@@ -3403,13 +3403,13 @@ tx_buffered_packets_t *dequeue_tx_data_pdu(unifi_priv_t *priv, struct list_head ...@@ -3403,13 +3403,13 @@ tx_buffered_packets_t *dequeue_tx_data_pdu(unifi_priv_t *priv, struct list_head
} }
/* return first node after header, & delete from the list && atleast one item exist */ /* return first node after header, & delete from the list && atleast one item exist */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_for_each_safe(listHead, placeHolder, txList) { list_for_each_safe(listHead, placeHolder, txList) {
tx_q_item = list_entry(listHead, tx_buffered_packets_t, q); tx_q_item = list_entry(listHead, tx_buffered_packets_t, q);
list_del(listHead); list_del(listHead);
break; break;
} }
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
if (tx_q_item) { if (tx_q_item) {
unifi_trace(priv, UDBG5, unifi_trace(priv, UDBG5,
...@@ -3440,20 +3440,20 @@ CsrWifiRouterCtrlStaInfo_t *CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress( ...@@ -3440,20 +3440,20 @@ CsrWifiRouterCtrlStaInfo_t *CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(
interfacePriv = priv->interfacePriv[interfaceTag]; interfacePriv = priv->interfacePriv[interfaceTag];
/* disable the preemption until station record is fetched */ /* disable the preemption until station record is fetched */
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
for (i = 0; i < UNIFI_MAX_CONNECTIONS; i++) { for (i = 0; i < UNIFI_MAX_CONNECTIONS; i++) {
if (interfacePriv->staInfo[i]!= NULL) { if (interfacePriv->staInfo[i]!= NULL) {
if (!memcmp(((CsrWifiRouterCtrlStaInfo_t *) (interfacePriv->staInfo[i]))->peerMacAddress.a, peerMacAddress, ETH_ALEN)) { if (!memcmp(((CsrWifiRouterCtrlStaInfo_t *) (interfacePriv->staInfo[i]))->peerMacAddress.a, peerMacAddress, ETH_ALEN)) {
/* enable the preemption as station record is fetched */ /* enable the preemption as station record is fetched */
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
unifi_trace(priv, UDBG5, "peer entry found in station record\n"); unifi_trace(priv, UDBG5, "peer entry found in station record\n");
return ((CsrWifiRouterCtrlStaInfo_t *) (interfacePriv->staInfo[i])); return ((CsrWifiRouterCtrlStaInfo_t *) (interfacePriv->staInfo[i]));
} }
} }
} }
/* enable the preemption as station record is fetched */ /* enable the preemption as station record is fetched */
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
unifi_trace(priv, UDBG5, "peer entry not found in station record\n"); unifi_trace(priv, UDBG5, "peer entry not found in station record\n");
return NULL; return NULL;
} }
...@@ -3487,7 +3487,7 @@ void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, u32 currentTime) ...@@ -3487,7 +3487,7 @@ void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, u32 currentTime)
return; return;
} }
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
/* Go through the list of stations to check for inactivity */ /* Go through the list of stations to check for inactivity */
for(i = 0; i < UNIFI_MAX_CONNECTIONS; i++) { for(i = 0; i < UNIFI_MAX_CONNECTIONS; i++) {
staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv, i, interfaceTag); staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv, i, interfaceTag);
...@@ -3502,7 +3502,7 @@ void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, u32 currentTime) ...@@ -3502,7 +3502,7 @@ void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, u32 currentTime)
elapsedTime = (currentTime >= staInfo->lastActivity)? elapsedTime = (currentTime >= staInfo->lastActivity)?
(currentTime - staInfo->lastActivity): (currentTime - staInfo->lastActivity):
(~((u32)0) - staInfo->lastActivity + currentTime); (~((u32)0) - staInfo->lastActivity + currentTime);
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
if (elapsedTime > MAX_INACTIVITY_INTERVAL) { if (elapsedTime > MAX_INACTIVITY_INTERVAL) {
memcpy((u8*)&peerMacAddress, (u8*)&staInfo->peerMacAddress, sizeof(CsrWifiMacAddress)); memcpy((u8*)&peerMacAddress, (u8*)&staInfo->peerMacAddress, sizeof(CsrWifiMacAddress));
...@@ -3545,7 +3545,7 @@ void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peer ...@@ -3545,7 +3545,7 @@ void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peer
return; return;
} }
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
/* Update activity */ /* Update activity */
staInfo->lastActivity = currentTime; staInfo->lastActivity = currentTime;
...@@ -3558,7 +3558,7 @@ void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peer ...@@ -3558,7 +3558,7 @@ void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peer
(currentTime - interfacePriv->last_inactivity_check): (currentTime - interfacePriv->last_inactivity_check):
(~((u32)0) - interfacePriv->last_inactivity_check + currentTime); (~((u32)0) - interfacePriv->last_inactivity_check + currentTime);
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
/* Check if it is time to run the inactivity handler */ /* Check if it is time to run the inactivity handler */
if (elapsedTime > INACTIVITY_CHECK_INTERVAL) { if (elapsedTime > INACTIVITY_CHECK_INTERVAL) {
...@@ -3572,19 +3572,19 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag) ...@@ -3572,19 +3572,19 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag)
u8 i; u8 i;
int j; int j;
tx_buffered_packets_t * buffered_pkt = NULL; tx_buffered_packets_t * buffered_pkt = NULL;
u8 hipslotFree[4] = {TRUE,TRUE,TRUE,TRUE}; u8 hipslotFree[4] = {TRUE, TRUE, TRUE, TRUE};
int r; int r;
unsigned long lock_flags; unsigned long lock_flags;
while(!isRouterBufferEnabled(priv,3) && while(!isRouterBufferEnabled(priv, 3) &&
((buffered_pkt=dequeue_tx_data_pdu(priv,&interfacePriv->genericMgtFrames))!=NULL)) { ((buffered_pkt=dequeue_tx_data_pdu(priv, &interfacePriv->genericMgtFrames))!=NULL)) {
buffered_pkt->transmissionControl &= buffered_pkt->transmissionControl &=
~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK); ~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,NULL,0,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, NULL, 0, FALSE)) == -ENOSPC) {
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &interfacePriv->genericMgtFrames); list_add(&buffered_pkt->q, &interfacePriv->genericMgtFrames);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
hipslotFree[3]=FALSE; hipslotFree[3]=FALSE;
break; break;
}else { }else {
...@@ -3606,12 +3606,12 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag) ...@@ -3606,12 +3606,12 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag)
while((( TRUE == hipslotFree[3] ) && (buffered_pkt=dequeue_tx_data_pdu(priv, &staInfo->mgtFrames)))) { while((( TRUE == hipslotFree[3] ) && (buffered_pkt=dequeue_tx_data_pdu(priv, &staInfo->mgtFrames)))) {
buffered_pkt->transmissionControl &= buffered_pkt->transmissionControl &=
~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK); ~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staInfo,0,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staInfo, 0, FALSE)) == -ENOSPC) {
unifi_trace(priv, UDBG3, "(ENOSPC) in resume_unicast_buffered_frames:: hip slots are full for voice queue\n"); unifi_trace(priv, UDBG3, "(ENOSPC) in resume_unicast_buffered_frames:: hip slots are full for voice queue\n");
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staInfo->mgtFrames); list_add(&buffered_pkt->q, &staInfo->mgtFrames);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[3]=(u8)(staInfo->assignedHandle); priv->pausedStaHandle[3]=(u8)(staInfo->assignedHandle);
hipslotFree[3] = FALSE; hipslotFree[3] = FALSE;
break; break;
...@@ -3632,11 +3632,11 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag) ...@@ -3632,11 +3632,11 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag)
while((buffered_pkt=dequeue_tx_data_pdu(priv, &staInfo->dataPdu[j]))) { while((buffered_pkt=dequeue_tx_data_pdu(priv, &staInfo->dataPdu[j]))) {
buffered_pkt->transmissionControl &= buffered_pkt->transmissionControl &=
~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK); ~(TRANSMISSION_CONTROL_TRIGGER_MASK|TRANSMISSION_CONTROL_EOSP_MASK);
if((r=frame_and_send_queued_pdu(priv,buffered_pkt,staInfo,0,FALSE)) == -ENOSPC) { if((r=frame_and_send_queued_pdu(priv, buffered_pkt, staInfo, 0, FALSE)) == -ENOSPC) {
/* Enqueue at the head of the queue */ /* Enqueue at the head of the queue */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_add(&buffered_pkt->q, &staInfo->dataPdu[j]); list_add(&buffered_pkt->q, &staInfo->dataPdu[j]);
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
priv->pausedStaHandle[j]=(u8)(staInfo->assignedHandle); priv->pausedStaHandle[j]=(u8)(staInfo->assignedHandle);
hipslotFree[j]=FALSE; hipslotFree[j]=FALSE;
break; break;
...@@ -3653,7 +3653,7 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag) ...@@ -3653,7 +3653,7 @@ void resume_unicast_buffered_frames(unifi_priv_t *priv, u16 interfaceTag)
} }
} }
} }
void update_eosp_to_head_of_broadcast_list_head(unifi_priv_t *priv,u16 interfaceTag) void update_eosp_to_head_of_broadcast_list_head(unifi_priv_t *priv, u16 interfaceTag)
{ {
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag]; netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
...@@ -3668,15 +3668,15 @@ void update_eosp_to_head_of_broadcast_list_head(unifi_priv_t *priv,u16 interface ...@@ -3668,15 +3668,15 @@ void update_eosp_to_head_of_broadcast_list_head(unifi_priv_t *priv,u16 interface
* because we have received any mgmt packet so it should not hold for long time * because we have received any mgmt packet so it should not hold for long time
* peer may time out. * peer may time out.
*/ */
spin_lock_irqsave(&priv->tx_q_lock,lock_flags); spin_lock_irqsave(&priv->tx_q_lock, lock_flags);
list_for_each_safe(listHead, placeHolder, &interfacePriv->genericMulticastOrBroadCastFrames) { list_for_each_safe(listHead, placeHolder, &interfacePriv->genericMulticastOrBroadCastFrames) {
tx_q_item = list_entry(listHead, tx_buffered_packets_t, q); tx_q_item = list_entry(listHead, tx_buffered_packets_t, q);
tx_q_item->transmissionControl |= TRANSMISSION_CONTROL_EOSP_MASK; tx_q_item->transmissionControl |= TRANSMISSION_CONTROL_EOSP_MASK;
tx_q_item->transmissionControl = (tx_q_item->transmissionControl & ~(CSR_NO_CONFIRM_REQUIRED)); tx_q_item->transmissionControl = (tx_q_item->transmissionControl & ~(CSR_NO_CONFIRM_REQUIRED));
unifi_trace(priv, UDBG1,"updating eosp for list Head hostTag:= 0x%x ",tx_q_item->hostTag); unifi_trace(priv, UDBG1, "updating eosp for list Head hostTag:= 0x%x ", tx_q_item->hostTag);
break; break;
} }
spin_unlock_irqrestore(&priv->tx_q_lock,lock_flags); spin_unlock_irqrestore(&priv->tx_q_lock, lock_flags);
} }
} }
...@@ -3692,7 +3692,7 @@ void update_eosp_to_head_of_broadcast_list_head(unifi_priv_t *priv,u16 interface ...@@ -3692,7 +3692,7 @@ void update_eosp_to_head_of_broadcast_list_head(unifi_priv_t *priv,u16 interface
* interfaceTag For which resume should happen * interfaceTag For which resume should happen
* --------------------------------------------------------------------------- * ---------------------------------------------------------------------------
*/ */
void resume_suspended_uapsd(unifi_priv_t* priv,u16 interfaceTag) void resume_suspended_uapsd(unifi_priv_t* priv, u16 interfaceTag)
{ {
u8 startIndex; u8 startIndex;
...@@ -3701,7 +3701,7 @@ void resume_suspended_uapsd(unifi_priv_t* priv,u16 interfaceTag) ...@@ -3701,7 +3701,7 @@ void resume_suspended_uapsd(unifi_priv_t* priv,u16 interfaceTag)
unifi_trace(priv, UDBG2, "++resume_suspended_uapsd: \n"); unifi_trace(priv, UDBG2, "++resume_suspended_uapsd: \n");
for(startIndex= 0; startIndex < UNIFI_MAX_CONNECTIONS;startIndex++) { for(startIndex= 0; startIndex < UNIFI_MAX_CONNECTIONS;startIndex++) {
staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv,startIndex,interfaceTag); staInfo = CsrWifiRouterCtrlGetStationRecordFromHandle(priv, startIndex, interfaceTag);
if(!staInfo || !staInfo->wmmOrQosEnabled) { if(!staInfo || !staInfo->wmmOrQosEnabled) {
continue; continue;
...@@ -3716,10 +3716,10 @@ void resume_suspended_uapsd(unifi_priv_t* priv,u16 interfaceTag) ...@@ -3716,10 +3716,10 @@ void resume_suspended_uapsd(unifi_priv_t* priv,u16 interfaceTag)
staInfo->currentPeerState, staInfo->uapsdActive, staInfo->uspSuspend); staInfo->currentPeerState, staInfo->uapsdActive, staInfo->uspSuspend);
if (staInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE) if (staInfo->currentPeerState == CSR_WIFI_ROUTER_CTRL_PEER_CONNECTED_ACTIVE)
{ {
spin_lock_irqsave(&priv->staRecord_lock,lock_flags); spin_lock_irqsave(&priv->staRecord_lock, lock_flags);
staInfo->uapsdActive = FALSE; staInfo->uapsdActive = FALSE;
staInfo->uspSuspend = FALSE; staInfo->uspSuspend = FALSE;
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags); spin_unlock_irqrestore(&priv->staRecord_lock, lock_flags);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment