case CSR_WIFI_ROUTER_CTRL_MODE_IBSS:
{
CsrWifiRouterCtrlStaInfo_t * dstStaInfo =
- CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv,ehdr->h_dest, interfacePriv->InterfaceTag);
+ CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv, ehdr->h_dest, interfacePriv->InterfaceTag);
unifi_trace(priv, UDBG4, "mode is AP \n");
if (!(ehdr->h_dest[0] & 0x01) && dstStaInfo && dstStaInfo->wmmOrQosEnabled) {
/* If packet is not Broadcast/multicast */
#endif
if(skb== NULL || daddr == NULL || saddr == NULL){
- unifi_error(priv,"skb_80211_to_ether: PBC fail\n");
+ unifi_error(priv, "skb_80211_to_ether: PBC fail\n");
return 1;
}
u8 bQosNull = false;
if (skb == NULL) {
- unifi_error(priv,"prepare_and_add_macheader: Invalid SKB reference\n");
+ unifi_error(priv, "prepare_and_add_macheader: Invalid SKB reference\n");
return -1;
}
macHeaderLengthInBytes -= ETH_ALEN;
break;
default:
- unifi_error(priv,"Unknown direction =%d : Not handled now\n",direction);
+ unifi_error(priv, "Unknown direction =%d : Not handled now\n", direction);
return -1;
}
/* 2 bytes of frame control field, appended by firmware */
memcpy(peerAddress.a, ((u8 *) bulkdata.d[0].os_data_ptr) + 4, ETH_ALEN);
unifi_trace(priv, UDBG5, "RA[0]=%x, RA[1]=%x, RA[2]=%x, RA[3]=%x, RA[4]=%x, RA[5]=%x\n",
- peerAddress.a[0],peerAddress.a[1], peerAddress.a[2], peerAddress.a[3],
- peerAddress.a[4],peerAddress.a[5]);
+ peerAddress.a[0], peerAddress.a[1], peerAddress.a[2], peerAddress.a[3],
+ peerAddress.a[4], peerAddress.a[5]);
if ((proto == ETH_P_PAE)
#ifdef CSR_SUPPORT_SME
if(queue<=3) {
- routerStartBuffering(priv,queue);
- unifi_trace(priv,UDBG2,"Start buffering %d\n", queue);
+ routerStartBuffering(priv, queue);
+ unifi_trace(priv, UDBG2, "Start buffering %d\n", queue);
} else {
- routerStartBuffering(priv,0);
+ routerStartBuffering(priv, 0);
unifi_error(priv, "Start buffering %d defaulting to 0\n", queue);
}
#endif
#ifdef CSR_SUPPORT_SME
if(queue <=3) {
- routerStopBuffering(priv,queue);
- uf_send_buffered_frames(priv,queue);
+ routerStopBuffering(priv, queue);
+ uf_send_buffered_frames(priv, queue);
} else {
- routerStopBuffering(priv,0);
- uf_send_buffered_frames(priv,0);
+ routerStopBuffering(priv, 0);
+ uf_send_buffered_frames(priv, 0);
}
#endif
} /* unifi_restart_xmit() */
netif_tx_schedule_all(priv->netdev[interfaceTag]);
}
#endif
- uf_process_rx_pending_queue(priv, queue, peer_address, 1,interfaceTag);
+ uf_process_rx_pending_queue(priv, queue, peer_address, 1, interfaceTag);
}
} /* uf_resume_data_plane() */
-void uf_free_pending_rx_packets(unifi_priv_t *priv, int queue, CsrWifiMacAddress peer_address,u16 interfaceTag)
+void uf_free_pending_rx_packets(unifi_priv_t *priv, int queue, CsrWifiMacAddress peer_address, u16 interfaceTag)
{
- uf_process_rx_pending_queue(priv, queue, peer_address, 0,interfaceTag);
+ uf_process_rx_pending_queue(priv, queue, peer_address, 0, interfaceTag);
} /* uf_free_pending_rx_packets() */
if (interfaceTag >= CSR_WIFI_NUM_INTERFACES)
{
unifi_error(priv, "%s: MA-PACKET indication with bad interfaceTag %d\n", __FUNCTION__, interfaceTag);
- unifi_net_data_free(priv,&bulkdata->d[0]);
+ unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
if (bulkdata->d[0].data_length == 0) {
unifi_warning(priv, "%s: MA-PACKET indication with zero bulk data\n", __FUNCTION__);
- unifi_net_data_free(priv,&bulkdata->d[0]);
+ unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
toDs = (skb->data[1] & 0x01) ? 1 : 0;
fromDs = (skb->data[1] & 0x02) ? 1 : 0;
- memcpy(da,(skb->data+4+toDs*12),ETH_ALEN);/* Address1 or 3 */
- memcpy(sa,(skb->data+10+fromDs*(6+toDs*8)),ETH_ALEN); /* Address2, 3 or 4 */
+ memcpy(da, (skb->data+4+toDs*12), ETH_ALEN);/* Address1 or 3 */
+ memcpy(sa, (skb->data+10+fromDs*(6+toDs*8)), ETH_ALEN); /* Address2, 3 or 4 */
pData = &bulkdata->d[0];
dataFrameType =((frameControl & 0x00f0) >> 4);
unifi_trace(priv, UDBG6,
- "%s: Receive Data Frame Type %d \n", __FUNCTION__,dataFrameType);
+ "%s: Receive Data Frame Type %d \n", __FUNCTION__, dataFrameType);
switch(dataFrameType)
{
/* AP/P2PGO specific handling here */
CsrWifiRouterCtrlStaInfo_t * srcStaInfo =
- CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv,sa,interfaceTag);
+ CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv, sa, interfaceTag);
/* Defensive check only; Source address is already checked in
process_ma_packet_ind and we should have a valid source address here */
if(srcStaInfo == NULL) {
CsrWifiMacAddress peerMacAddress;
/* Unknown data PDU */
- memcpy(peerMacAddress.a,sa,ETH_ALEN);
+ memcpy(peerMacAddress.a, sa, ETH_ALEN);
unifi_trace(priv, UDBG1, "%s: Unexpected frame from peer = %x:%x:%x:%x:%x:%x\n", __FUNCTION__,
- sa[0], sa[1],sa[2], sa[3], sa[4],sa[5]);
- CsrWifiRouterCtrlUnexpectedFrameIndSend(priv->CSR_WIFI_SME_IFACEQUEUE,0,interfaceTag,peerMacAddress);
+ sa[0], sa[1], sa[2], sa[3], sa[4], sa[5]);
+ CsrWifiRouterCtrlUnexpectedFrameIndSend(priv->CSR_WIFI_SME_IFACEQUEUE, 0, interfaceTag, peerMacAddress);
unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
if (port_action != CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_OPEN) {
/* Drop the packet and return */
CsrWifiMacAddress peerMacAddress;
- memcpy(peerMacAddress.a,sa,ETH_ALEN);
+ memcpy(peerMacAddress.a, sa, ETH_ALEN);
unifi_trace(priv, UDBG3, "%s: Port is not open: unexpected frame from peer = %x:%x:%x:%x:%x:%x\n",
- __FUNCTION__, sa[0], sa[1],sa[2], sa[3], sa[4],sa[5]);
+ __FUNCTION__, 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);
interfacePriv->stats.rx_dropped++;
unifi_net_data_free(priv, &bulkdata->d[0]);
unifi_notice(priv, "%s: Dropping packet, proto=0x%04x, %s port\n", __FUNCTION__,
{
return;
}
- unifi_trace(priv, UDBG5, "unifi_rx: no specific AP handling process as normal frame, MAC Header len %d\n",macHeaderLengthInBytes);
+ unifi_trace(priv, UDBG5, "unifi_rx: no specific AP handling process as normal frame, MAC Header len %d\n", macHeaderLengthInBytes);
/* Remove the MAC header for subsequent conversion */
skb_pull(skb, macHeaderLengthInBytes);
pData->os_data_ptr = skb->data;
if(interfacePriv->interfaceMode == CSR_WIFI_ROUTER_CTRL_MODE_AP ||
interfacePriv->interfaceMode == CSR_WIFI_ROUTER_CTRL_MODE_P2PGO) {
- uf_process_ma_pkt_cfm_for_ap(priv,interfaceTag,pkt_cfm);
+ uf_process_ma_pkt_cfm_for_ap(priv, interfaceTag, pkt_cfm);
} else if (interfacePriv->m4_sent && (pkt_cfm->HostTag == interfacePriv->m4_hostTag)) {
/* Check if this is a confirm for EAPOL M4 frame and we need to send transmistted ind*/
CsrResult result = pkt_cfm->TransmissionStatus == CSR_TX_SUCCESSFUL?CSR_RESULT_SUCCESS:CSR_RESULT_FAILURE;
if (interfaceTag >= CSR_WIFI_NUM_INTERFACES)
{
unifi_error(priv, "%s: MA-PACKET indication with bad interfaceTag %d\n", __FUNCTION__, interfaceTag);
- unifi_net_data_free(priv,&bulkdata->d[0]);
+ unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
if (bulkdata->d[0].data_length == 0) {
unifi_warning(priv, "%s: MA-PACKET indication with zero bulk data\n", __FUNCTION__);
- unifi_net_data_free(priv,&bulkdata->d[0]);
+ unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
/* For monitor mode we need to pass this indication to the registered application
/* MIC failure is already taken care of so no need to send the PDUs which are not successfully received in non-monitor mode*/
if(pkt_ind->ReceptionStatus != CSR_RX_SUCCESS)
{
- unifi_warning(priv, "%s: MA-PACKET indication with status = %d\n",__FUNCTION__, pkt_ind->ReceptionStatus);
- unifi_net_data_free(priv,&bulkdata->d[0]);
+ unifi_warning(priv, "%s: MA-PACKET indication with status = %d\n", __FUNCTION__, pkt_ind->ReceptionStatus);
+ unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
toDs = (skb->data[1] & 0x01) ? 1 : 0;
fromDs = (skb->data[1] & 0x02) ? 1 : 0;
- memcpy(da,(skb->data+4+toDs*12),ETH_ALEN);/* Address1 or 3 */
- memcpy(sa,(skb->data+10+fromDs*(6+toDs*8)),ETH_ALEN); /* Address2, 3 or 4 */
+ memcpy(da, (skb->data+4+toDs*12), ETH_ALEN);/* Address1 or 3 */
+ memcpy(sa, (skb->data+10+fromDs*(6+toDs*8)), ETH_ALEN); /* Address2, 3 or 4 */
/* Find the BSSID, which will be used to match the BA session */
if (toDs && fromDs)
frameControl = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(pData->os_data_ptr);
frameType = ((frameControl & 0x000C) >> 2);
- unifi_trace(priv, UDBG3, "Rx Frame Type: %d sn: %d\n",frameType,
+ unifi_trace(priv, UDBG3, "Rx Frame Type: %d sn: %d\n", frameType,
(le16_to_cpu(*((u16*)(bulkdata->d[0].os_data_ptr + IEEE802_11_SEQUENCE_CONTROL_OFFSET))) >> 4) & 0xfff);
if(frameType == IEEE802_11_FRAMETYPE_CONTROL){
#ifdef CSR_SUPPORT_SME
u8 pmBit = (frameControl & 0x1000)?0x01:0x00;
unifi_trace(priv, UDBG6, "%s: Received PS-POLL Frame\n", __FUNCTION__);
- uf_process_ps_poll(priv,sa,da,pmBit,interfaceTag);
+ uf_process_ps_poll(priv, sa, da, pmBit, interfaceTag);
}
else {
unifi_warning(priv, "%s: Non PS-POLL control frame is received\n", __FUNCTION__);
}
#endif
- unifi_net_data_free(priv,&bulkdata->d[0]);
+ unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
if(frameType != IEEE802_11_FRAMETYPE_DATA) {
- unifi_warning(priv, "%s: Non control Non Data frame is received\n",__FUNCTION__);
- unifi_net_data_free(priv,&bulkdata->d[0]);
+ unifi_warning(priv, "%s: Non control Non Data frame is received\n", __FUNCTION__);
+ unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
if((interfacePriv->interfaceMode == CSR_WIFI_ROUTER_CTRL_MODE_AP) ||
(interfacePriv->interfaceMode == CSR_WIFI_ROUTER_CTRL_MODE_P2PGO)){
- srcStaInfo = CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv,sa,interfaceTag);
+ srcStaInfo = CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(priv, sa, interfaceTag);
if(srcStaInfo == NULL) {
CsrWifiMacAddress peerMacAddress;
/* Unknown data PDU */
- memcpy(peerMacAddress.a,sa,ETH_ALEN);
+ memcpy(peerMacAddress.a, sa, ETH_ALEN);
unifi_trace(priv, UDBG1, "%s: Unexpected frame from peer = %x:%x:%x:%x:%x:%x\n", __FUNCTION__,
- sa[0], sa[1],sa[2], sa[3], sa[4],sa[5]);
- CsrWifiRouterCtrlUnexpectedFrameIndSend(priv->CSR_WIFI_SME_IFACEQUEUE,0,interfaceTag,peerMacAddress);
+ sa[0], sa[1], sa[2], sa[3], sa[4], sa[5]);
+ CsrWifiRouterCtrlUnexpectedFrameIndSend(priv->CSR_WIFI_SME_IFACEQUEUE, 0, interfaceTag, peerMacAddress);
unifi_net_data_free(priv, &bulkdata->d[0]);
return;
}
*/
pmBit = (frameControl & 0x1000)?0x01:0x00;
- powerSaveChanged = uf_process_pm_bit_for_peer(priv,srcStaInfo,pmBit,interfaceTag);
+ powerSaveChanged = uf_process_pm_bit_for_peer(priv, srcStaInfo, pmBit, interfaceTag);
/* Update station last activity time */
srcStaInfo->activity_flag = TRUE;
else{
qosControl = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(pData->os_data_ptr + 24);
}
- unifi_trace(priv, UDBG5, "%s: Check if U-APSD operations are triggered for qosControl: 0x%x\n",__FUNCTION__,qosControl);
- uf_process_wmm_deliver_ac_uapsd(priv,srcStaInfo,qosControl,interfaceTag);
+ unifi_trace(priv, UDBG5, "%s: Check if U-APSD operations are triggered for qosControl: 0x%x\n", __FUNCTION__, qosControl);
+ uf_process_wmm_deliver_ac_uapsd(priv, srcStaInfo, qosControl, interfaceTag);
}
}
}
interfacePriv->connected = UnifiConnected;
interfacePriv->wait_netdev_change = FALSE;
/* Note: passing the broadcast address here will allow anyone to attempt to join our adhoc network */
- uf_process_rx_pending_queue(priv, UF_UNCONTROLLED_PORT_Q, broadcast_address, 1,interfacePriv->InterfaceTag);
- uf_process_rx_pending_queue(priv, UF_CONTROLLED_PORT_Q, broadcast_address, 1,interfacePriv->InterfaceTag);
+ uf_process_rx_pending_queue(priv, UF_UNCONTROLLED_PORT_Q, broadcast_address, 1, interfacePriv->InterfaceTag);
+ uf_process_rx_pending_queue(priv, UF_CONTROLLED_PORT_Q, broadcast_address, 1, interfacePriv->InterfaceTag);
}
break;