aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de>2011-12-09 14:38:06 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-12 19:49:24 -0500
commitefa6f862d3d18723d720c8777b2a98e8a3277195 (patch)
treead6d28709ea605a1607b4d2a80addc20a767383d /drivers
parentdd751d2a2bbd619081074d25f3f2ebcb1fb29b9e (diff)
staging: bcm: HandleControlPacket.c: fix indentation
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/bcm/HandleControlPacket.c131
1 files changed, 65 insertions, 66 deletions
diff --git a/drivers/staging/bcm/HandleControlPacket.c b/drivers/staging/bcm/HandleControlPacket.c
index e764e63c003d..531dd1424c60 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -26,42 +26,42 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
26 26
27 switch (usStatus) 27 switch (usStatus)
28 { 28 {
29 case CM_RESPONSES: // 0xA0 29 case CM_RESPONSES: // 0xA0
30 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "MAC Version Seems to be Non Multi-Classifier, rejected by Driver"); 30 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "MAC Version Seems to be Non Multi-Classifier, rejected by Driver");
31 HighPriorityMessage = TRUE; 31 HighPriorityMessage = TRUE;
32 break; 32 break;
33 case CM_CONTROL_NEWDSX_MULTICLASSIFIER_RESP: 33 case CM_CONTROL_NEWDSX_MULTICLASSIFIER_RESP:
34 HighPriorityMessage = TRUE; 34 HighPriorityMessage = TRUE;
35 if (Adapter->LinkStatus == LINKUP_DONE) 35 if (Adapter->LinkStatus == LINKUP_DONE)
36 { 36 {
37 CmControlResponseMessage(Adapter, (skb->data + sizeof(USHORT))); 37 CmControlResponseMessage(Adapter, (skb->data + sizeof(USHORT)));
38 } 38 }
39 break; 39 break;
40 case LINK_CONTROL_RESP: //0xA2 40 case LINK_CONTROL_RESP: //0xA2
41 case STATUS_RSP: //0xA1 41 case STATUS_RSP: //0xA1
42 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "LINK_CONTROL_RESP"); 42 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "LINK_CONTROL_RESP");
43 HighPriorityMessage = TRUE; 43 HighPriorityMessage = TRUE;
44 LinkControlResponseMessage(Adapter, (skb->data + sizeof(USHORT))); 44 LinkControlResponseMessage(Adapter, (skb->data + sizeof(USHORT)));
45 break; 45 break;
46 case STATS_POINTER_RESP: //0xA6 46 case STATS_POINTER_RESP: //0xA6
47 HighPriorityMessage = TRUE; 47 HighPriorityMessage = TRUE;
48 StatisticsResponse(Adapter, (skb->data + sizeof(USHORT))); 48 StatisticsResponse(Adapter, (skb->data + sizeof(USHORT)));
49 break; 49 break;
50 case IDLE_MODE_STATUS: //0xA3 50 case IDLE_MODE_STATUS: //0xA3
51 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "IDLE_MODE_STATUS Type Message Got from F/W"); 51 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "IDLE_MODE_STATUS Type Message Got from F/W");
52 InterfaceIdleModeRespond(Adapter, (PUINT)(skb->data + 52 InterfaceIdleModeRespond(Adapter, (PUINT)(skb->data +
53 sizeof(USHORT))); 53 sizeof(USHORT)));
54 HighPriorityMessage = TRUE; 54 HighPriorityMessage = TRUE;
55 break; 55 break;
56 56
57 case AUTH_SS_HOST_MSG: 57 case AUTH_SS_HOST_MSG:
58 HighPriorityMessage = TRUE; 58 HighPriorityMessage = TRUE;
59 break; 59 break;
60 60
61 default: 61 default:
62 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "Got Default Response"); 62 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "Got Default Response");
63 /* Let the Application Deal with This Packet */ 63 /* Let the Application Deal with This Packet */
64 break; 64 break;
65 } 65 }
66 66
67 //Queue The Control Packet to The Application Queues 67 //Queue The Control Packet to The Application Queues
@@ -69,7 +69,7 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
69 69
70 for (pTarang = Adapter->pTarangs; pTarang; pTarang = pTarang->next) 70 for (pTarang = Adapter->pTarangs; pTarang; pTarang = pTarang->next)
71 { 71 {
72 if (Adapter->device_removed) 72 if (Adapter->device_removed)
73 { 73 {
74 break; 74 break;
75 } 75 }
@@ -83,10 +83,10 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
83 cntrl_msg_mask_bit = (usStatus & 0x1F); 83 cntrl_msg_mask_bit = (usStatus & 0x1F);
84 //printk("\ninew msg mask bit which is disable in mask:%X", cntrl_msg_mask_bit); 84 //printk("\ninew msg mask bit which is disable in mask:%X", cntrl_msg_mask_bit);
85 if (pTarang->RxCntrlMsgBitMask & (1 << cntrl_msg_mask_bit)) 85 if (pTarang->RxCntrlMsgBitMask & (1 << cntrl_msg_mask_bit))
86 drop_pkt_flag = FALSE; 86 drop_pkt_flag = FALSE;
87 87
88 if ((drop_pkt_flag == TRUE) || (pTarang->AppCtrlQueueLen > MAX_APP_QUEUE_LEN) || 88 if ((drop_pkt_flag == TRUE) || (pTarang->AppCtrlQueueLen > MAX_APP_QUEUE_LEN) ||
89 ((pTarang->AppCtrlQueueLen > MAX_APP_QUEUE_LEN / 2) && (HighPriorityMessage == FALSE))) 89 ((pTarang->AppCtrlQueueLen > MAX_APP_QUEUE_LEN / 2) && (HighPriorityMessage == FALSE)))
90 { 90 {
91 /* 91 /*
92 Assumption:- 92 Assumption:-
@@ -97,30 +97,30 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
97 */ 97 */
98 switch (*(PUSHORT)skb->data) 98 switch (*(PUSHORT)skb->data)
99 { 99 {
100 case CM_RESPONSES: 100 case CM_RESPONSES:
101 pTarang->stDroppedAppCntrlMsgs.cm_responses++; 101 pTarang->stDroppedAppCntrlMsgs.cm_responses++;
102 break; 102 break;
103 case CM_CONTROL_NEWDSX_MULTICLASSIFIER_RESP: 103 case CM_CONTROL_NEWDSX_MULTICLASSIFIER_RESP:
104 pTarang->stDroppedAppCntrlMsgs.cm_control_newdsx_multiclassifier_resp++; 104 pTarang->stDroppedAppCntrlMsgs.cm_control_newdsx_multiclassifier_resp++;
105 break; 105 break;
106 case LINK_CONTROL_RESP: 106 case LINK_CONTROL_RESP:
107 pTarang->stDroppedAppCntrlMsgs.link_control_resp++; 107 pTarang->stDroppedAppCntrlMsgs.link_control_resp++;
108 break; 108 break;
109 case STATUS_RSP: 109 case STATUS_RSP:
110 pTarang->stDroppedAppCntrlMsgs.status_rsp++; 110 pTarang->stDroppedAppCntrlMsgs.status_rsp++;
111 break; 111 break;
112 case STATS_POINTER_RESP: 112 case STATS_POINTER_RESP:
113 pTarang->stDroppedAppCntrlMsgs.stats_pointer_resp++; 113 pTarang->stDroppedAppCntrlMsgs.stats_pointer_resp++;
114 break; 114 break;
115 case IDLE_MODE_STATUS: 115 case IDLE_MODE_STATUS:
116 pTarang->stDroppedAppCntrlMsgs.idle_mode_status++; 116 pTarang->stDroppedAppCntrlMsgs.idle_mode_status++;
117 break; 117 break;
118 case AUTH_SS_HOST_MSG: 118 case AUTH_SS_HOST_MSG:
119 pTarang->stDroppedAppCntrlMsgs.auth_ss_host_msg++; 119 pTarang->stDroppedAppCntrlMsgs.auth_ss_host_msg++;
120 break; 120 break;
121 default: 121 default:
122 pTarang->stDroppedAppCntrlMsgs.low_priority_message++; 122 pTarang->stDroppedAppCntrlMsgs.low_priority_message++;
123 break; 123 break;
124 } 124 }
125 125
126 continue; 126 continue;
@@ -154,10 +154,9 @@ int control_packet_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object
154 while (1) 154 while (1)
155 { 155 {
156 wait_event_interruptible(Adapter->process_rx_cntrlpkt, 156 wait_event_interruptible(Adapter->process_rx_cntrlpkt,
157 atomic_read(&Adapter->cntrlpktCnt) || 157 atomic_read(&Adapter->cntrlpktCnt) ||
158 Adapter->bWakeUpDevice || 158 Adapter->bWakeUpDevice ||
159 kthread_should_stop() 159 kthread_should_stop());
160 );
161 160
162 161
163 if (kthread_should_stop()) 162 if (kthread_should_stop())
@@ -169,7 +168,7 @@ int control_packet_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object
169 { 168 {
170 Adapter->bWakeUpDevice = FALSE; 169 Adapter->bWakeUpDevice = FALSE;
171 if ((FALSE == Adapter->bTriedToWakeUpFromlowPowerMode) && 170 if ((FALSE == Adapter->bTriedToWakeUpFromlowPowerMode) &&
172 ((TRUE == Adapter->IdleMode) || (TRUE == Adapter->bShutStatus))) 171 ((TRUE == Adapter->IdleMode) || (TRUE == Adapter->bShutStatus)))
173 { 172 {
174 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "Calling InterfaceAbortIdlemode\n"); 173 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "Calling InterfaceAbortIdlemode\n");
175 // Adapter->bTriedToWakeUpFromlowPowerMode = TRUE; 174 // Adapter->bTriedToWakeUpFromlowPowerMode = TRUE;