[PATCH 06/12] staging:wlan-ng: clean p80211req_handlemsg

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

 



the switch case doesn't have a break statement of DIDmsg_dot11req_mibget,
and DIDmsg_dot11req_mibset cases, and also cleanup the code to follow
the kernel coding way

Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
---
 drivers/staging/wlan-ng/p80211req.c |   31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c
index 679299f..ccb0601 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -155,24 +155,25 @@ static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg)
 	switch (msg->msgcode) {
 
 	case DIDmsg_lnxreq_hostwep:{
-			struct p80211msg_lnxreq_hostwep *req =
-			    (struct p80211msg_lnxreq_hostwep *) msg;
-			wlandev->hostwep &=
-			    ~(HOSTWEP_DECRYPT | HOSTWEP_ENCRYPT);
-			if (req->decrypt.data == P80211ENUM_truth_true)
-				wlandev->hostwep |= HOSTWEP_DECRYPT;
-			if (req->encrypt.data == P80211ENUM_truth_true)
-				wlandev->hostwep |= HOSTWEP_ENCRYPT;
+		struct p80211msg_lnxreq_hostwep *req =
+			(struct p80211msg_lnxreq_hostwep *) msg;
+		wlandev->hostwep &=
+				~(HOSTWEP_DECRYPT | HOSTWEP_ENCRYPT);
+		if (req->decrypt.data == P80211ENUM_truth_true)
+			wlandev->hostwep |= HOSTWEP_DECRYPT;
+		if (req->encrypt.data == P80211ENUM_truth_true)
+			wlandev->hostwep |= HOSTWEP_ENCRYPT;
 
-			break;
-		}
+	break;
+	}
 	case DIDmsg_dot11req_mibget:
 	case DIDmsg_dot11req_mibset:{
-			int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
-			struct p80211msg_dot11req_mibget *mib_msg =
-			    (struct p80211msg_dot11req_mibget *) msg;
-			p80211req_mibset_mibget(wlandev, mib_msg, isget);
-		}
+		int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
+		struct p80211msg_dot11req_mibget *mib_msg =
+			(struct p80211msg_dot11req_mibget *) msg;
+		p80211req_mibset_mibget(wlandev, mib_msg, isget);
+	break;
+	}
 	}			/* switch msg->msgcode */
 }
 
-- 
1.7.9.5

_______________________________________________
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