[NEUS7920-133][9610][7885][7872][7570] wlbt: Kernel logging improvement.
authorHimani Gupta <himani.g2@samsung.com>
Thu, 4 Apr 2019 09:33:51 +0000 (15:03 +0530)
committerYoungmin Nam <youngmin.nam@samsung.com>
Tue, 21 May 2019 10:45:22 +0000 (19:45 +0900)
Host changes for kernel logging improvement.Generate appropriate
logs for initial connection.

Change-Id: Ic4a62660958534aa37a5901a58b5cd19c78af7a7
SCSC-Bug-Id: SSB-51392
Signed-off-by: Himani Gupta <himani.g2@samsung.com>
drivers/net/wireless/scsc/nl80211_vendor.c
drivers/net/wireless/scsc/rx.c

index 9032235e94110ec9b18429c2e4b83d9a0754f1ca..861b2b1ae9fbe9b3dc9c1b604ed6f4d33acfa656 100755 (executable)
@@ -5384,7 +5384,7 @@ void slsi_rx_event_log_indication(struct slsi_dev *sdev, struct net_device *dev,
        tlv_data = fapi_get_data(skb);
 
        SLSI_DBG3(sdev, SLSI_GSCAN,
-                 "slsi_rx_event_log_indication, event id = %d, len = %d\n", event_id, tlv_buffer__len);
+                 "slsi_rx_event_log_indication,event id = %d, len = %d\n", event_id, tlv_buffer__len);
 
 #ifdef CONFIG_SCSC_WIFILOGGER
        SCSC_WLOG_FW_EVENT(WLOG_NORMAL, event_id, timestamp, fapi_get_data(skb), fapi_get_datalen(skb));
@@ -5486,7 +5486,7 @@ void slsi_rx_event_log_indication(struct slsi_dev *sdev, struct net_device *dev,
                SLSI_INFO(sdev, "WIFI_EVENT_AUTH_COMPLETE,Status code:%d\n", status_code);
                break;
        case FAPI_EVENT_WIFI_EVENT_ROAM_ASSOC_COMPLETE:
-               SLSI_INFO(sdev, "WIFI_EVENT_ROAM_ASSOC_COMPLETE\n");
+               SLSI_INFO(sdev, "Received Association Response\n");
                break;
        case WIFI_EVENT_FW_NR_FRAME_REQUEST:
                SLSI_INFO(sdev, "Send Radio Measurement Frame (Neighbor Report Req)\n");
index 1ebcbca519368b4f1d9ed86822b43c0db917c7a7..d8bc79c218f60cbaff114f553806a4c34065f52d 100755 (executable)
@@ -2293,6 +2293,7 @@ void slsi_rx_received_frame_ind(struct slsi_dev *sdev, struct net_device *dev, s
        struct netdev_vif *ndev_vif = netdev_priv(dev);
        u16 data_unit_descriptor = fapi_get_u16(skb, u.mlme_received_frame_ind.data_unit_descriptor);
        u16 frequency = SLSI_FREQ_FW_TO_HOST(fapi_get_u16(skb, u.mlme_received_frame_ind.channel_frequency));
+       u8 *eapol = NULL;
        u8 *eap = NULL;
        u16 protocol = 0;
        u32 dhcp_message_type = SLSI_DHCP_MESSAGE_TYPE_INVALID;
@@ -2403,6 +2404,9 @@ void slsi_rx_received_frame_ind(struct slsi_dev *sdev, struct net_device *dev, s
                dev->last_rx = jiffies;
 #endif
                /* Storing Data for Logging Information */
+               if ((skb->len - sizeof(struct ethhdr)) >= 99)
+                       eapol = skb->data + sizeof(struct ethhdr);
+
                if ((skb->len - sizeof(struct ethhdr)) >= 9) {
                        eap_length = (skb->len - sizeof(struct ethhdr)) - 4;
                        eap = skb->data + sizeof(struct ethhdr);
@@ -2413,7 +2417,26 @@ void slsi_rx_received_frame_ind(struct slsi_dev *sdev, struct net_device *dev, s
                skb->protocol = eth_type_trans(skb, dev);
                protocol = ntohs(skb->protocol);
                if (protocol == ETH_P_PAE) {
-                       if (eap && eap[SLSI_EAPOL_IEEE8021X_TYPE_POS] == SLSI_IEEE8021X_TYPE_EAP_PACKET) {
+                       if (eapol && eapol[SLSI_EAPOL_IEEE8021X_TYPE_POS] == SLSI_IEEE8021X_TYPE_EAPOL_KEY) {
+                               if ((eapol[SLSI_EAPOL_TYPE_POS] == SLSI_EAPOL_TYPE_RSN_KEY ||
+                                    eapol[SLSI_EAPOL_TYPE_POS] == SLSI_EAPOL_TYPE_WPA_KEY) &&
+                                   (eapol[SLSI_EAPOL_KEY_INFO_LOWER_BYTE_POS] &
+                                    SLSI_EAPOL_KEY_INFO_KEY_TYPE_BIT_IN_LOWER_BYTE) &&
+                                   (eapol[SLSI_EAPOL_KEY_INFO_HIGHER_BYTE_POS] &
+                                    SLSI_EAPOL_KEY_INFO_MIC_BIT_IN_HIGHER_BYTE) &&
+                                   (eapol[SLSI_EAPOL_KEY_DATA_LENGTH_HIGHER_BYTE_POS] == 0) &&
+                                   (eapol[SLSI_EAPOL_KEY_DATA_LENGTH_LOWER_BYTE_POS] == 0)) {
+                                       SLSI_INFO(sdev, "Received 4way-H/S, M4\n");
+                               } else if (!(eapol[SLSI_EAPOL_KEY_INFO_HIGHER_BYTE_POS] &
+                                            SLSI_EAPOL_KEY_INFO_MIC_BIT_IN_HIGHER_BYTE)) {
+                                       SLSI_INFO(sdev, "Received 4way-H/S, M1\n");
+                               } else if (eapol[SLSI_EAPOL_KEY_INFO_HIGHER_BYTE_POS] &
+                                          SLSI_EAPOL_KEY_INFO_SECURE_BIT_IN_HIGHER_BYTE) {
+                                       SLSI_INFO(sdev, "Received 4way-H/S, M3\n");
+                               } else {
+                                       SLSI_INFO(sdev, "Received 4way-H/S, M2\n");
+                               }
+                       } else if (eap && eap[SLSI_EAPOL_IEEE8021X_TYPE_POS] == SLSI_IEEE8021X_TYPE_EAP_PACKET) {
                                if (eap[SLSI_EAP_CODE_POS] == SLSI_EAP_PACKET_REQUEST)
                                        SLSI_INFO(sdev, "Received EAP-Request (%d)\n", eap_length);
                                else if (eap[SLSI_EAP_CODE_POS] == SLSI_EAP_PACKET_RESPONSE)