[RAMEN9610-13798][common]Revert "[9610] wlbt: Read FW TxGood, RxGood, TxBad counters"
authorYoungsoo <youngss.kim@samsung.com>
Mon, 25 Mar 2019 05:46:10 +0000 (14:46 +0900)
committerhskang <hs1218.kang@samsung.com>
Mon, 25 Mar 2019 09:50:12 +0000 (18:50 +0900)
This reverts commit 59028f6be4b1a957511e740ff8812aee47f0f013.

Change-Id: I05879f2fb680ee6acc6099f06d95ce977c00bf40

drivers/net/wireless/scsc/mib.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/mlme.c
drivers/net/wireless/scsc/sap_ma.c
drivers/net/wireless/scsc/tx.c

old mode 100755 (executable)
new mode 100644 (file)
index d869efe..cc6f5ab
@@ -732,7 +732,7 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
  * TYPE          : SlsiUint16
  * MIN           : 1
  * MAX           : 100
- * DEFAULT       : 25
+ * DEFAULT       : 30
  * DESCRIPTION   :
  *  The threshold in percentage of CCA busy time when a channel would be
  *  considered busy
@@ -2009,18 +2009,17 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
 #define SLSI_PSID_UNIFI_TRAFFIC_THRESHOLD_TO_SETUP_BA 0x08AE
 
 /*******************************************************************************
- * NAME          : UnifiDplaneTxAmsduHwCapability
+ * NAME          : UnifiDplaneTxAmsduFrameSizeMax
  * PSID          : 2223 (0x08AF)
  * PER INTERFACE?: NO
  * TYPE          : SlsiUint16
  * MIN           : 0
  * MAX           : 65535
- * DEFAULT       :
+ * DEFAULT       : 4098
  * DESCRIPTION   :
- *  Returns 0 if A-MSDU size limited to 4K. Returns 1 is A-MSDU size is
- *  limited to 8K. This value is chip specific and limited by HW.
+ *  Defines the maximum A-MSDU frame size
  *******************************************************************************/
-#define SLSI_PSID_UNIFI_DPLANE_TX_AMSDU_HW_CAPABILITY 0x08AF
+#define SLSI_PSID_UNIFI_DPLANE_TX_AMSDU_FRAME_SIZE_MAX 0x08AF
 
 /*******************************************************************************
  * NAME          : UnifiDplaneTxAmsduSubframeCountMax
@@ -2029,7 +2028,7 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
  * TYPE          : SlsiUint16
  * MIN           : 1
  * MAX           : 4
- * DEFAULT       : 3
+ * DEFAULT       : 2
  * DESCRIPTION   :
  *  Defines the maximum number of A-MSDU sub-frames per A-MSDU. A value of 1
  *  indicates A-MSDU aggregation has been disabled
@@ -2190,20 +2189,6 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
  *******************************************************************************/
 #define SLSI_PSID_UNIFI_RADIO_ON_TIME_NAN 0x08BC
 
-/*******************************************************************************
- * NAME          : UnifiOutputRadioInfoToKernelLog
- * PSID          : 2239 (0x08BF)
- * PER INTERFACE?: NO
- * TYPE          : SlsiBool
- * MIN           : 0
- * MAX           : 1
- * DEFAULT       : FALSE
- * DESCRIPTION   :
- *  Print messages about the radio status to the Android Kernel Log. See
- *  document SC-508266-TC.
- *******************************************************************************/
-#define SLSI_PSID_UNIFI_OUTPUT_RADIO_INFO_TO_KERNEL_LOG 0x08BF
-
 /*******************************************************************************
  * NAME          : UnifiNoAckActivationCount
  * PSID          : 2240 (0x08C0)
@@ -2884,10 +2869,9 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
  * DESCRIPTION   :
  *  Enable reporting of the following events for Android logging: - firmware
  *  connectivity events - fate of management frames sent by the host through
- *  the MLME SAP It can take the following values: - 0: reporting for non
- *  mandetory triggers disabled. EAPOL, security, btm frames and roam
- *  triggers are reported. - 1: partial reporting is enabled. Beacons frames
- *  will not be reported. - 2: full reporting is enabled. Beacons frames are
+ *  the MLME SAP It can take the following values: - 0: reporting is disabled
+ *  - 1: partial reporting is enabled. Beacons and EAPOL frames will not be
+ *  reported - 2: full reporting is enabled. Beacons and EAPOL frames are
  *  included.
  *******************************************************************************/
 #define SLSI_PSID_UNIFI_LOGGER_ENABLED 0x0910
@@ -2906,32 +2890,6 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
  *******************************************************************************/
 #define SLSI_PSID_UNIFI_MA_PACKET_FATE_ENABLED 0x0911
 
-/*******************************************************************************
- * NAME          : UnifiFrameRxCounters
- * PSID          : 2326 (0x0916)
- * PER INTERFACE?: NO
- * TYPE          : SlsiUint32
- * MIN           : 0
- * MAX           : 4294967295
- * DEFAULT       :
- * DESCRIPTION   :
- *  Frame RX Counters used by the host. These are required by MCD.
- *******************************************************************************/
-#define SLSI_PSID_UNIFI_FRAME_RX_COUNTERS 0x0916
-
-/*******************************************************************************
- * NAME          : UnifiFrameTxCounters
- * PSID          : 2327 (0x0917)
- * PER INTERFACE?: NO
- * TYPE          : SlsiUint32
- * MIN           : 0
- * MAX           : 4294967295
- * DEFAULT       :
- * DESCRIPTION   :
- *  Frame TX Counters used by the host. These are required by MCD.
- *******************************************************************************/
-#define SLSI_PSID_UNIFI_FRAME_TX_COUNTERS 0x0917
-
 /*******************************************************************************
  * NAME          : UnifiLaaNssSpeculationIntervalSlotTime
  * PSID          : 2330 (0x091A)
@@ -4623,9 +4581,9 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
  * PSID          : 2583 (0x0A17)
  * PER INTERFACE?: NO
  * TYPE          : SlsiUint16
- * MIN           : 3
- * MAX           : 10
- * DEFAULT       : 8
+ * MIN           : 0
+ * MAX           : 65535
+ * DEFAULT       : 3
  * DESCRIPTION   :
  *  Channel switch announcement count which will be used in the Channel
  *  announcement IE when using wifi sharing
@@ -7125,19 +7083,6 @@ void slsi_mib_buf_append(struct slsi_mib_data *dst, size_t bufferLength, u8 *buf
  *******************************************************************************/
 #define SLSI_PSID_UNIFI_DUAL_BAND_CONCURRENCY 0x17EB
 
-/*******************************************************************************
- * NAME          : UnifiLoggerMaxDelayedEvents
- * PSID          : 6124 (0x17EC)
- * PER INTERFACE?: NO
- * TYPE          : SlsiUint16
- * MIN           : 0
- * MAX           : 65535
- * DEFAULT       : 10
- * DESCRIPTION   :
- *  Maximum number of events to keep when host is suspended.
- *******************************************************************************/
-#define SLSI_PSID_UNIFI_LOGGER_MAX_DELAYED_EVENTS 0x17EC
-
 /*******************************************************************************
  * NAME          : UnifiRegulatoryParameters
  * PSID          : 8011 (0x1F4B)
index efe6eaa5309518b3c944acaaf53f04d5dd871f48..4d8d3a793737b33f989e8ef952e87ff673526247 100755 (executable)
@@ -2612,12 +2612,11 @@ int slsi_mlme_get_sinfo_mib(struct slsi_dev *sdev, struct net_device *dev,
                { SLSI_PSID_UNIFI_TX_DATA_RATE, { 0, 0 } },         /* to get STATION_INFO_TX_BITRATE*/
                { SLSI_PSID_UNIFI_RSSI, { 0, 0 } },                 /* to get STATION_INFO_SIGNAL_AVG*/
                { SLSI_PSID_UNIFI_THROUGHPUT_DEBUG, { 3, 0 } },     /* bad_fcs_count*/
+               { SLSI_PSID_UNIFI_THROUGHPUT_DEBUG, { 10, 0 } },    /* mpdus_failed_transmit*/
                { SLSI_PSID_UNIFI_THROUGHPUT_DEBUG, { 25, 0 } },    /* mac_bad_sig_count*/
                { SLSI_PSID_UNIFI_THROUGHPUT_DEBUG, { 30, 0 } },    /* rx_error_count*/
-               { SLSI_PSID_UNIFI_FRAME_TX_COUNTERS, { 1, 0 } },    /*tx good count*/
-               { SLSI_PSID_UNIFI_FRAME_TX_COUNTERS, { 2, 0 } },    /*tx bad count*/
-               { SLSI_PSID_UNIFI_FRAME_RX_COUNTERS, { 1, 0 } },    /*rx good count*/
        };
+       int tx_counter = 0;
        int rx_counter = 0;
 
        WARN_ON(!SLSI_MUTEX_IS_LOCKED(ndev_vif->vif_mutex));
@@ -2638,9 +2637,9 @@ int slsi_mlme_get_sinfo_mib(struct slsi_dev *sdev, struct net_device *dev,
 
        /* Fixed fields len (5) : 2 bytes(PSID) + 2 bytes (Len) + 1 byte (VLDATA header )  [10 for 2 PSIDs]
         * Data : 3 bytes for SLSI_PSID_UNIFI_TX_DATA_RATE , 1 byte for SLSI_PSID_UNIFI_RSSI
-        * 10*6 bytes for 3 Throughput Mib's and 3 counter Mib's
+        * 10*5 bytes for 5 Throughput Mib's
         */
-       mibrsp.dataLength = 74;
+       mibrsp.dataLength = 64;
        mibrsp.data = kmalloc(mibrsp.dataLength, GFP_KERNEL);
 
        if (!mibrsp.data) {
@@ -2694,32 +2693,26 @@ int slsi_mlme_get_sinfo_mib(struct slsi_dev *sdev, struct net_device *dev,
                        rx_counter += values[2].u.uintValue; /*bad_fcs_count*/
                else
                        SLSI_ERR(sdev, "invalid type. iter:%d", 2);
+
                if (values[3].type == SLSI_MIB_TYPE_UINT)
-                       rx_counter += values[3].u.uintValue; /*mac_bad_sig_count*/
+                       tx_counter += values[3].u.uintValue; /*mpdus_failed_transmit*/
                else
                        SLSI_ERR(sdev, "invalid type. iter:%d", 3);
                if (values[4].type == SLSI_MIB_TYPE_UINT)
-                       rx_counter += values[4].u.uintValue; /*rx_error_count*/
+                       rx_counter += values[4].u.uintValue; /*mac_bad_sig_count*/
                else
                        SLSI_ERR(sdev, "invalid type. iter:%d", 4);
                if (values[5].type == SLSI_MIB_TYPE_UINT)
-                       peer->sinfo.tx_packets = values[5].u.uintValue; /*tx good count*/
+                       rx_counter += values[5].u.uintValue; /*rx_error_count*/
                else
                        SLSI_ERR(sdev, "invalid type. iter:%d", 5);
-               if (values[6].type == SLSI_MIB_TYPE_UINT)
-                       peer->sinfo.tx_failed = values[6].u.uintValue; /*tx bad count*/
-               else
-                       SLSI_ERR(sdev, "invalid type. iter:%d", 6);
-               if (values[7].type == SLSI_MIB_TYPE_UINT)
-                       peer->sinfo.rx_packets = values[7].u.uintValue; /*rx good count*/
-               else
-                       SLSI_ERR(sdev, "invalid type. iter:%d", 7);
 
+               peer->sinfo.tx_failed = tx_counter;
                peer->sinfo.rx_dropped_misc = rx_counter;
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0))
                peer->sinfo.filled |= BIT(NL80211_STA_INFO_TX_FAILED) | BIT(NL80211_STA_INFO_RX_DROP_MISC) |
-                                     BIT(NL80211_STA_INFO_TX_PACKETS) | BIT(NL80211_STA_INFO_RX_PACKETS);
+                                     BIT(NL80211_STA_INFO_TX_PACKETS);
 #endif
        } else {
                SLSI_NET_DBG1(dev, SLSI_MLME, "mlme_get_req failed(result:0x%4x)\n", r);
index 9f89e5c5944c58e98466890caf5edd63c676ede3..9b5cb9f392149243134c26dda1145f7fb6c7f004 100755 (executable)
@@ -304,6 +304,7 @@ void slsi_rx_data_deliver_skb(struct slsi_dev *sdev, struct net_device *dev, str
                }
 
                if (peer) {
+                       peer->sinfo.rx_packets++;
                        peer->sinfo.rx_bytes += rx_skb->len;
                }
                ndev_vif->stats.rx_packets++;
index 8f9dd06e5bf23cffc15e34ffeff3628e494cec8a..2ae8ac506c3893163b6de52bd8115f5eca621420 100755 (executable)
@@ -127,9 +127,10 @@ static int slsi_tx_eapol(struct slsi_dev *sdev, struct net_device *dev, struct s
        /* EAPOL/WAI frames are send via the MLME */
        tx_bytes_tmp = skb->len; // len copy to avoid null pointer of skb
        ret = slsi_mlme_send_frame_data(sdev, dev, skb, msg_type, 0, dwell_time, 0);
-       if (!ret)
+       if (!ret) {
+               peer->sinfo.tx_packets++;
                peer->sinfo.tx_bytes += tx_bytes_tmp; //skb->len;
-
+       }
        slsi_spinlock_unlock(&ndev_vif->peer_lock);
        return ret;
 }
@@ -409,6 +410,7 @@ int slsi_tx_data(struct slsi_dev *sdev, struct net_device *dev, struct sk_buff *
        /* What about the original if we passed in a copy ? */
        if (original_skb)
                slsi_kfree_skb(original_skb);
+       peer->sinfo.tx_packets++;
        peer->sinfo.tx_bytes += len;
        return ret;
 }