[RAMEN9610-21416]wlbt: update with 10.16.0.0
authorYoungsoo <youngss.kim@samsung.com>
Thu, 13 Feb 2020 04:54:11 +0000 (13:54 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:39 +0000 (20:23 +0300)
Change-Id: If33b49fef8665adeee976c150dfe0d7bc537f7aa
Signed-off-by: Youngsoo <youngss.kim@samsung.com>
109 files changed:
drivers/misc/samsung/kic/slsi_kic_core.c [changed mode: 0755->0644]
drivers/misc/samsung/kic/slsi_kic_internal.h [changed mode: 0755->0644]
drivers/misc/samsung/kic/slsi_kic_sap_ant.c [changed mode: 0755->0644]
drivers/misc/samsung/kic/slsi_kic_sap_bt.c [changed mode: 0755->0644]
drivers/misc/samsung/kic/slsi_kic_sap_cm.c [changed mode: 0755->0644]
drivers/misc/samsung/kic/slsi_kic_sap_wifi.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/client_test.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/fw_panic_record.c
drivers/misc/samsung/scsc/fw_panic_record.h
drivers/misc/samsung/scsc/mif_reg.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mif_reg_S5E7872.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mif_reg_smapper.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc/miframman.c
drivers/misc/samsung/scsc/mx140_clk.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mx250_fm.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mx_dbg_sampler.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mxman.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mxman.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mxsyserr.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/mxsyserr.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc/platform_mif.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/platform_mif_3830.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/platform_mif_9610.c
drivers/misc/samsung/scsc/scsc_mx_module.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/scsc_service.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/scsc_wifilogger_types.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc/scsc_wlbtd.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc/srvman.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc_bt/scsc_bluez.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc_bt/scsc_bt_hci.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc_bt/scsc_bt_module.c [changed mode: 0755->0644]
drivers/misc/samsung/scsc_bt/scsc_bt_priv.h [changed mode: 0755->0644]
drivers/misc/samsung/scsc_bt/scsc_shm.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/Kconfig [changed mode: 0755->0644]
drivers/net/wireless/scsc/Makefile [changed mode: 0755->0644]
drivers/net/wireless/scsc/acm_api.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/ba.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/ba.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/cac.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/cac.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/cfg80211_ops.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/cfg80211_ops.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/cm_if.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/const.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/debug.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/debug_frame.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/dev.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/dev.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/fw_test.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/fw_test.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/hip.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/hip.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/hip4.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/hip4.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/hip4_sampler.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/hip4_sampler.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/ioctl.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/ioctl.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/kic.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/log_clients.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/mbulk.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/mbulk.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/mgt.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/mgt.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/mib.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/mib.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/mib_text_convert.c
drivers/net/wireless/scsc/mlme.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/mlme.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/mlme_nan.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/netif.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/netif.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/nl80211_vendor.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/nl80211_vendor.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/nl80211_vendor_nan.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/nl80211_vendor_nan.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/procfs.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/reg_info.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/reg_info.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/rx.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/sap.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/sap_dbg.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/sap_ma.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/sap_mlme.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/sap_mlme.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/scsc_wifi_cm_if.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/scsc_wifi_fcq.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/scsc_wifi_fcq.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/src_sink.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/test/Makefile [changed mode: 0755->0644]
drivers/net/wireless/scsc/test/dev_test.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/test/hip_test.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/test/hydra_test.c
drivers/net/wireless/scsc/test/udi_test.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/test/unittest.h [changed mode: 0755->0644]
drivers/net/wireless/scsc/tx.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/udi.c [changed mode: 0755->0644]
drivers/net/wireless/scsc/utils.h [changed mode: 0755->0644]
include/scsc/api/asmhcp.h [changed mode: 0755->0644]
include/scsc/api/bsmhcp.h [changed mode: 0755->0644]
include/scsc/api/bt_audio.h [changed mode: 0755->0644]
include/scsc/kic/slsi_kic.h [changed mode: 0755->0644]
include/scsc/kic/slsi_kic_ant.h [changed mode: 0755->0644]
include/scsc/kic/slsi_kic_bt.h [changed mode: 0755->0644]
include/scsc/kic/slsi_kic_cm.h [changed mode: 0755->0644]
include/scsc/kic/slsi_kic_prim.h [changed mode: 0755->0644]
include/scsc/kic/slsi_kic_wifi.h [changed mode: 0755->0644]
include/scsc/scsc_mx.h [changed mode: 0755->0644]
include/scsc/scsc_release.h

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 4d31ddcb792dbd962ecff94c1f89cb95fea5ff0b..0fc952b6f8a9851ff93bfbd08dd73d5ee434d848 100644 (file)
  */
 #define R4_PANIC_RECORD_VERSION_2 2
 #define R4_PANIC_RECORD_LENGTH_INDEX_V2 1
+#define R4_PANIC_STACK_RECORD_OFFSET_INDEX_V2 52
 #define R4_PANIC_RECORD_MAX_LENGTH_V2 256
 
+/* Panic stack record (optional) - linked to from panic record */
+#define R4_PANIC_STACK_RECORD_VERSION_1 1
+#define R4_PANIC_STACK_RECORD_VERSION_INDEX 0
+#define R4_PANIC_STACK_RECORD_LENGTH_INDEX 1
+#define R4_PANIC_STACK_RECORD_MAX_LENGTH 256
+
 /*
  * version 1 mr4 panic record defs
  */
@@ -48,7 +55,7 @@ static u32 xor32(uint32_t seed, const u32 data[], size_t len)
 
 static void panic_record_dump(u32 *panic_record, u32 panic_record_length, bool r4)
 {
-       int i;
+       u32 i;
 
        SCSC_TAG_INFO(FW_PANIC, "%s panic record dump(length=%d):\n",
                      r4 ? "R4" : "M4", panic_record_length);
@@ -57,7 +64,18 @@ static void panic_record_dump(u32 *panic_record, u32 panic_record_length, bool r
                              r4 ? "r4" : "m4", i, panic_record[i]);
 }
 
-static bool fw_parse_r4_panic_record_v2(u32 *r4_panic_record, u32 *r4_panic_record_length)
+static void panic_stack_record_dump(u32 *panic_stack_record, u32 panic_stack_record_length, bool r4)
+{
+       u32 i;
+
+       SCSC_TAG_INFO(FW_PANIC, "%s panic stack_record dump(length=%d):\n",
+                     r4 ? "R4" : "M4", panic_stack_record_length);
+       for (i = 0; i < panic_stack_record_length; i++)
+               SCSC_TAG_INFO(FW_PANIC, "%s_panic_stack_record[%d] = %08x\n",
+                             r4 ? "r4" : "m4", i, panic_stack_record[i]);
+}
+
+static bool fw_parse_r4_panic_record_v2(u32 *r4_panic_record, u32 *r4_panic_record_length, u32 *r4_panic_stack_record_offset)
 {
        u32 panic_record_cksum;
        u32 calculated_cksum;
@@ -73,6 +91,10 @@ static bool fw_parse_r4_panic_record_v2(u32 *r4_panic_record, u32 *r4_panic_reco
                                      calculated_cksum);
                        panic_record_dump(r4_panic_record, panic_record_length, true);
                        *r4_panic_record_length = panic_record_length;
+                       /* Optionally extract the offset of the panic stack record */
+                       if (r4_panic_stack_record_offset) {
+                               *r4_panic_stack_record_offset = *(r4_panic_record + R4_PANIC_STACK_RECORD_OFFSET_INDEX_V2);
+                       }
                        return true;
                } else {
                        SCSC_TAG_ERR(FW_PANIC, "BAD panic_record_cksum: 0x%x calculated_cksum: 0x%x\n",
@@ -85,6 +107,21 @@ static bool fw_parse_r4_panic_record_v2(u32 *r4_panic_record, u32 *r4_panic_reco
        return false;
 }
 
+static bool fw_parse_r4_panic_stack_record_v1(u32 *r4_panic_stack_record, u32 *r4_panic_stack_record_length)
+{
+       u32 panic_stack_record_length = *(r4_panic_stack_record + R4_PANIC_STACK_RECORD_LENGTH_INDEX) / 4;
+
+       if (panic_stack_record_length < R4_PANIC_STACK_RECORD_MAX_LENGTH) {
+               panic_stack_record_dump(r4_panic_stack_record, panic_stack_record_length, true);
+               *r4_panic_stack_record_length = panic_stack_record_length;
+               return true;
+       } else {
+               SCSC_TAG_ERR(FW_PANIC, "BAD panic_stack_record_length: %d\n",
+                            panic_stack_record_length);
+       }
+       return false;
+}
+
 static bool fw_parse_m4_panic_record_v1(u32 *m4_panic_record, u32 *m4_panic_record_length)
 {
        u32 panic_record_cksum;
@@ -113,7 +150,7 @@ static bool fw_parse_m4_panic_record_v1(u32 *m4_panic_record, u32 *m4_panic_reco
        return false;
 }
 
-bool fw_parse_r4_panic_record(u32 *r4_panic_record, u32 *r4_panic_record_length)
+bool fw_parse_r4_panic_record(u32 *r4_panic_record, u32 *r4_panic_record_length, u32 *r4_panic_stack_record_offset)
 {
        u32 panic_record_version = *(r4_panic_record + PANIC_RECORD_R4_VERSION_INDEX);
 
@@ -125,7 +162,24 @@ bool fw_parse_r4_panic_record(u32 *r4_panic_record, u32 *r4_panic_record_length)
                             panic_record_version);
                break;
        case R4_PANIC_RECORD_VERSION_2:
-               return fw_parse_r4_panic_record_v2(r4_panic_record, r4_panic_record_length);
+               return fw_parse_r4_panic_record_v2(r4_panic_record, r4_panic_record_length, r4_panic_stack_record_offset);
+       }
+       return false;
+}
+
+bool fw_parse_r4_panic_stack_record(u32 *r4_panic_stack_record, u32 *r4_panic_stack_record_length)
+{
+       u32 panic_stack_record_version = *(r4_panic_stack_record + R4_PANIC_STACK_RECORD_VERSION_INDEX);
+
+       SCSC_TAG_INFO(FW_PANIC, "panic_stack_record_version: %d\n", panic_stack_record_version);
+
+       switch (panic_stack_record_version) {
+       default:
+               SCSC_TAG_ERR(FW_PANIC, "BAD panic_stack_record_version: %d\n",
+                            panic_stack_record_version);
+               break;
+       case R4_PANIC_STACK_RECORD_VERSION_1:
+               return fw_parse_r4_panic_stack_record_v1(r4_panic_stack_record, r4_panic_stack_record_length);
        }
        return false;
 }
index 209ae35c237a8f6ace9a4ab267dff09bf4e33e33..7dbd469e251a7d02ec2cf76b75bdebc2c53532cc 100644 (file)
@@ -7,7 +7,9 @@
 #ifndef FW_PANIC_RECORD_H__
 #define FW_PANIC_RECORD_H__
 
-bool fw_parse_r4_panic_record(u32 *r4_panic_record, u32 *r4_panic_record_length);
+bool fw_parse_r4_panic_record(u32 *r4_panic_record, u32 *r4_panic_record_length,
+                             u32 *r4_panic_stack_record_offset);
+bool fw_parse_r4_panic_stack_record(u32 *r4_panic_stack_record, u32 *r4_panic_stack_record_length);
 bool fw_parse_m4_panic_record(u32 *m4_panic_record, u32 *m4_panic_record_length);
 
 bool fw_parse_get_r4_sympathetic_panic_flag(u32 *r4_panic_record);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 4ca7961f312eb4eff800a610783edd4b546954a4..123a8e4953349cc151b909b737b6cd77824f1283 100644 (file)
@@ -55,7 +55,7 @@ void *__miframman_alloc(struct miframman *ram, size_t nbytes, int tag)
        unsigned int available;
        unsigned int i;
        unsigned int min_available_blocks = MIFRAMMAN_NUM_BLOCKS;
-       size_t       num_blocks;
+       size_t       num_blocks = 0;
        void         *free_mem = NULL;
        bool             has_available_blocks = false;
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 6a2544e..0033c1e
@@ -96,6 +96,7 @@ static struct work_struct     wlbtd_work;
 
 #define SCSC_R4_V2_MINOR_52 52
 #define SCSC_R4_V2_MINOR_53 53
+#define SCSC_R4_V2_MINOR_54 54
 
 #define MM_HALT_RSP_TIMEOUT_MS 100
 
@@ -1481,6 +1482,7 @@ static void print_panic_code(u16 code)
 void mxman_show_last_panic(struct mxman *mxman)
 {
        u32 r4_panic_record_length = 0; /* in u32s */
+       u32 r4_panic_stack_record_length = 0;   /* in u32s */
 
        /* Any valid panic? */
        if (mxman->scsc_panic_code == 0)
@@ -1495,7 +1497,8 @@ void mxman_show_last_panic(struct mxman *mxman)
 
        case SCSC_PANIC_ORIGIN_FW:
                SCSC_TAG_INFO(MXMAN, "Last panic was FW:\n");
-               fw_parse_r4_panic_record(mxman->last_panic_rec_r, &r4_panic_record_length);
+               fw_parse_r4_panic_record(mxman->last_panic_rec_r, &r4_panic_record_length, NULL);
+               fw_parse_r4_panic_stack_record(mxman->last_panic_stack_rec_r, &r4_panic_stack_record_length);
                break;
 
        default:
@@ -1519,17 +1522,21 @@ void mxman_show_last_panic(struct mxman *mxman)
 static void process_panic_record(struct mxman *mxman)
 {
        u32 *r4_panic_record = NULL;
+       u32 *r4_panic_stack_record = NULL;
        u32 *m4_panic_record = NULL;
 #ifdef CONFIG_SCSC_MX450_GDB_SUPPORT
        u32 *m4_1_panic_record = NULL;
 #endif
        u32 r4_panic_record_length = 0; /* in u32s */
+       u32 r4_panic_stack_record_offset = 0; /* in bytes */
+       u32 r4_panic_stack_record_length = 0;   /* in u32s */
        u32 m4_panic_record_length = 0; /* in u32s */
 #ifdef CONFIG_SCSC_MX450_GDB_SUPPORT
        u32 m4_1_panic_record_length = 0; /* in u32s */
 #endif
        u32 full_panic_code = 0;
        bool r4_panic_record_ok = false;
+       bool r4_panic_stack_record_ok = false;
        bool m4_panic_record_ok = false;
 #ifdef CONFIG_SCSC_MX450_GDB_SUPPORT
        bool m4_1_panic_record_ok = false;
@@ -1548,7 +1555,8 @@ static void process_panic_record(struct mxman *mxman)
        if ((mxman->scsc_panic_code & SCSC_PANIC_ORIGIN_MASK) == SCSC_PANIC_ORIGIN_FW) {
                if (mxman->fwhdr.r4_panic_record_offset) {
                        r4_panic_record = (u32 *)(mxman->fw + mxman->fwhdr.r4_panic_record_offset);
-                       r4_panic_record_ok = fw_parse_r4_panic_record(r4_panic_record, &r4_panic_record_length);
+                       r4_panic_record_ok = fw_parse_r4_panic_record(r4_panic_record, &r4_panic_record_length,
+                                                                     &r4_panic_stack_record_offset);
                } else {
                        SCSC_TAG_INFO(MXMAN, "R4 panic record doesn't exist in the firmware header\n");
                }
@@ -1583,11 +1591,12 @@ static void process_panic_record(struct mxman *mxman)
                        mxman->scsc_panic_code |= SCSC_PANIC_TECH_UNSP;
                        print_panic_code_legacy(mxman->scsc_panic_code);
                        break;
+               case SCSC_R4_V2_MINOR_54:
                case SCSC_R4_V2_MINOR_53:
                        if (r4_panic_record_ok) {
                                /* Save the last R4 panic record for future display */
-                               BUG_ON(sizeof(mxman->last_panic_rec_r) < SCSC_R4_V2_MINOR_53 * sizeof(u32));
-                               memcpy((u8 *)mxman->last_panic_rec_r, (u8 *)r4_panic_record, SCSC_R4_V2_MINOR_53 * sizeof(u32));
+                               BUG_ON(sizeof(mxman->last_panic_rec_r) < r4_panic_record_length * sizeof(u32));
+                               memcpy((u8 *)mxman->last_panic_rec_r, (u8 *)r4_panic_record, r4_panic_record_length * sizeof(u32));
                                mxman->last_panic_rec_sz = r4_panic_record_length;
 
                                r4_sympathetic_panic_flag = fw_parse_get_r4_sympathetic_panic_flag(r4_panic_record);
@@ -1595,6 +1604,14 @@ static void process_panic_record(struct mxman *mxman)
                                                r4_panic_record_ok,
                                                r4_sympathetic_panic_flag
                                        );
+                               /* Check panic stack if present */
+                               if (r4_panic_record_length >= SCSC_R4_V2_MINOR_54) {
+                                       r4_panic_stack_record = (u32 *)(mxman->fw + r4_panic_stack_record_offset);
+                                       r4_panic_stack_record_ok = fw_parse_r4_panic_stack_record(r4_panic_stack_record, &r4_panic_stack_record_length);
+                               } else {
+                                       r4_panic_stack_record_ok = false;
+                                       r4_panic_stack_record_length = 0;
+                               }
                                if (r4_sympathetic_panic_flag == false) {
                                        /* process R4 record */
                                        SCSC_TAG_INFO(MXMAN, "process R4 record\n");
old mode 100755 (executable)
new mode 100644 (file)
index 0bca17a..6348b65
@@ -82,8 +82,10 @@ struct mxman {
        u32                     rf_hw_ver;
        u16                     scsc_panic_code;
        u64                     last_panic_time;
-       u32                     last_panic_rec_r[PANIC_RECORD_SIZE]; /* Must be at least SCSC_R4_V2_MINOR_53 */
+       u32                     last_panic_rec_r[PANIC_RECORD_SIZE]; /* Must be at least SCSC_R4_V2_MINOR_54 */
        u16                     last_panic_rec_sz;
+       u32                     last_panic_stack_rec_r[PANIC_STACK_RECORD_SIZE]; /* Must be at least SCSC_R4_V2_MINOR_54 */
+       u16                     last_panic_stack_rec_sz;
        struct mx_syserr_decode last_syserr;
        unsigned long           last_syserr_recovery_time; /* In jiffies */
        bool                    notify;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 7a465c323eefcec1a58ab74521b46a3b8443e28f..fb4ecde0014b3943f188bb8de4ad53760d7d23b7 100644 (file)
@@ -588,8 +588,6 @@ irqreturn_t platform_wdog_isr(int irq, void *data)
        platform_int_debug(platform);
 
        if (platform->reset_request_handler != platform_mif_irq_reset_request_default_handler) {
-               disable_irq_nosync(platform->wlbt_irq[PLATFORM_MIF_WDOG].irq_num);
-               platform->reset_request_handler(irq, platform->irq_reset_request_dev);
                if (platform->boot_state == WLBT_BOOT_WAIT_CFG_REQ) {
                        /* Spurious interrupt from the SOC during CFG_REQ phase, just consume it */
                        SCSC_TAG_INFO_DEV(PLAT_MIF, platform->dev, "Spurious wdog irq during cfg_req phase\n");
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index e8128d8..b4a2620
@@ -611,6 +611,10 @@ struct slsi_vif_sta {
        u8                      *rsn_ie;
        u8                      rsn_ie_len;
 #endif
+
+       /* Storing channel bitmap to use it for setting cached channels */
+       u16                     channels_24_ghz;
+       u32                     channels_5_ghz;
 };
 
 struct slsi_vif_unsync {
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index cca60b7..a8650fd
@@ -4,6 +4,9 @@
  *
  ****************************************************************************/
 
+#ifndef __HIP4_SAMPLER_H__
+#define __HIP4_SAMPLER_H__
+
 #include <linux/proc_fs.h>
 #include <linux/version.h>
 #include <linux/seq_file.h>
 
 #include "dev.h"
 
-/* TCP send buffer sizes */
-extern int sysctl_tcp_wmem[3];
-
-#ifndef __HIP4_SAMPLER_H__
-#define __HIP4_SAMPLER_H__
-
 #define HIP4_SAMPLER_SIGNAL_CTRLTX      0x20
 #define HIP4_SAMPLER_SIGNAL_CTRLRX      0x21
 #define HIP4_SAMPLER_THROUG             0x22
old mode 100755 (executable)
new mode 100644 (file)
index cedea9a..a138303
@@ -371,7 +371,8 @@ static ssize_t slsi_p2p_ecsa(struct net_device *dev, char *command)
        group_dev = slsi_get_netdev(sdev, SLSI_NET_INDEX_P2PX_SWLAN);
        if (!group_dev) {
                SLSI_INFO(sdev, "No Group net_dev found\n");
-               return -EINVAL;
+               result = -EINVAL;
+               goto exit;
        }
        readbyte = slsi_str_to_int(&ecsa_params[offset], &channel);
        if (!readbyte) {
@@ -1008,7 +1009,7 @@ static ssize_t slsi_freq_band_write(struct net_device *dev, uint band)
                return -EINVAL;
        }
 
-       if (band < 0 || band > 2) {
+       if (band > 2) {
                SLSI_ERR(sdev, "Invalid Band: Must be 0/1/2 Not '%c'\n", band);
                SLSI_MUTEX_UNLOCK(sdev->device_config_mutex);
                return -EINVAL;
@@ -1026,6 +1027,10 @@ static ssize_t slsi_freq_band_write(struct net_device *dev, uint band)
        SLSI_DBG1_NODEV(SLSI_MLME, "mlme_set_band_req(vif:%u band:%u)\n", ndev_vif->ifnum, band);
 
        req = fapi_alloc(mlme_set_band_req, MLME_SET_BAND_REQ, ndev_vif->ifnum, 0);
+       if (!req) {
+               SLSI_MUTEX_UNLOCK(ndev_vif->vif_mutex);
+               return -EIO;
+       }
        fapi_set_u16(req, u.mlme_set_band_req.vif, ndev_vif->ifnum);
        fapi_set_u16(req, u.mlme_set_band_req.band, band);
        cfm = slsi_mlme_req_cfm(sdev, dev, req, MLME_SET_BAND_CFM);
@@ -1987,6 +1992,10 @@ static ssize_t slsi_set_ncho_mode(struct net_device *dev, int mode)
        SLSI_DBG1_NODEV(SLSI_MLME, "mlme_set_roaming_type_req(vif:%u mode:%u)\n", ndev_vif->ifnum, mode);
 
        req = fapi_alloc(mlme_set_roaming_type_req, MLME_SET_ROAMING_TYPE_REQ, ndev_vif->ifnum, 0);
+       if (!req) {
+               SLSI_MUTEX_UNLOCK(ndev_vif->vif_mutex);
+               return -EIO;
+       }
        fapi_set_u16(req, u.mlme_set_roaming_type_req.vif, ndev_vif->ifnum);
        fapi_set_u16(req, u.mlme_set_roaming_type_req.roaming_type, mode);
        cfm = slsi_mlme_req_cfm(sdev, dev, req, MLME_SET_ROAMING_TYPE_CFM);
@@ -3470,9 +3479,11 @@ int slsi_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 #ifdef CONFIG_SCSC_LOG_COLLECTION
                scsc_log_collector_schedule_collection(SCSC_LOG_DUMPSTATE, SCSC_LOG_DUMPSTATE_REASON_DRIVERDEBUGDUMP);
 #else
+#ifndef SLSI_TEST_DEV
                ret = mx140_log_dump();
 #endif
 #endif
+#endif
 #ifdef CONFIG_SCSC_WLAN_ENHANCED_PKT_FILTER
        } else if ((strncasecmp(command, CMD_ENHANCED_PKT_FILTER, strlen(CMD_ENHANCED_PKT_FILTER)) == 0)) {
                const u8 enable = *(command + strlen(CMD_ENHANCED_PKT_FILTER) + 1) - '0';
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index cd96116..d9d2b92
@@ -121,6 +121,7 @@ static ssize_t sysfs_store_macaddr(struct kobject *kobj,
 /* Register sysfs mac address override */
 void slsi_create_sysfs_macaddr(void)
 {
+#ifndef SLSI_TEST_DEV
        int r;
 
        wifi_kobj_ref = mxman_wifi_kobject_ref_get();
@@ -137,6 +138,7 @@ void slsi_create_sysfs_macaddr(void)
        } else {
                pr_err("failed to create /sys/wifi/mac_addr\n");
        }
+#endif
 }
 
 /* Unregister sysfs mac address override */
@@ -356,8 +358,10 @@ static void write_wifi_version_info_file(struct slsi_dev *sdev)
                return;
        }
 #endif
+#ifndef SLSI_TEST_DEV
        mxman_get_fw_version(build_id_fw, 128);
        mxman_get_driver_version(build_id_drv, 64);
+#endif
 
        /* WARNING:
         * Please do not change the format of the following string
@@ -677,7 +681,6 @@ int slsi_start(struct slsi_dev *sdev)
                        goto err_hip_started;
                }
        }
-
        if (sdev->regdb.regdb_state == SLSI_REG_DB_SET) {
                sdev->reg_dom_version = ((sdev->regdb.db_major_version & 0xFF) << 8) |
                                        (sdev->regdb.db_minor_version & 0xFF);
@@ -692,6 +695,7 @@ int slsi_start(struct slsi_dev *sdev)
        }
 
        memcpy(alpha2, sdev->device_config.domain_info.regdomain->alpha2, 2);
+
        /* unifiDefaultCountry != world_domain */
        if (!(alpha2[0] == '0' && alpha2[1] == '0'))
                /* Read the regulatory params for the country*/
@@ -1305,10 +1309,12 @@ static int slsi_mib_open_file(struct slsi_dev *sdev, struct slsi_dev_mib_info *m
 
        if (!mib_file_name || !fw)
                return -EINVAL;
+#ifdef CONFIG_SCSC_LOG_COLLECTION
        if (index > SLSI_WLAN_MAX_MIB_FILE + 1) {
                SLSI_ERR(sdev, "collect mib index is invalid:%d\n", index);
                return -EINVAL;
        }
+#endif
        mib_info->mib_data = NULL;
        mib_info->mib_len = 0;
        mib_info->mib_hash = 0; /* Reset mib hash value */
@@ -1626,9 +1632,9 @@ static int slsi_mib_initial_get(struct slsi_dev *sdev)
                }
                SLSI_DBG1(sdev, SLSI_CFG80211, "Value for NAN enabled mib : %d\n", sdev->nan_enabled);
 
-               if (values[++mib_index].type != SLSI_MIB_TYPE_NONE) { /* UnifiForcedScheduleDuration */
+               if (values[++mib_index].type != SLSI_MIB_TYPE_NONE) { /* UnifiDefaultDwellTime */
                        SLSI_CHECK_TYPE(sdev, values[mib_index].type, SLSI_MIB_TYPE_UINT);
-                       sdev->fw_dwell_time = values[mib_index].u.uintValue;
+                       sdev->fw_dwell_time = (values[mib_index].u.uintValue) * 1024; /* Conveting TU to Microseconds */
                } else {
                        SLSI_WARN(sdev, "Error reading UnifiForcedScheduleDuration\n");
                }
@@ -4605,7 +4611,7 @@ u8 slsi_get_exp_peer_frame_subtype(u8 subtype)
 
 void slsi_wlan_dump_public_action_subtype(struct slsi_dev *sdev, struct ieee80211_mgmt *mgmt, bool tx)
 {
-       u8 action_code = ((u8 *)&mgmt->u.action.u)[0];
+       int action_code = ((int *)&mgmt->u.action.u)[0];
        u8 action_category = mgmt->u.action.category;
        char *tx_rx_string = "Received";
        char wnm_action_fields[28][35] = { "Event Request", "Event Report", "Diagnostic Request",
@@ -5001,7 +5007,7 @@ int slsi_roam_channel_cache_get_channels_int(struct net_device *dev, struct slsi
        return index;
 }
 
-static struct slsi_roaming_network_map_entry *slsi_roam_channel_cache_get(struct net_device *dev, const u8 *ssid)
+struct slsi_roaming_network_map_entry *slsi_roam_channel_cache_get(struct net_device *dev, const u8 *ssid)
 {
        struct slsi_roaming_network_map_entry *network_map = NULL;
        struct netdev_vif *ndev_vif = netdev_priv(dev);
@@ -5031,18 +5037,6 @@ u32 slsi_roam_channel_cache_get_channels(struct net_device *dev, const u8 *ssid,
        return channels_count;
 }
 
-static bool slsi_roam_channel_cache_single_ap(struct net_device *dev, const u8 *ssid)
-{
-       bool only_one_ap_seen = true;
-       struct slsi_roaming_network_map_entry *network_map;
-
-       network_map = slsi_roam_channel_cache_get(dev, ssid);
-       if (network_map)
-               only_one_ap_seen = network_map->only_one_ap_seen;
-
-       return only_one_ap_seen;
-}
-
 int slsi_roaming_scan_configure_channels(struct slsi_dev *sdev, struct net_device *dev, const u8 *ssid, u8 *channels)
 {
        struct netdev_vif *ndev_vif = netdev_priv(dev);
@@ -5055,11 +5049,6 @@ int slsi_roaming_scan_configure_channels(struct slsi_dev *sdev, struct net_devic
        WARN_ON(ndev_vif->vif_type != FAPI_VIFTYPE_STATION);
 
        cached_channels_count = slsi_roam_channel_cache_get_channels(dev, ssid, channels);
-       if (slsi_roam_channel_cache_single_ap(dev,  ssid)) {
-               SLSI_NET_DBG3(dev, SLSI_MLME, "Skip Roaming Scan for Single AP %.*s\n", ssid[1], &ssid[2]);
-               return 0;
-       }
-
        SLSI_NET_DBG3(dev, SLSI_MLME, "Roaming Scan Channels. %d cached\n", cached_channels_count);
 
        return cached_channels_count;
old mode 100755 (executable)
new mode 100644 (file)
index 04d7ff6..7ebbe90
@@ -569,6 +569,8 @@ int slsi_read_disconnect_ind_timeout(struct slsi_dev *sdev, u16 psid);
 int slsi_read_regulatory_rules(struct slsi_dev *sdev, struct slsi_802_11d_reg_domain *domain_info, const char *alpha2);
 int slsi_read_regulatory_rules_fw(struct slsi_dev *sdev, struct slsi_802_11d_reg_domain *domain_info, const char *alpha2);
 int slsi_send_acs_event(struct slsi_dev *sdev, struct slsi_acs_selected_channels acs_selected_channels);
+struct slsi_roaming_network_map_entry *slsi_roam_channel_cache_get(struct net_device *dev, const u8 *ssid);
+int slsi_roam_channel_cache_get_channels_int(struct net_device *dev, struct slsi_roaming_network_map_entry *network_map, u8 *channels);
 #ifdef CONFIG_SCSC_WLAN_ENABLE_MAC_RANDOMISATION
 int slsi_set_mac_randomisation_mask(struct slsi_dev *sdev, u8 *mac_address_mask);
 #endif
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index dc6e63eb81ae04c0165f883bcaac4eed8b96d4ba..64b1da523e3bd3828af2b0eb3cefa6b9922793fc 100644 (file)
@@ -294,6 +294,10 @@ static bool CsrWifiMibConvertTextAppend(const char *mibText, struct slsi_mib_dat
                                strSize++;
                        if (strSize > 2) {
                                char *line = kmalloc(strSize + 1, GFP_KERNEL);
+                               if (!line) {
+                                       SLSI_ERR_NODEV("Memory allocation failed!\n", line);
+                                       return false;
+                               }
                                (void)strncpy(line, lineStart, strSize);
                                line[strSize] = '\0';
                                if (!CsrWifiMibConvertTextParseLine(line, mibDataSet, mibDataGet)) {
old mode 100755 (executable)
new mode 100644 (file)
index d6b8c87..06bc512
@@ -3309,7 +3309,7 @@ int slsi_mlme_wifisharing_permitted_channels(struct slsi_dev *sdev, struct net_d
        struct sk_buff    *cfm;
        int               r = 0;
 
-       WARN_ON(!SLSI_MUTEX_IS_LOCKED(ndev_vif->vif_mutex));
+       SLSI_MUTEX_LOCK(ndev_vif->vif_mutex);
 
        req = fapi_alloc(mlme_wifisharing_permitted_channels_req, MLME_WIFISHARING_PERMITTED_CHANNELS_REQ,
                         ndev_vif->ifnum, 8);
@@ -3894,7 +3894,7 @@ void slsi_mlme_reassociate_resp(struct slsi_dev *sdev, struct net_device *dev)
 }
 
 int slsi_mlme_add_range_req(struct slsi_dev *sdev, u8 count,
-                           struct slsi_rtt_config *nl_rtt_params, u16 rtt_id, u16 vif_idx, u8 *source_addr)
+                           struct slsi_rtt_config *nl_rtt_params, u16 rtt_id, u8 *source_addr)
 {
        struct sk_buff *req;
        struct sk_buff *rx;
@@ -3912,13 +3912,14 @@ int slsi_mlme_add_range_req(struct slsi_dev *sdev, u8 count,
        SLSI_DBG2(sdev, SLSI_MLME, "count:%d allocated data size: %d, source_addr:%pM\n",
                  count, alloc_data_size, source_addr);
        /*fill the data */
-       fapi_set_u16(req, u.mlme_add_range_req.vif, vif_idx);
+       fapi_set_u16(req, u.mlme_add_range_req.vif, 0);
        fapi_set_u16(req, u.mlme_add_range_req.rtt_id, rtt_id);
        fapi_set_memcpy(req, u.mlme_add_range_req.device_address, source_addr);
        for (i = 0; i < count; i++) {
                fapi_append_data(req, fapi_ie_generic, sizeof(fapi_ie_generic));
                fapi_append_data(req, nl_rtt_params[i].peer_addr, ETH_ALEN);
-               fapi_append_data(req, (u8 *)&nl_rtt_params[i].type, 2);
+               fapi_append_data(req, (u8 *)&nl_rtt_params[i].rtt_peer, 1);
+               fapi_append_data(req, (u8 *)&nl_rtt_params[i].rtt_type, 1);
                fapi_append_data(req, (u8 *)&nl_rtt_params[i].channel_freq, 2);
                fapi_append_data(req, (u8 *)&nl_rtt_params[i].burst_period, 1);
                fapi_append_data(req, (u8 *)&nl_rtt_params[i].num_burst, 1);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 41b040a..116e42e
@@ -1970,11 +1970,7 @@ static struct sk_buff *slsi_netif_tcp_ack_suppression_pkt(struct net_device *dev
        if (be16_to_cpu(ip_hdr(skb)->tot_len) > ((ip_hdr(skb)->ihl * 4) + (tcp_hdr(skb)->doff * 4))) {
                SCSC_HIP4_SAMPLER_TCP_DATA(ndev_vif->sdev->minor_prof, tcp_ack->stream_id, be32_to_cpu(tcp_hdr(skb)->seq));
                SCSC_HIP4_SAMPLER_TCP_CWND(ndev_vif->sdev->minor_prof, tcp_ack->stream_id, (skb->sk) ? tcp_sk(skb->sk)->snd_cwnd : 0);
-       #if KERNEL_VERSION(4, 14, 0) >= LINUX_VERSION_CODE
-               SCSC_HIP4_SAMPLER_TCP_SEND_BUG(ndev_vif->sdev->minor_prof, tcp_ack->stream_id, sysctl_tcp_wmem[2]);
-       #else
-               SCSC_HIP4_SAMPLER_TCP_SEND_BUF(ndev_vif->sdev->minor_prof, tcp_ack->stream_id, sysctl_tcp_mem[2]);
-       #endif
+               SCSC_HIP4_SAMPLER_TCP_SEND_BUF(ndev_vif->sdev->minor_prof, tcp_ack->stream_id, (skb->sk) ? (skb->sk)->sk_sndbuf : 0);
                ndev_vif->tcp_ack_stats.tack_hasdata++;
                forward_now = 1;
                goto _forward_now;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 43e2c10..56345df
@@ -1758,25 +1758,46 @@ static int slsi_set_epno_ssid(struct wiphy *wiphy,
                type = nla_type(iter);
                switch (type) {
                case SLSI_ATTRIBUTE_EPNO_MINIMUM_5G_RSSI:
-                       slsi_util_nla_get_u16(iter, &epno_params->min_5g_rssi);
+                       if (slsi_util_nla_get_u16(iter, &epno_params->min_5g_rssi)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        break;
                case SLSI_ATTRIBUTE_EPNO_MINIMUM_2G_RSSI:
-                       slsi_util_nla_get_u16(iter, &epno_params->min_2g_rssi);
+                       if (slsi_util_nla_get_u16(iter, &epno_params->min_2g_rssi)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        break;
                case SLSI_ATTRIBUTE_EPNO_INITIAL_SCORE_MAX:
-                       slsi_util_nla_get_u16(iter, &epno_params->initial_score_max);
+                       if (slsi_util_nla_get_u16(iter, &epno_params->initial_score_max)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        break;
                case SLSI_ATTRIBUTE_EPNO_CUR_CONN_BONUS:
-                       slsi_util_nla_get_u8(iter, &epno_params->current_connection_bonus);
+                       if (slsi_util_nla_get_u8(iter, &epno_params->current_connection_bonus)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        break;
                case SLSI_ATTRIBUTE_EPNO_SAME_NETWORK_BONUS:
-                       slsi_util_nla_get_u8(iter, &epno_params->same_network_bonus);
+                       if (slsi_util_nla_get_u8(iter, &epno_params->same_network_bonus)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        break;
                case SLSI_ATTRIBUTE_EPNO_SECURE_BONUS:
-                       slsi_util_nla_get_u8(iter, &epno_params->secure_bonus);
+                       if (slsi_util_nla_get_u8(iter, &epno_params->secure_bonus)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        break;
                case SLSI_ATTRIBUTE_EPNO_5G_BONUS:
-                       slsi_util_nla_get_u8(iter, &epno_params->band_5g_bonus);
+                       if (slsi_util_nla_get_u8(iter, &epno_params->band_5g_bonus)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        break;
                case SLSI_ATTRIBUTE_EPNO_SSID_LIST:
                        nla_for_each_nested(outer, iter, tmp) {
@@ -1789,7 +1810,10 @@ static int slsi_set_epno_ssid(struct wiphy *wiphy,
                        }
                        break;
                case SLSI_ATTRIBUTE_EPNO_SSID_NUM:
-                       slsi_util_nla_get_u8(iter, &val);
+                       if (slsi_util_nla_get_u8(iter, &val)) {
+                               r = -EINVAL;
+                               goto exit;
+                       }
                        num = (int)val;
                        if (num > SLSI_GSCAN_MAX_EPNO_SSIDS) {
                                SLSI_ERR(sdev, "Cannot support %d SSIDs. max %d\n", num, SLSI_GSCAN_MAX_EPNO_SSIDS);
@@ -2930,8 +2954,7 @@ static int slsi_rtt_set_config(struct wiphy *wiphy, struct wireless_dev *wdev, c
        int tmp, tmp1, tmp2;
        u16 rtt_id = 0;
        u8 num_devices = 0;
-       u16 rtt_peer = SLSI_RTT_PEER_AP;
-       u16 vif_idx = 0;
+       u8 rtt_peer = SLSI_RTT_PEER_AP;
        u16 channel_freq = 0;
 
        SLSI_DBG1_NODEV(SLSI_GSCAN, "SUBCMD_RTT_RANGE_START\n");
@@ -2983,12 +3006,13 @@ static int slsi_rtt_set_config(struct wiphy *wiphy, struct wireless_dev *wdev, c
                                                        return -EINVAL;
                                                break;
                                        case SLSI_RTT_ATTRIBUTE_TARGET_TYPE:
-                                               if (slsi_util_nla_get_u16(inner, &(nl_rtt_params[j].type)))
+                                               if (slsi_util_nla_get_u8(inner, &(nl_rtt_params[j].rtt_type)))
                                                        return -EINVAL;
                                                break;
                                        case SLSI_RTT_ATTRIBUTE_TARGET_PEER:
-                                               if (slsi_util_nla_get_u16(inner, &rtt_peer))
+                                               if (slsi_util_nla_get_u8(inner, &rtt_peer))
                                                        return -EINVAL;
+                                               nl_rtt_params[j].rtt_peer = rtt_peer;
                                                break;
                                        case SLSI_RTT_ATTRIBUTE_TARGET_CHAN_FREQ:
                                                if (slsi_util_nla_get_u16(inner, &channel_freq))
@@ -3058,9 +3082,7 @@ exit:
                        return WIFI_HAL_ERROR_NOT_SUPPORTED;
                }
                ndev_vif = netdev_priv(dev);
-               if (ndev_vif->activated) {
-                       vif_idx = ndev_vif->vif_type;
-               } else {
+               if (!ndev_vif->activated) {
                        SLSI_ERR(sdev, "NAN vif not activated\n");
                        kfree(nl_rtt_params);
                        return -EINVAL;
@@ -3070,12 +3092,12 @@ exit:
                return -ENOTSUPP;
 #endif
        }
-       r = slsi_mlme_add_range_req(sdev, num_devices, nl_rtt_params, rtt_id, vif_idx, source_addr);
+       r = slsi_mlme_add_range_req(sdev, num_devices, nl_rtt_params, rtt_id, source_addr);
        if (r) {
                r = -EINVAL;
                SLSI_ERR_NODEV("Failed to set rtt config\n");
        } else {
-               sdev->rtt_vif[rtt_id] = vif_idx;
+               sdev->rtt_vif[rtt_id] = 0;
                SLSI_DBG1_NODEV(SLSI_GSCAN, "Successfully set rtt config\n");
        }
        kfree(nl_rtt_params);
@@ -3219,11 +3241,7 @@ void slsi_rx_range_ind(struct slsi_dev *sdev, struct net_device *dev, struct sk_
                ip_ptr += 2;
                res |= nla_put_u8(nl_skb, SLSI_RTT_EVENT_ATTR_RETRY_AFTER_DURATION, *ip_ptr++);
 
-               le16_ptr = (__le16 *)&ip_ptr[i];
-               value = le16_to_cpu(*le16_ptr);
-               res |= nla_put_u16(nl_skb, SLSI_RTT_EVENT_ATTR_TYPE, value);
-               ip_ptr += 2;
-
+               res |= nla_put_u8(nl_skb, SLSI_RTT_EVENT_ATTR_TYPE, *ip_ptr++);
                le16_ptr = (__le16 *)&ip_ptr[i];
                value = le16_to_cpu(*le16_ptr);
                res |= nla_put_u16(nl_skb, SLSI_RTT_EVENT_ATTR_RSSI, value);
old mode 100755 (executable)
new mode 100644 (file)
index d6fab3c..43a0369
@@ -921,7 +921,8 @@ struct slsi_rtt_capabilities {
 /* RTT configuration */
 struct slsi_rtt_config {
        u8 peer_addr[ETH_ALEN];                 /* peer device mac address */
-       u16 type;            /* 1-sided or 2-sided RTT */
+       u8 rtt_peer;                  /* optional - peer device hint (STA, P2P, AP) */
+       u8 rtt_type;            /* 1-sided or 2-sided RTT */
        u16 channel_freq;     /* Required for STA-AP mode, optional for P2P, NBD etc. */
        u16 channel_info;
        u8 burst_period;         /* Time interval between bursts (units: 100 ms). */
@@ -1010,7 +1011,7 @@ void slsi_rx_rssi_report_ind(struct slsi_dev *sdev, struct net_device *dev, stru
 int slsi_mib_get_apf_cap(struct slsi_dev *sdev, struct net_device *dev);
 int slsi_mib_get_rtt_cap(struct slsi_dev *sdev, struct net_device *dev, struct slsi_rtt_capabilities *cap);
 int slsi_mlme_add_range_req(struct slsi_dev *sdev, u8 count, struct slsi_rtt_config *nl_rtt_params,
-                           u16 rtt_id, u16 vif_idx, u8 *source_addr);
+                           u16 rtt_id, u8 *source_addr);
 int slsi_mlme_del_range_req(struct slsi_dev *sdev, struct net_device *dev, u16 count, u8 *addr, u16 rtt_id);
 void slsi_rx_range_ind(struct slsi_dev *sdev, struct net_device *dev, struct sk_buff *skb);
 void slsi_rx_range_done_ind(struct slsi_dev *sdev, struct net_device *dev, struct sk_buff *skb);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 3e05711..ac5bdb9
@@ -995,8 +995,10 @@ static int slsi_procfs_fcq_show(struct seq_file *m, void *v)
                        u32                            peer_ps_state_transitions = 0;
                        enum scsc_wifi_fcq_8021x_state cp_state;
 
-                       if (scsc_wifi_fcq_stat_queueset(&ndev_vif->ap.group_data_qs, &queue_stat, &smod, &scod, &cp_state, &peer_ps_state_transitions) != 0)
+                       if (scsc_wifi_fcq_stat_queueset(&ndev_vif->ap.group_data_qs, &queue_stat, &smod, &scod, &cp_state, &peer_ps_state_transitions) != 0) {
+                               SLSI_MUTEX_UNLOCK(ndev_vif->vif_mutex);
                                continue;
+                       }
 
                        seq_printf(m, "|%-12s|%-6d|%-6s|\n%d). smod:%u, scod:%u, netq stops :%u, netq resumes :%u, PS transitions :%u Controlled port :%s\n",
                                   netdev_name(dev),
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 32d9030..bd9d20f
@@ -1110,6 +1110,35 @@ void slsi_rx_scan_done_ind(struct slsi_dev *sdev, struct net_device *dev, struct
                return;
        }
 #endif
+       /* set_cached_channels should be called here as well , apart from connect_ind as */
+       /* we can get an AP with the same SSID in the scan results after connection. */
+       /* This should only be done if we are in connected state.*/
+       if (ndev_vif->vif_type == FAPI_VIFTYPE_STATION && ndev_vif->sta.vif_status == SLSI_VIF_STATUS_CONNECTED &&
+           ndev_vif->iftype != NL80211_IFTYPE_P2P_CLIENT) {
+               const u8 *connected_ssid = NULL;
+               struct slsi_roaming_network_map_entry *network_map;
+               u32 channels_count = 0;
+               u8  channels[SLSI_ROAMING_CHANNELS_MAX];
+               bool channel_bitmaps_matched = false;
+
+               connected_ssid = cfg80211_find_ie(WLAN_EID_SSID, ndev_vif->sta.sta_bss->ies->data,
+                                                 ndev_vif->sta.sta_bss->ies->len);
+               network_map = slsi_roam_channel_cache_get(dev, connected_ssid);
+               if (network_map) {
+                       channel_bitmaps_matched = !(network_map->channels_24_ghz & ~ndev_vif->sta.channels_24_ghz) &&
+                                                 !(network_map->channels_5_ghz & ~ndev_vif->sta.channels_5_ghz);
+                       if (!channel_bitmaps_matched)
+                               channels_count = slsi_roam_channel_cache_get_channels_int(dev, network_map, channels);
+               }
+
+               if (channels_count) {
+                       ndev_vif->sta.channels_24_ghz = network_map->channels_24_ghz;
+                       ndev_vif->sta.channels_5_ghz = network_map->channels_5_ghz;
+                       if (slsi_mlme_set_cached_channels(sdev, dev, channels_count, channels) != 0)
+                               SLSI_NET_ERR(dev, "MLME-SET-CACHED-CHANNELS.req failed\n");
+               }
+       }
+
        scan_id = (scan_id & 0xFF);
 
        if (scan_id == SLSI_SCAN_HW_ID && (ndev_vif->scan[SLSI_SCAN_HW_ID].scan_req ||
@@ -2187,9 +2216,15 @@ void slsi_rx_connect_ind(struct slsi_dev *sdev, struct net_device *dev, struct s
                if (ndev_vif->vif_type == FAPI_VIFTYPE_STATION && ndev_vif->activated && ndev_vif->iftype != NL80211_IFTYPE_P2P_CLIENT) {
 #endif
                        const u8 *ssid = cfg80211_find_ie(WLAN_EID_SSID, assoc_ie, assoc_ie_len);
+                       struct slsi_roaming_network_map_entry *network_map;
                        u8       channels[SLSI_ROAMING_CHANNELS_MAX];
                        u32      channels_count = slsi_roaming_scan_configure_channels(sdev, dev, ssid, channels);
 
+                       network_map = slsi_roam_channel_cache_get(dev, ssid);
+                       if (network_map) {
+                               ndev_vif->sta.channels_24_ghz = network_map->channels_24_ghz;
+                               ndev_vif->sta.channels_5_ghz = network_map->channels_5_ghz;
+                       }
                        if (channels_count)
                                if (slsi_mlme_set_cached_channels(sdev, dev, channels_count, channels) != 0)
                                        SLSI_NET_ERR(dev, "MLME-SET-CACHED-CHANNELS.req failed\n");
@@ -2224,7 +2259,9 @@ void slsi_rx_disconnect_ind(struct slsi_dev *sdev, struct net_device *dev, struc
 #ifdef CONFIG_SCSC_LOG_COLLECTION
        scsc_log_collector_schedule_collection(SCSC_LOG_HOST_WLAN, SCSC_LOG_HOST_WLAN_REASON_DISCONNECT_IND);
 #else
+#ifndef SLSI_TEST_DEV
        mx140_log_dump();
+#endif
 #endif
 
        SLSI_INFO(sdev, "Received DEAUTH, reason = 0\n");
@@ -2256,7 +2293,9 @@ void slsi_rx_disconnected_ind(struct slsi_dev *sdev, struct net_device *dev, str
 #ifdef CONFIG_SCSC_LOG_COLLECTION
        scsc_log_collector_schedule_collection(SCSC_LOG_HOST_WLAN, SCSC_LOG_HOST_WLAN_REASON_DISCONNECTED_IND);
 #else
+#ifndef SLSI_TEST_DEV
        mx140_log_dump();
+#endif
 #endif
        if (reason <= 0xFF) {
                SLSI_INFO(sdev, "Received DEAUTH, reason = %d\n", reason);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 952f829..f61adce
@@ -26,6 +26,7 @@ $(CONFIG_SCSC_WLAN_MODULE)-y += ../fw_test.o
 $(CONFIG_SCSC_WLAN_MODULE)-y += ../cac.o
 $(CONFIG_SCSC_WLAN_MODULE)-y += ../ioctl.o
 $(CONFIG_SCSC_WLAN_MODULE)-y += ../traffic_monitor.o
+$(CONFIG_SCSC_WLAN_MODULE)-y += ../reg_info.o
 # enable GSCAN
 ifeq ($(CONFIG_SCSC_WLAN_GSCAN_ENABLE),y)
 $(CONFIG_SCSC_WLAN_MODULE)-y += ../nl80211_vendor.o
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index d40d9c92b3bdc72890a4598de90dd8289ea8964d..6bd0e3d8f5e21703212c6d6c18dd0e781c586e93 100644 (file)
@@ -72,3 +72,11 @@ void mx140_file_release_conf(struct scsc_mx *mx, const struct firmware *conf)
 void slsi_sm_wlan_service_close(struct slsi_dev *sdev)
 {
 }
+int slsi_sm_recovery_service_stop(struct slsi_dev *sdev)
+{
+       return 0;
+}
+int slsi_sm_recovery_service_close(struct slsi_dev *sdev)
+{
+       return 0;
+}
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 5d559f9..2640c7a
@@ -206,6 +206,7 @@ struct wlbt_fm_params {
 
 
 #define PANIC_RECORD_SIZE                      64
+#define PANIC_STACK_RECORD_SIZE                        256
 #define PANIC_RECORD_DUMP_BUFFER_SZ            4096
 
 /* WARNING: THIS IS INTERRUPT CONTEXT!
index a6370031eb138833aab9fd2a663d49e6d13a4111..e93b37a8178a61d63ca6b8b549cc1e93f55b9b22 100644 (file)
@@ -20,7 +20,7 @@
 
 
 #define SCSC_RELEASE_PRODUCT 10
-#define SCSC_RELEASE_ITERATION 15
+#define SCSC_RELEASE_ITERATION 16
 #define SCSC_RELEASE_CANDIDATE 0
 
 #define SCSC_RELEASE_POINT 0