[PATCH 1/9] staging: csr: Fix code indentation errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixed code indentation errors generated by checkpatch.pl to
meet kernel coding standards in sme_userspace.c

Signed-off-by: Lisa Nguyen <lisa@xxxxxxxxxxxxxxx>
---
 drivers/staging/csr/sme_userspace.c | 217 ++++++++++++++++++------------------
 1 file changed, 109 insertions(+), 108 deletions(-)

diff --git a/drivers/staging/csr/sme_userspace.c b/drivers/staging/csr/sme_userspace.c
index abcb446..c981b19 100644
--- a/drivers/staging/csr/sme_userspace.c
+++ b/drivers/staging/csr/sme_userspace.c
@@ -59,7 +59,7 @@ uf_sme_init(unifi_priv_t *priv)
     priv->CSR_WIFI_SME_IFACEQUEUE = 0xFFFF;
 
     for (i = 0; i < MAX_MA_UNIDATA_IND_FILTERS; i++) {
-        priv->sme_unidata_ind_filters[i].in_use = 0;
+	    priv->sme_unidata_ind_filters[i].in_use = 0;
     }
 
     /* Create a work queue item for Traffic Analysis indications to SME */
@@ -70,44 +70,43 @@ uf_sme_init(unifi_priv_t *priv)
 #endif
 
     for (i = 0; i < CSR_WIFI_NUM_INTERFACES; i++) {
-        netInterface_priv_t *interfacePriv = priv->interfacePriv[i];
-        interfacePriv->m4_sent = FALSE;
-        interfacePriv->m4_bulk_data.net_buf_length = 0;
-        interfacePriv->m4_bulk_data.data_length = 0;
-        interfacePriv->m4_bulk_data.os_data_ptr = interfacePriv->m4_bulk_data.os_net_buf_ptr = NULL;
-
-        memset(&interfacePriv->controlled_data_port, 0, sizeof(unifi_port_config_t));
-        interfacePriv->controlled_data_port.entries_in_use = 1;
-        interfacePriv->controlled_data_port.port_cfg[0].in_use = TRUE;
-        interfacePriv->controlled_data_port.port_cfg[0].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
-        interfacePriv->controlled_data_port.overide_action = UF_DATA_PORT_OVERIDE;
-
-        memset(&interfacePriv->uncontrolled_data_port, 0, sizeof(unifi_port_config_t));
-        interfacePriv->uncontrolled_data_port.entries_in_use = 1;
-        interfacePriv->uncontrolled_data_port.port_cfg[0].in_use = TRUE;
-        interfacePriv->uncontrolled_data_port.port_cfg[0].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
-        interfacePriv->uncontrolled_data_port.overide_action = UF_DATA_PORT_OVERIDE;
-
-        /* Mark the remainder of the port config table as unallocated */
-        for(j = 1; j < UNIFI_MAX_CONNECTIONS; j++) {
-            interfacePriv->controlled_data_port.port_cfg[j].in_use = FALSE;
-            interfacePriv->controlled_data_port.port_cfg[j].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
-
-            interfacePriv->uncontrolled_data_port.port_cfg[j].in_use = FALSE;
-            interfacePriv->uncontrolled_data_port.port_cfg[j].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
-        }
-
-        /* intializing the lists */
-        INIT_LIST_HEAD(&interfacePriv->genericMgtFrames);
-        INIT_LIST_HEAD(&interfacePriv->genericMulticastOrBroadCastMgtFrames);
-        INIT_LIST_HEAD(&interfacePriv->genericMulticastOrBroadCastFrames);
-
-        for(j = 0; j < UNIFI_MAX_CONNECTIONS; j++) {
-            interfacePriv->staInfo[j] = NULL;
-        }
-
-        interfacePriv->num_stations_joined = 0;
-        interfacePriv->sta_activity_check_enabled = FALSE;
+	    netInterface_priv_t *interfacePriv = priv->interfacePriv[i];
+	    interfacePriv->m4_sent = FALSE;
+	    interfacePriv->m4_bulk_data.net_buf_length = 0;
+	    interfacePriv->m4_bulk_data.data_length = 0;
+	    interfacePriv->m4_bulk_data.os_data_ptr = interfacePriv->m4_bulk_data.os_net_buf_ptr = NULL;
+	    memset(&interfacePriv->controlled_data_port, 0, sizeof(unifi_port_config_t));
+	    interfacePriv->controlled_data_port.entries_in_use = 1;
+	    interfacePriv->controlled_data_port.port_cfg[0].in_use = TRUE;
+	    interfacePriv->controlled_data_port.port_cfg[0].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
+	    interfacePriv->controlled_data_port.overide_action = UF_DATA_PORT_OVERIDE;
+
+	    memset(&interfacePriv->uncontrolled_data_port, 0, sizeof(unifi_port_config_t));
+	    interfacePriv->uncontrolled_data_port.entries_in_use = 1;
+	    interfacePriv->uncontrolled_data_port.port_cfg[0].in_use = TRUE;
+	    interfacePriv->uncontrolled_data_port.port_cfg[0].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
+	    interfacePriv->uncontrolled_data_port.overide_action = UF_DATA_PORT_OVERIDE;
+
+	    /* Mark the remainder of the port config table as unallocated */
+	    for(j = 1; j < UNIFI_MAX_CONNECTIONS; j++) {
+		    interfacePriv->controlled_data_port.port_cfg[j].in_use = FALSE;
+		    interfacePriv->controlled_data_port.port_cfg[j].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
+
+		    interfacePriv->uncontrolled_data_port.port_cfg[j].in_use = FALSE;
+		    interfacePriv->uncontrolled_data_port.port_cfg[j].port_action = CSR_WIFI_ROUTER_CTRL_PORT_ACTION_8021X_PORT_CLOSED_DISCARD;
+	    }
+
+	    /* intializing the lists */
+	    INIT_LIST_HEAD(&interfacePriv->genericMgtFrames);
+	    INIT_LIST_HEAD(&interfacePriv->genericMulticastOrBroadCastMgtFrames);
+	    INIT_LIST_HEAD(&interfacePriv->genericMulticastOrBroadCastFrames);
+
+	    for(j = 0; j < UNIFI_MAX_CONNECTIONS; j++) {
+		    interfacePriv->staInfo[j] = NULL;
+	    }
+
+	    interfacePriv->num_stations_joined = 0;
+	    interfacePriv->sta_activity_check_enabled = FALSE;
     }
 
 
@@ -127,57 +126,59 @@ uf_sme_deinit(unifi_priv_t *priv)
 
     /* Free any TCLASs previously allocated */
     if (priv->packet_filters.tclas_ies_length) {
-        priv->packet_filters.tclas_ies_length = 0;
-        kfree(priv->filter_tclas_ies);
-        priv->filter_tclas_ies = NULL;
+	    priv->packet_filters.tclas_ies_length = 0;
+	    kfree(priv->filter_tclas_ies);
+	    priv->filter_tclas_ies = NULL;
     }
 
     for (i = 0; i < MAX_MA_UNIDATA_IND_FILTERS; i++) {
-        priv->sme_unidata_ind_filters[i].in_use = 0;
+	    priv->sme_unidata_ind_filters[i].in_use = 0;
     }
 
     /* Remove all the Peer database, before going down */
     for (i = 0; i < CSR_WIFI_NUM_INTERFACES; i++) {
-        down(&priv->ba_mutex);
-        for(ba_session_idx=0; ba_session_idx < MAX_SUPPORTED_BA_SESSIONS_RX; ba_session_idx++){
-            ba_session_rx = priv->interfacePriv[i]->ba_session_rx[ba_session_idx];
-            if(ba_session_rx) {
-                blockack_session_stop(priv,
-                                    i,
-                                    CSR_WIFI_ROUTER_CTRL_BLOCK_ACK_RECIPIENT,
-                                    ba_session_rx->tID,
-                                    ba_session_rx->macAddress);
-            }
-        }
-        for(ba_session_idx=0; ba_session_idx < MAX_SUPPORTED_BA_SESSIONS_TX; ba_session_idx++){
-            ba_session_tx = priv->interfacePriv[i]->ba_session_tx[ba_session_idx];
-            if(ba_session_tx) {
-                blockack_session_stop(priv,
-                                    i,
-                                    CSR_WIFI_ROUTER_CTRL_BLOCK_ACK_ORIGINATOR,
-                                    ba_session_tx->tID,
-                                    ba_session_tx->macAddress);
-            }
-        }
-
-        up(&priv->ba_mutex);
-        interfacePriv = priv->interfacePriv[i];
-        if(interfacePriv){
-            for(j = 0; j < UNIFI_MAX_CONNECTIONS; j++) {
-                if ((staInfo=interfacePriv->staInfo[j]) != NULL) {
-                    /* Clear the STA activity parameters before freeing station Record */
-                    unifi_trace(priv, UDBG1, "uf_sme_deinit: Canceling work queue for STA with AID: %d\n", staInfo->aid);
-                    cancel_work_sync(&staInfo->send_disconnected_ind_task);
-                    staInfo->nullDataHostTag = INVALID_HOST_TAG;
-                }
-            }
-            if (interfacePriv->sta_activity_check_enabled){
-                interfacePriv->sta_activity_check_enabled = FALSE;
-                del_timer_sync(&interfacePriv->sta_activity_check_timer);
-            }
-        }
-        CsrWifiRouterCtrlInterfaceReset(priv, i);
-        priv->interfacePriv[i]->interfaceMode = CSR_WIFI_ROUTER_CTRL_MODE_NONE;
+	    down(&priv->ba_mutex);
+	    for(ba_session_idx=0; ba_session_idx < MAX_SUPPORTED_BA_SESSIONS_RX; ba_session_idx++){
+		    ba_session_rx = priv->interfacePriv[i]->ba_session_rx[ba_session_idx];
+		    if(ba_session_rx) {
+			    blockack_session_stop(priv, i,
+				CSR_WIFI_ROUTER_CTRL_BLOCK_ACK_RECIPIENT,
+				ba_session_rx->tID,
+				ba_session_rx->macAddress);
+		    }
+	    }
+
+	    for(ba_session_idx=0; ba_session_idx < MAX_SUPPORTED_BA_SESSIONS_TX; ba_session_idx++){
+		    ba_session_tx = priv->interfacePriv[i]->ba_session_tx[ba_session_idx];
+		    if(ba_session_tx) {
+			    blockack_session_stop(priv, i,
+				CSR_WIFI_ROUTER_CTRL_BLOCK_ACK_ORIGINATOR,
+				ba_session_tx->tID,
+				ba_session_tx->macAddress);
+		    }
+	    }
+
+	    up(&priv->ba_mutex);
+	    interfacePriv = priv->interfacePriv[i];
+
+	    if(interfacePriv){
+		    for(j = 0; j < UNIFI_MAX_CONNECTIONS; j++) {
+			    if ((staInfo=interfacePriv->staInfo[j]) != NULL) {
+				    /* Clear the STA activity parameters before freeing station Record */
+				    unifi_trace(priv, UDBG1, "uf_sme_deinit: Canceling work queue for STA with AID: %d\n", staInfo->aid);
+				    cancel_work_sync(&staInfo->send_disconnected_ind_task);
+				    staInfo->nullDataHostTag = INVALID_HOST_TAG;
+			    }
+		    }
+
+		    if (interfacePriv->sta_activity_check_enabled){
+			    interfacePriv->sta_activity_check_enabled = FALSE;
+			    del_timer_sync(&interfacePriv->sta_activity_check_timer);
+		    }
+	    }
+
+	    CsrWifiRouterCtrlInterfaceReset(priv, i);
+	    priv->interfacePriv[i]->interfaceMode = CSR_WIFI_ROUTER_CTRL_MODE_NONE;
     }
 
 
@@ -209,34 +210,34 @@ uf_sme_deinit(unifi_priv_t *priv)
  */
 void
 unifi_ta_indicate_protocol(void *ospriv,
-                           CsrWifiRouterCtrlTrafficPacketType packet_type,
-                           CsrWifiRouterCtrlProtocolDirection direction,
-                           const CsrWifiMacAddress *src_addr)
+		CsrWifiRouterCtrlTrafficPacketType packet_type,
+		CsrWifiRouterCtrlProtocolDirection direction,
+		const CsrWifiMacAddress *src_addr)
 {
     unifi_priv_t *priv = (unifi_priv_t*)ospriv;
 
     if (priv->ta_ind_work.in_use) {
-        unifi_warning(priv,
-                "unifi_ta_indicate_protocol: workqueue item still in use, not sending\n");
-        return;
+	    unifi_warning(priv,
+		"unifi_ta_indicate_protocol: workqueue item still in use, not sending\n");
+	    return;
     }
 
     if (CSR_WIFI_ROUTER_CTRL_PROTOCOL_DIRECTION_RX == direction)
     {
-        u16 interfaceTag = 0;
-        CsrWifiRouterCtrlTrafficProtocolIndSend(priv->CSR_WIFI_SME_IFACEQUEUE,0,
-                interfaceTag,
-                packet_type,
-                direction,
-                *src_addr);
+	    u16 interfaceTag = 0;
+	    CsrWifiRouterCtrlTrafficProtocolIndSend(priv->CSR_WIFI_SME_IFACEQUEUE,0,
+			    interfaceTag,
+			    packet_type,
+			    direction,
+			    *src_addr);
     }
     else
     {
-        priv->ta_ind_work.packet_type = packet_type;
-        priv->ta_ind_work.direction = direction;
-        priv->ta_ind_work.src_addr = *src_addr;
+	    priv->ta_ind_work.packet_type = packet_type;
+	    priv->ta_ind_work.direction = direction;
+	    priv->ta_ind_work.src_addr = *src_addr;
 
-        queue_work(priv->unifi_workqueue, &priv->ta_ind_work.task);
+	    queue_work(priv->unifi_workqueue, &priv->ta_ind_work.task);
     }
 
 } /* unifi_ta_indicate_protocol() */
@@ -262,13 +263,13 @@ unifi_ta_indicate_sampling(void *ospriv, CsrWifiRouterCtrlTrafficStats *stats)
     unifi_priv_t *priv = (unifi_priv_t*)ospriv;
 
     if (!priv) {
-        return;
+	    return;
     }
 
     if (priv->ta_sample_ind_work.in_use) {
-        unifi_warning(priv,
-                     "unifi_ta_indicate_sampling: workqueue item still in use, not sending\n");
-        return;
+	    unifi_warning(priv,
+		"unifi_ta_indicate_sampling: workqueue item still in use, not sending\n");
+	    return;
     }
 
     priv->ta_sample_ind_work.stats = *stats;
@@ -297,15 +298,15 @@ unifi_ta_indicate_sampling(void *ospriv, CsrWifiRouterCtrlTrafficStats *stats)
  */
 void
 unifi_ta_indicate_l4stats(void *ospriv,
-                          u32 rxTcpThroughput,
-                          u32 txTcpThroughput,
-                          u32 rxUdpThroughput,
-                          u32 txUdpThroughput)
+		u32 rxTcpThroughput,
+		u32 txTcpThroughput,
+		u32 rxUdpThroughput,
+		u32 txUdpThroughput)
 {
     unifi_priv_t *priv = (unifi_priv_t*)ospriv;
 
     if (!priv) {
-        return;
+	    return;
     }
     /* Save the info. The actual action will be taken in unifi_ta_indicate_sampling() */
     priv->rxTcpThroughput = rxTcpThroughput;
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux