You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/02/06 20:40:46 UTC

[nuttx] branch master updated (14f8a6c2dd -> caa16742db)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from 14f8a6c2dd fs: support openat/fchmodat/mkfifoat/fstatat/...at api
     new 5ac638944b arm/backtrace: fix compile warning
     new d5ac2be84f bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid unaligned access
     new 1779433c35 wireless/bcm43xxx/qspi: try tx after rx fails
     new 5c047f634f raspberrypi-pico-w/telnet: enable more configs
     new 1b245664ad arm/rp2040: fix compile warning on boot2 build
     new caa16742db rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/common/arm_backtrace_unwind.c         |   2 +-
 arch/arm/src/rp2040/boot2/Make.defs                |   2 +-
 boards/arm/rp2040/raspberrypi-pico-w/README.txt    |   6 +-
 .../raspberrypi-pico-w/configs/telnet/defconfig    |  24 +-
 drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c    |  54 +--
 .../ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c        |   7 +-
 .../wireless/ieee80211/bcm43xxx/bcmf_interface.c   |   9 +-
 drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h   | 460 ++++++++++++++++-----
 8 files changed, 403 insertions(+), 161 deletions(-)


[nuttx] 02/06: bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid unaligned access

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit d5ac2be84f7e615ecd8a7b4280b0cc2c194fea04
Author: chao an <an...@xiaomi.com>
AuthorDate: Mon Feb 6 16:50:10 2023 +0800

    bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid unaligned access
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h | 460 +++++++++++++++++------
 1 file changed, 347 insertions(+), 113 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h b/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
index a4aa2d6d09..3251780905 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
@@ -57,28 +57,35 @@ typedef uint16_t chanspec_t;
 
 #define ACTION_FRAME_SIZE 1040
 
+begin_packed_struct
 typedef struct wl_action_frame
 {
   struct ether_addr da;
   uint16_t          len;
   uint32_t          packet_id;
   uint8_t           data[ACTION_FRAME_SIZE];
-} wl_action_frame_t;
+}
+end_packed_struct wl_action_frame_t;
 
+begin_packed_struct
 typedef struct ssid_info
 {
   uint8_t ssid_len;
   uint8_t ssid[32];
-} ssid_info_t;
+}
+end_packed_struct ssid_info_t;
 
+begin_packed_struct
 typedef struct cnt_rx
 {
   uint32_t cnt_rxundec;
   uint32_t cnt_rxframe;
-} cnt_rx_t;
+}
+end_packed_struct cnt_rx_t;
 
 #define MCSSET_LEN 16
 
+begin_packed_struct
 typedef struct wl_bss_info
 {
   uint32_t      version;                /* version field */
@@ -115,17 +122,20 @@ typedef struct wl_bss_info
   /* Add new fields here */
 
   /* variable length Information Elements */
-} wl_bss_info_t;
+}
+end_packed_struct wl_bss_info_t;
 
 #define DOT11_CAP_ESS     0x0001
 #define DOT11_CAP_IBSS    0x0002
 #define DOT11_CAP_PRIVACY 0x0010
 
+begin_packed_struct
 typedef struct wlc_ssid
 {
   uint32_t ssid_len;
   uint8_t  SSID[32];
-} wlc_ssid_t;
+}
+end_packed_struct wlc_ssid_t;
 
 #define WL_BSSTYPE_INFRA 1
 #define WL_BSSTYPE_INDEP 0
@@ -133,6 +143,7 @@ typedef struct wlc_ssid
 #define WL_SCANFLAGS_PASSIVE 0x01
 #define WL_SCANFLAGS_PROHIBITED    0x04
 
+begin_packed_struct
 typedef struct wl_scan_params
 {
   wlc_ssid_t         ssid;
@@ -145,7 +156,8 @@ typedef struct wl_scan_params
   int32_t            home_time;
   int32_t            channel_num;
   uint16_t           channel_list[1];
-} wl_scan_params_t;
+}
+end_packed_struct wl_scan_params_t;
 
 #define WL_SCAN_PARAMS_FIXED_SIZE          (64)
 #define WL_SCAN_PARAMS_COUNT_MASK  (0x0000ffff)
@@ -155,23 +167,27 @@ typedef struct wl_scan_params
 #define WL_SCAN_ACTION_ABORT                (3)
 #define ISCAN_REQ_VERSION                   (1)
 
+begin_packed_struct
 typedef struct wl_iscan_params
 {
   uint32_t          version;
   uint16_t          action;
   uint16_t          scan_duration;
   wl_scan_params_t  params;
-} wl_iscan_params_t;
+}
+end_packed_struct wl_iscan_params_t;
 
 #define WL_ISCAN_PARAMS_FIXED_SIZE (offsetof(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
 
+begin_packed_struct
 typedef struct wl_scan_results
 {
   uint32_t       buflen;
   uint32_t       version;
   uint32_t       count;
   wl_bss_info_t  bss_info[1];
-} wl_scan_results_t;
+}
+end_packed_struct wl_scan_results_t;
 
 #define WL_SCAN_RESULTS_FIXED_SIZE  (12)
 #define WL_SCAN_RESULTS_SUCCESS         (0)
@@ -181,16 +197,19 @@ typedef struct wl_scan_results
 #define WL_SCAN_RESULTS_NO_MEM         (4)
 #define ESCAN_REQ_VERSION 1
 
+begin_packed_struct
 typedef struct wl_escan_params
 {
   uint32_t          version;
   uint16_t          action;
   uint16_t          sync_id;
   wl_scan_params_t  params;
-} wl_escan_params_t;
+}
+end_packed_struct wl_escan_params_t;
 
 #define WL_ESCAN_PARAMS_FIXED_SIZE (offsetof(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
 
+begin_packed_struct
 typedef struct wl_escan_result
 {
   uint32_t       buflen;
@@ -198,34 +217,42 @@ typedef struct wl_escan_result
   uint16_t       sync_id;
   uint16_t       bss_count;
   wl_bss_info_t  bss_info[1];
-} wl_escan_result_t;
+}
+end_packed_struct wl_escan_result_t;
 
 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
 
+begin_packed_struct
 typedef struct wl_iscan_results
 {
   uint32_t           status;
   wl_scan_results_t  results;
-} wl_iscan_results_t;
+}
+end_packed_struct wl_iscan_results_t;
 
 #define WL_ISCAN_RESULTS_FIXED_SIZE \
   (WL_SCAN_RESULTS_FIXED_SIZE + offsetof(wl_iscan_results_t, results))
 #define WL_MAXRATES_IN_SET      16  /* max # of rates in a rateset */
 
+begin_packed_struct
 typedef struct wl_rateset
 {
   uint32_t  count;                      /* # rates in this set */
   uint8_t   rates[WL_MAXRATES_IN_SET];  /* rates in 500kbps units w/hi bit set if basic */
-} wl_rateset_t;
+}
+end_packed_struct wl_rateset_t;
 
+begin_packed_struct
 typedef struct wl_uint32_list
 {
   uint32_t count;
   uint32_t element[1];
-} wl_uint32_list_t;
+}
+end_packed_struct wl_uint32_list_t;
 
 /* scan params for extended join */
 
+begin_packed_struct
 typedef struct wl_join_scan_params
 {
   uint8_t scan_type;    /* 0 use default, active or passive scan */
@@ -237,10 +264,12 @@ typedef struct wl_join_scan_params
                          * for passive scanning */
   int32_t home_time;    /* -1 use default, dwell time for the home channel
                          * between channel scans */
-} wl_join_scan_params_t;
+}
+end_packed_struct wl_join_scan_params_t;
 
 /** used for association with a specific BSSID and chanspec list */
 
+begin_packed_struct
 typedef struct wl_assoc_params
 {
   struct ether_addr bssid;            /* 00:00:00:00:00:00: broadcast scan */
@@ -253,7 +282,8 @@ typedef struct wl_assoc_params
   int32_t           chanspec_num;     /* 0: all available channels,
                                        * otherwise count of chanspecs in chanspec_list */
   chanspec_t        chanspec_list[1]; /* list of chanspecs */
-} wl_assoc_params_t;
+}
+end_packed_struct wl_assoc_params_t;
 
 /** used for association to a specific BSSID and channel */
 
@@ -261,6 +291,7 @@ typedef wl_assoc_params_t wl_join_assoc_params_t;
 
 /** extended join params */
 
+begin_packed_struct
 typedef struct wl_extjoin_params
 {
   wlc_ssid_t             ssid;  /* {0, ""}: wildcard scan */
@@ -268,7 +299,8 @@ typedef struct wl_extjoin_params
   wl_join_assoc_params_t assoc; /* optional field, but it must include the fixed portion
                                  * of the wl_join_assoc_params_t struct when it does
                                  * present. */
-} wl_extjoin_params_t;
+}
+end_packed_struct wl_extjoin_params_t;
 
 #define WL_EXTJOIN_PARAMS_FIXED_SIZE \
   (offset(wl_extjoin_params_t, assoc) + WL_JOIN_ASSOC_PARAMS_FIXED_SIZE)
@@ -301,22 +333,27 @@ typedef struct wl_extjoin_params
 #define ANT_SELCFG_TX_DEF                 (2)
 #define ANT_SELCFG_RX_DEF                 (3)
 
+begin_packed_struct
 typedef struct
 {
   uint8_t ant_config[ANT_SELCFG_MAX];
   uint8_t num_antcfg;
-} wlc_antselcfg_t;
+}
+end_packed_struct wlc_antselcfg_t;
 
 #define HIGHEST_SINGLE_STREAM_MCS    (7)
 #define WLC_CNTRY_BUF_SZ    (4)
 
+begin_packed_struct
 typedef struct wl_country
 {
   int8_t    country_abbrev[WLC_CNTRY_BUF_SZ];
   int32_t rev;
   int8_t ccode[WLC_CNTRY_BUF_SZ];
-} wl_country_t;
+}
+end_packed_struct wl_country_t;
 
+begin_packed_struct
 typedef struct wl_channels_in_country
 {
   uint32_t buflen;
@@ -324,8 +361,10 @@ typedef struct wl_channels_in_country
   int8_t country_abbrev[WLC_CNTRY_BUF_SZ];
   uint32_t count;
   uint32_t channel[1];
-} wl_channels_in_country_t;
+}
+end_packed_struct wl_channels_in_country_t;
 
+begin_packed_struct
 typedef struct wl_country_list
 {
   uint32_t buflen;
@@ -333,7 +372,8 @@ typedef struct wl_country_list
   uint32_t band;
   uint32_t count;
   int8_t country_abbrev[1];
-} wl_country_list_t;
+}
+end_packed_struct wl_country_list_t;
 
 #define WL_NUM_RPI_BINS      8
 #define WL_RM_TYPE_BASIC     1
@@ -344,6 +384,7 @@ typedef struct wl_country_list
 #define WL_RM_FLAG_INCAPABLE (1<<2)
 #define WL_RM_FLAG_REFUSED   (1<<3)
 
+begin_packed_struct
 typedef struct wl_rm_req_elt
 {
   int8_t type;
@@ -353,8 +394,10 @@ typedef struct wl_rm_req_elt
   uint32_t tsf_h;
   uint32_t tsf_l;
   uint32_t dur;
-} wl_rm_req_elt_t;
+}
+end_packed_struct wl_rm_req_elt_t;
 
+begin_packed_struct
 typedef struct wl_rm_req
 {
   uint32_t token;
@@ -362,10 +405,12 @@ typedef struct wl_rm_req
   void *cb;
   void *cb_arg;
   wl_rm_req_elt_t req[1];
-} wl_rm_req_t;
+}
+end_packed_struct wl_rm_req_t;
 
 #define WL_RM_REQ_FIXED_LEN    offsetof(wl_rm_req_t, req)
 
+begin_packed_struct
 typedef struct wl_rm_rep_elt
 {
   int8_t type;
@@ -377,22 +422,28 @@ typedef struct wl_rm_rep_elt
   uint32_t dur;
   uint32_t len;
   uint8_t data[1];
-} wl_rm_rep_elt_t;
+}
+end_packed_struct wl_rm_rep_elt_t;
 
 #define WL_RM_REP_ELT_FIXED_LEN    24
 #define WL_RPI_REP_BIN_NUM 8
 
+begin_packed_struct
 typedef struct wl_rm_rpi_rep
 {
   uint8_t rpi[WL_RPI_REP_BIN_NUM];
   int8_t rpi_max[WL_RPI_REP_BIN_NUM];
-} wl_rm_rpi_rep_t;
+}
+end_packed_struct wl_rm_rpi_rep_t;
+
+begin_packed_struct
 typedef struct wl_rm_rep
 {
   uint32_t token;
   uint32_t len;
   wl_rm_rep_elt_t rep[1];
-} wl_rm_rep_t;
+}
+end_packed_struct wl_rm_rep_t;
 
 #define WL_RM_REP_FIXED_LEN    8
 
@@ -416,6 +467,7 @@ typedef struct wl_rm_rep
 #define WL_IBSS_PEER_GROUP_KEY (1 << 6)
 #define DOT11_MAX_KEY_SIZE     32
 
+begin_packed_struct
 typedef struct wl_wsec_key
 {
   uint32_t index;
@@ -435,18 +487,21 @@ typedef struct wl_wsec_key
   } rxiv;
   uint32_t pad_5[2];
   struct ether_addr ea;
-} wl_wsec_key_t;
+}
+end_packed_struct wl_wsec_key_t;
 
 #define WSEC_MIN_PSK_LEN    8
 #define WSEC_MAX_PSK_LEN    64
 #define WSEC_PASSPHRASE        (1<<0)
 
+begin_packed_struct
 typedef struct
 {
   uint16_t key_len;
   uint16_t flags;
   uint8_t key[WSEC_MAX_PSK_LEN];
-} wsec_pmk_t;
+}
+end_packed_struct wsec_pmk_t;
 
 #define OPEN_AUTH                   0x0000
 #define SHARED_AUTH                 0x0001
@@ -467,50 +522,65 @@ typedef struct
 #define MAXPMKID                    16
 #define WPA2_PMKID_LEN              16
 
+begin_packed_struct
 typedef struct _pmkid
 {
   struct ether_addr BSSID;
   uint8_t PMKID[WPA2_PMKID_LEN];
-} pmkid_t;
+}
+end_packed_struct pmkid_t;
 
+begin_packed_struct
 typedef struct _pmkid_list
 {
   uint32_t npmkid;
   pmkid_t pmkid[1];
-} pmkid_list_t;
+}
+end_packed_struct pmkid_list_t;
 
+begin_packed_struct
 typedef struct _pmkid_cand
 {
   struct ether_addr BSSID;
   uint8_t preauth;
-} pmkid_cand_t;
+}
+end_packed_struct pmkid_cand_t;
 
+begin_packed_struct
 typedef struct _pmkid_cand_list
 {
   uint32_t npmkid_cand;
   pmkid_cand_t pmkid_cand[1];
-} pmkid_cand_list_t;
+}
+end_packed_struct pmkid_cand_list_t;
 
+begin_packed_struct
 typedef struct wl_led_info
 {
   uint32_t index;
   uint32_t behavior;
   uint8_t activehi;
-} wl_led_info_t;
+}
+end_packed_struct wl_led_info_t;
 
+begin_packed_struct
 struct wl_dot11_assoc_req
 {
   uint16_t capability;
   uint16_t listen;
-};
+}
+end_packed_struct;
 
+begin_packed_struct
 struct wl_dot11_assoc_resp
 {
   uint16_t capability;
   uint16_t status;
   uint16_t aid;
-};
+}
+end_packed_struct;
 
+begin_packed_struct
 typedef struct wl_assoc_info
 {
   uint32_t req_len;
@@ -519,48 +589,58 @@ typedef struct wl_assoc_info
   struct wl_dot11_assoc_req req;
   struct ether_addr reassoc_bssid;
   struct wl_dot11_assoc_resp resp;
-} wl_assoc_info_t;
+}
+end_packed_struct wl_assoc_info_t;
 
 #define WLC_ASSOC_REQ_IS_REASSOC 0x01
 
+begin_packed_struct
 typedef struct
 {
   uint32_t byteoff;
   uint32_t nbytes;
   uint16_t buf[1];
-} srom_rw_t;
+}
+end_packed_struct srom_rw_t;
 
+begin_packed_struct
 typedef struct
 {
   uint32_t source;
   uint32_t byteoff;
   uint32_t nbytes;
-} cis_rw_t;
+}
+end_packed_struct cis_rw_t;
 
 #define WLC_CIS_DEFAULT 0
 #define WLC_CIS_SROM    1
 #define WLC_CIS_OTP     2
 
+begin_packed_struct
 typedef struct
 {
   uint32_t byteoff;
   uint32_t val;
   uint32_t size;
   uint32_t band;
-} rw_reg_t;
+}
+end_packed_struct rw_reg_t;
 
 #define WL_ATTEN_APP_INPUT_PCL_OFF 0
 #define WL_ATTEN_PCL_ON            1
 #define WL_ATTEN_PCL_OFF           2
 
+begin_packed_struct
 typedef struct
 {
   uint16_t auto_ctrl;
   uint16_t bb;
   uint16_t radio;
   uint16_t txctl1;
-} atten_t;
+}
+end_packed_struct atten_t;
 
+begin_packed_struct
 struct wme_tx_params_s
 {
   uint8_t short_retry;
@@ -568,7 +648,8 @@ struct wme_tx_params_s
   uint8_t long_retry;
   uint8_t long_fallback;
   uint16_t max_rate;
-};
+}
+end_packed_struct;
 typedef struct wme_tx_params_s wme_tx_params_t;
 
 #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT)
@@ -577,15 +658,18 @@ typedef struct wme_tx_params_s wme_tx_params_t;
 #define WL_PWRIDX_LOWER_LIMIT    -2
 #define WL_PWRIDX_UPPER_LIMIT    63
 
+begin_packed_struct
 typedef struct
 {
   uint32_t val;
   struct ether_addr ea;
   uint16_t pad;
-} scb_val_t;
+}
+end_packed_struct scb_val_t;
 
 #define BCM_MAC_STATUS_INDICATION    (0x40010200L)
 
+begin_packed_struct
 typedef struct
 {
   uint16_t ver;
@@ -603,7 +687,8 @@ typedef struct
   uint32_t rx_mcast_pkts;
   uint32_t tx_rate;
   uint32_t rx_rate;
-} sta_info_t;
+}
+end_packed_struct sta_info_t;
 
 #define WL_OLD_STAINFO_SIZE    offsetof(sta_info_t, tx_pkts)
 #define WL_STA_VER             2
@@ -624,17 +709,24 @@ typedef struct
 #define WL_STA_SCBSTATS        0x4000
 #define WL_WDS_LINKUP        WL_STA_WDS_LINKUP
 
+begin_packed_struct
 typedef struct channel_info
 {
   int32_t hw_channel;
   int32_t target_channel;
   int32_t scan_channel;
-} channel_info_t;
+}
+end_packed_struct channel_info_t;
+
+begin_packed_struct
 struct mac_list
 {
   uint32_t count;
   struct ether_addr ea[1];
-};
+}
+end_packed_struct;
+
+begin_packed_struct
 typedef struct get_pktcnt
 {
   uint32_t rx_good_pkt;
@@ -642,7 +734,10 @@ typedef struct get_pktcnt
   uint32_t tx_good_pkt;
   uint32_t tx_bad_pkt;
   uint32_t rx_ocast_good_pkt;
-} get_pktcnt_t;
+}
+end_packed_struct get_pktcnt_t;
+
+begin_packed_struct
 typedef struct wl_ioctl
 {
   uint32_t cmd;
@@ -651,8 +746,10 @@ typedef struct wl_ioctl
   uint8_t set;
   uint32_t used;
   uint32_t needed;
-} wl_ioctl_t;
+}
+end_packed_struct wl_ioctl_t;
 
+begin_packed_struct
 typedef struct wlc_rev_info
 {
   uint32_t vendorid;
@@ -670,31 +767,38 @@ typedef struct wlc_rev_info
   uint32_t phytype;
   uint32_t phyrev;
   uint32_t anarev;
-} wlc_rev_info_t;
+}
+end_packed_struct wlc_rev_info_t;
 
 #define WL_REV_INFO_LEGACY_LENGTH    48
 #define WL_BRAND_MAX 10
 
+begin_packed_struct
 typedef struct wl_instance_info
 {
   uint32_t instance;
   int8_t brand[WL_BRAND_MAX];
-} wl_instance_info_t;
+}
+end_packed_struct wl_instance_info_t;
 
+begin_packed_struct
 typedef struct wl_txfifo_sz
 {
   uint8_t fifo;
   uint8_t size;
-} wl_txfifo_sz_t;
+}
+end_packed_struct wl_txfifo_sz_t;
 
 #define WLC_IOV_NAME_LEN 30
 
+begin_packed_struct
 typedef struct wlc_iov_trx_s
 {
   uint8_t module;
   uint8_t type;
   int8_t name[WLC_IOV_NAME_LEN];
-} wlc_iov_trx_t;
+}
+end_packed_struct wlc_iov_trx_t;
 
 #define IOVAR_STR_BSSCFG_WPA_AUTH        "bsscfg:wpa_auth"
 #define IOVAR_STR_BSSCFG_WSEC            "bsscfg:wsec"
@@ -1173,6 +1277,7 @@ typedef struct wlc_iov_trx_s
 #define WLAN_AUTO                    (3)
 #define AUTO_ACTIVE             (1 << 7)
 
+begin_packed_struct
 typedef struct wl_aci_args
 {
   int32_t enter_aci_thresh;
@@ -1187,7 +1292,8 @@ typedef struct wl_aci_args
   uint16_t nphy_b_energy_lo_aci;
   uint16_t nphy_b_energy_md_aci;
   uint16_t nphy_b_energy_hi_aci;
-} wl_aci_args_t;
+}
+end_packed_struct wl_aci_args_t;
 
 #define WL_ACI_ARGS_LEGACY_LENGTH    16
 
@@ -1212,7 +1318,8 @@ typedef struct
   uint16_t st_level_time;
   uint16_t t2_min;
   uint32_t version;
-} wl_radar_args_t;
+}
+end_packed_struct wl_radar_args_t;
 
 #define WL_RADAR_ARGS_VERSION 1
 #define WL_RADAR_DETECTOR_OFF 0
@@ -1221,12 +1328,14 @@ typedef struct
 #define WL_RSSI_ANT_VERSION   1
 #define WL_RSSI_ANT_MAX       4
 
+begin_packed_struct
 typedef struct
 {
   uint32_t version;
   uint32_t count;
   int8_t rssi_ant[WL_RSSI_ANT_MAX];
-} wl_rssi_ant_t;
+}
+end_packed_struct wl_rssi_ant_t;
 
 #define WL_DFS_CACSTATE_IDLE        0
 #define WL_DFS_CACSTATE_PREISM_CAC  1
@@ -1237,16 +1346,19 @@ typedef struct
 #define WL_DFS_CACSTATE_POSTISM_OOC 6
 #define WL_DFS_CACSTATES            7
 
+begin_packed_struct
 typedef struct
 {
   uint32_t state;
   uint32_t duration;
   wl_chanspec_t chanspec_cleared;
   uint16_t pad;
-} wl_dfs_status_t;
+}
+end_packed_struct wl_dfs_status_t;
 
 #define NUM_PWRCTRL_RATES 12
 
+begin_packed_struct
 typedef struct
 {
   uint8_t txpwr_band_max[NUM_PWRCTRL_RATES];
@@ -1262,7 +1374,8 @@ typedef struct
   uint8_t txpwr_aphy_max[NUM_PWRCTRL_RATES];
   int8_t txpwr_antgain[2];
   uint8_t txpwr_est_pout_gofdm;
-} tx_power_legacy_t;
+}
+end_packed_struct tx_power_legacy_t;
 
 #define WL_TX_POWER_RATES         45
 #define WL_TX_POWER_CCK_FIRST     0
@@ -1282,6 +1395,7 @@ typedef struct
 #define WL_TX_POWER_F_SISO        8
 #define WL_TX_POWER_F_40M_CAP     16
 
+begin_packed_struct
 typedef struct
 {
   uint32_t flags;
@@ -1297,13 +1411,16 @@ typedef struct
   uint8_t reg_limit[WL_TX_POWER_RATES];
   uint8_t board_limit[WL_TX_POWER_RATES];
   uint8_t target[WL_TX_POWER_RATES];
-} tx_power_t;
+}
+end_packed_struct tx_power_t;
 
+begin_packed_struct
 typedef struct tx_inst_power
 {
   uint8_t txpwr_est_pout[2];
   uint8_t txpwr_est_pout_gofdm;
-} tx_inst_power_t;
+}
+end_packed_struct tx_inst_power_t;
 
 #define WLC_MEASURE_TPC           1
 #define WLC_MEASURE_CHANNEL_BASIC 2
@@ -1412,32 +1529,40 @@ typedef struct tx_inst_power
 #define VNDR_IE_CUSTOM_FLAG   0x100
 #define VNDR_IE_INFO_HDR_LEN  (sizeof(uint32_t))
 
+begin_packed_struct
 struct wl_vndr_ie
 {
   uint8_t id;
   uint8_t len;
   uint8_t oui[3];
   uint8_t data[1];
-};
+}
+end_packed_struct;
 typedef struct wl_vndr_ie wl_vndr_ie_t;
 
+begin_packed_struct
 typedef struct
 {
   uint32_t pktflag;
   wl_vndr_ie_t vndr_ie_data;
-} vndr_ie_info_t;
+}
+end_packed_struct vndr_ie_info_t;
 
+begin_packed_struct
 typedef struct
 {
   int32_t iecount;
   vndr_ie_info_t vndr_ie_list[1];
-} vndr_ie_buf_t;
+}
+end_packed_struct vndr_ie_buf_t;
 
+begin_packed_struct
 typedef struct
 {
   int8_t cmd[VNDR_IE_CMD_LEN];
   vndr_ie_buf_t vndr_ie_buffer;
-} vndr_ie_setbuf_t;
+}
+end_packed_struct vndr_ie_setbuf_t;
 
 #define WL_JOIN_PREF_RSSI    1
 #define WL_JOIN_PREF_WPA     2
@@ -1445,15 +1570,18 @@ typedef struct
 #define WLJP_BAND_ASSOC_PREF 255
 #define WL_WPA_ACP_MCS_ANY   "\x00\x00\x00\x00"
 
+begin_packed_struct
 struct tsinfo_arg
 {
   uint8_t octets[3];
-};
+}
+end_packed_struct;
 
 #define    NFIFO                6
 #define    WL_CNT_T_VERSION     6
 #define    WL_CNT_EXT_T_VERSION 1
 
+begin_packed_struct
 typedef struct
 {
   uint16_t  version;    /* see definition of WL_CNT_T_VERSION */
@@ -1694,8 +1822,10 @@ typedef struct
   uint32_t  rxmpdu_sgi;    /* count for sgi received */
   uint32_t  txmpdu_stbc;   /* count for stbc transmit */
   uint32_t  rxmpdu_stbc;   /* count for stbc received */
-} wl_cnt_ver_six_t;
+}
+end_packed_struct wl_cnt_ver_six_t;
 
+begin_packed_struct
 typedef struct
 {
   uint16_t  version;    /* see definition of WL_CNT_T_VERSION */
@@ -1933,8 +2063,10 @@ typedef struct
   uint32_t  wepexcluded_mcst;   /* dot11WEPExcludedCount */
 
   uint32_t  dma_hang;   /* count for stbc received */
-} wl_cnt_ver_seven_t;
+}
+end_packed_struct wl_cnt_ver_seven_t;
 
+begin_packed_struct
 typedef struct
 {
   uint16_t  version;    /* see definition of WL_CNT_T_VERSION */
@@ -2196,8 +2328,10 @@ typedef struct
   uint32_t  currchainsz;     /* current chain size */
 
   uint32_t  rxdrop20s;  /* drop secondary cnt */
-} wl_cnt_ver_eight_t;
+}
+end_packed_struct wl_cnt_ver_eight_t;
 
+begin_packed_struct
 typedef struct
 {
   uint16_t version;
@@ -2219,15 +2353,21 @@ typedef struct
   uint32_t txfrmsnt_20up;
   uint32_t txfrmsnt_40;
   uint32_t rx_20ul;
-} wl_cnt_ext_t;
+}
+end_packed_struct wl_cnt_ext_t;
 #define    WL_RXDIV_STATS_T_VERSION    1
+
+begin_packed_struct
 typedef struct
 {
   uint16_t version;
   uint16_t length;
   uint32_t rxant[4];
-} wl_rxdiv_stats_t;
+}
+end_packed_struct wl_rxdiv_stats_t;
 #define    WL_DELTA_STATS_T_VERSION    1
+
+begin_packed_struct
 typedef struct
 {
   uint16_t version;
@@ -2259,14 +2399,21 @@ typedef struct
   uint32_t rx432mbps;
   uint32_t rx486mbps;
   uint32_t rx540mbps;
-} wl_delta_stats_t;
+}
+end_packed_struct wl_delta_stats_t;
 #define WL_WME_CNT_VERSION    1
+
+begin_packed_struct
 typedef struct
 {
   uint32_t packets;
   uint32_t bytes;
-} wl_traffic_stats_t;
+}
+end_packed_struct wl_traffic_stats_t;
+
 #define AC_COUNT        4
+
+begin_packed_struct
 typedef struct
 {
   uint16_t version;
@@ -2277,8 +2424,10 @@ typedef struct
   wl_traffic_stats_t rx_failed[AC_COUNT];
   wl_traffic_stats_t forward[AC_COUNT];
   wl_traffic_stats_t tx_expired[AC_COUNT];
-} wl_wme_cnt_t;
+}
+end_packed_struct wl_wme_cnt_t;
 
+begin_packed_struct
 typedef struct wl_mkeep_alive_pkt
 {
   uint16_t    version;        /* Version for mkeep_alive */
@@ -2287,41 +2436,52 @@ typedef struct wl_mkeep_alive_pkt
   uint16_t    len_bytes;      /* packet length */
   uint8_t     keep_alive_id;  /* 0 - 3 for N = 4 */
   uint8_t     data[1];        /* Packet data */
-} wl_mkeep_alive_pkt_t;
+}
+end_packed_struct wl_mkeep_alive_pkt_t;
 
 #define WL_MKEEP_ALIVE_VERSION      1
 #define WL_MKEEP_ALIVE_FIXED_LEN    offsetof(wl_mkeep_alive_pkt_t, data)
 #define WL_MKEEP_ALIVE_PRECISION    500
 
+begin_packed_struct
 struct ampdu_tid_control
 {
   uint8_t tid;
   uint8_t enable;
-};
+}
+end_packed_struct;
 
+begin_packed_struct
 struct wl_msglevel2
 {
   uint32_t low;
   uint32_t high;
-};
+}
+end_packed_struct;
 
+begin_packed_struct
 struct ampdu_ea_tid
 {
   struct ether_addr ea;
   uint8_t tid;
-};
+}
+end_packed_struct;
 
+begin_packed_struct
 struct ampdu_retry_tid
 {
   uint8_t tid;
   uint8_t retry;
-};
+}
+end_packed_struct;
 
+begin_packed_struct
 struct ampdu_ba_sizes
 {
   uint8_t ba_tx_wsize;
   uint8_t ba_rx_wsize;
-};
+}
+end_packed_struct;
 
 #define    DPT_DISCOVERY_MANUAL    0x01
 #define    DPT_DISCOVERY_AUTO    0x02
@@ -2334,16 +2494,19 @@ struct ampdu_ba_sizes
 #define DPT_MANUAL_EP_CREATE    1
 #define DPT_MANUAL_EP_MODIFY    2
 #define DPT_MANUAL_EP_DELETE    3
+begin_packed_struct
 typedef struct dpt_iovar
 {
   struct ether_addr ea;
   uint8_t mode;
   uint32_t pad;
-} dpt_iovar_t;
+}
+end_packed_struct dpt_iovar_t;
 #define    DPT_STATUS_ACTIVE    0x01
 #define    DPT_STATUS_AES        0x02
 #define    DPT_STATUS_FAILED    0x04
 #define    DPT_FNAME_LEN        48
+begin_packed_struct
 typedef struct dpt_status
 {
   uint8_t status;
@@ -2351,28 +2514,38 @@ typedef struct dpt_status
   uint8_t name[DPT_FNAME_LEN];
   uint32_t rssi;
   sta_info_t sta;
-} dpt_status_t;
+}
+end_packed_struct dpt_status_t;
+begin_packed_struct
 typedef struct dpt_list
 {
   uint32_t num;
   dpt_status_t status[1];
-} dpt_list_t;
+}
+end_packed_struct dpt_list_t;
+begin_packed_struct
 typedef struct dpt_fname
 {
   uint8_t len;
   uint8_t name[DPT_FNAME_LEN];
-} dpt_fname_t;
+}
+end_packed_struct dpt_fname_t;
 #define    BDD_FNAME_LEN        32
+begin_packed_struct
 typedef struct bdd_fname
 {
   uint8_t len;
   uint8_t name[BDD_FNAME_LEN];
-} bdd_fname_t;
+}
+end_packed_struct bdd_fname_t;
+begin_packed_struct
 struct ts_list
 {
   int32_t count;
   struct tsinfo_arg tsinfo[1];
-};
+}
+end_packed_struct;
+begin_packed_struct
 typedef struct tspec_arg
 {
   uint16_t version;
@@ -2395,16 +2568,21 @@ typedef struct tspec_arg
   uint16_t surplus_bw;
   uint16_t medium_time;
   uint8_t dialog_token;
-} tspec_arg_t;
+}
+end_packed_struct tspec_arg_t;
+begin_packed_struct
 typedef struct tspec_per_sta_arg
 {
   struct ether_addr ea;
   struct tspec_arg ts;
-} tspec_per_sta_arg_t;
+}
+end_packed_struct tspec_per_sta_arg_t;
+begin_packed_struct
 typedef struct wme_max_bandwidth
 {
   uint32_t ac[AC_COUNT];
-} wme_max_bandwidth_t;
+}
+end_packed_struct wme_max_bandwidth_t;
 #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t))
 #define    TSPEC_ARG_VERSION        2
 #define TSPEC_ARG_LENGTH        55
@@ -2417,18 +2595,22 @@ typedef struct wme_max_bandwidth
 #define TSPEC_STATUS_MASK    7
 #define WL_SWFL_NOHWRADIO    0x0004
 #define WL_LIFETIME_MAX 0xFFFF
+begin_packed_struct
 typedef struct wl_lifetime
 {
   uint32_t ac;
   uint32_t lifetime;
-} wl_lifetime_t;
+}
+end_packed_struct wl_lifetime_t;
+begin_packed_struct
 typedef struct wl_chan_switch
 {
   uint8_t mode;
   uint8_t count;
   wl_chanspec_t chspec;
   uint8_t reg;
-} wl_chan_switch_t;
+}
+end_packed_struct wl_chan_switch_t;
 
 #define WLC_ROAM_TRIGGER_DEFAULT    0
 #define WLC_ROAM_TRIGGER_BANDWIDTH    1
@@ -2452,6 +2634,7 @@ enum
 #define    AUTO_CONNECT_MASK        0x10
 #define PFN_VERSION            1
 
+begin_packed_struct
 typedef struct wl_pfn_param
 {
   int32_t version;
@@ -2459,8 +2642,10 @@ typedef struct wl_pfn_param
   int32_t lost_network_timeout;
   int16_t flags;
   int16_t rssi_margin;
-} wl_pfn_param_t;
+}
+end_packed_struct wl_pfn_param_t;
 
+begin_packed_struct
 typedef struct wl_pfn
 {
   wlc_ssid_t ssid;
@@ -2469,7 +2654,8 @@ typedef struct wl_pfn
   int32_t auth;
   uint32_t wpa_auth;
   int32_t wsec;
-} wl_pfn_t;
+}
+end_packed_struct wl_pfn_t;
 
 #define TOE_TX_CSUM_OL        0x00000001
 #define TOE_RX_CSUM_OL        0x00000002
@@ -2477,6 +2663,7 @@ typedef struct wl_pfn
 #define TOE_ERRTEST_RX_CSUM    0x00000002
 #define TOE_ERRTEST_RX_CSUM2    0x00000004
 
+begin_packed_struct
 struct toe_ol_stats_t
 {
   uint32_t tx_summed;
@@ -2498,7 +2685,8 @@ struct toe_ol_stats_t
   uint32_t rx_tcp_errinj;
   uint32_t rx_udp_errinj;
   uint32_t rx_icmp_errinj;
-};
+}
+end_packed_struct;
 
 #define ARP_OL_AGENT        0x00000001
 #define ARP_OL_SNOOP        0x00000002
@@ -2508,6 +2696,7 @@ struct toe_ol_stats_t
 #define ARP_ERRTEST_REPLY_HOST    0x2
 #define ARP_MULTIHOMING_MAX    8
 
+begin_packed_struct
 struct arp_ol_stats_t
 {
   uint32_t host_ip_entries;
@@ -2522,31 +2711,39 @@ struct arp_ol_stats_t
   uint32_t peer_reply;
   uint32_t peer_reply_drop;
   uint32_t peer_service;
-};
+}
+end_packed_struct;
 
+begin_packed_struct
 typedef struct wl_keep_alive_pkt
 {
   uint32_t period_msec;
   uint16_t len_bytes;
   uint8_t data[1];
-} wl_keep_alive_pkt_t;
+}
+end_packed_struct wl_keep_alive_pkt_t;
 
 #define WL_KEEP_ALIVE_FIXED_LEN        offsetof(wl_keep_alive_pkt_t, data)
 
+begin_packed_struct
 typedef enum wl_pkt_filter_type
 {
   WL_PKT_FILTER_TYPE_PATTERN_MATCH
-} wl_pkt_filter_type_t;
+}
+end_packed_struct wl_pkt_filter_type_t;
 
 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
 
+begin_packed_struct
 typedef struct wl_pkt_filter_pattern
 {
   uint32_t offset;
   uint32_t size_bytes;
   uint8_t mask_and_pattern[1];
-} wl_pkt_filter_pattern_t;
+}
+end_packed_struct wl_pkt_filter_pattern_t;
 
+begin_packed_struct
 typedef struct wl_pkt_filter
 {
   uint32_t id;
@@ -2556,37 +2753,46 @@ typedef struct wl_pkt_filter
   {
       wl_pkt_filter_pattern_t pattern;
   } u;
-} wl_pkt_filter_t;
+}
+end_packed_struct wl_pkt_filter_t;
 
 #define WL_PKT_FILTER_FIXED_LEN              offsetof(wl_pkt_filter_t, u)
 #define WL_PKT_FILTER_PATTERN_FIXED_LEN      offsetof(wl_pkt_filter_pattern_t, mask_and_pattern)
 
+begin_packed_struct
 typedef struct wl_pkt_filter_enable
 {
   uint32_t id;
   uint32_t enable;
-} wl_pkt_filter_enable_t;
+}
+end_packed_struct wl_pkt_filter_enable_t;
 
+begin_packed_struct
 typedef struct wl_pkt_filter_list
 {
   uint32_t num;
   wl_pkt_filter_t filter[1];
-} wl_pkt_filter_list_t;
+}
+end_packed_struct wl_pkt_filter_list_t;
 
 #define WL_PKT_FILTER_LIST_FIXED_LEN      offsetof(wl_pkt_filter_list_t, filter)
 
+begin_packed_struct
 typedef struct wl_pkt_filter_stats
 {
   uint32_t num_pkts_matched;
   uint32_t num_pkts_forwarded;
   uint32_t num_pkts_discarded;
-} wl_pkt_filter_stats_t;
+}
+end_packed_struct wl_pkt_filter_stats_t;
 
+begin_packed_struct
 typedef struct wl_seq_cmd_ioctl
 {
   uint32_t cmd;
   uint32_t len;
-} wl_seq_cmd_ioctl_t;
+}
+end_packed_struct wl_seq_cmd_ioctl_t;
 
 #define WL_SEQ_CMD_ALIGN_BYTES    4
 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
@@ -2603,6 +2809,7 @@ typedef struct wl_seq_cmd_ioctl
 #define WL_PKTENG_PER_MASK            0xff
 #define WL_PKTENG_SYNCHRONOUS            0x100
 
+begin_packed_struct
 typedef struct wl_pkteng
 {
   uint32_t flags;
@@ -2612,20 +2819,23 @@ typedef struct wl_pkteng
   uint8_t seqno;
   struct ether_addr dest;
   struct ether_addr src;
-} wl_pkteng_t;
+}
+end_packed_struct wl_pkteng_t;
 
 #define NUM_80211b_RATES    4
 #define NUM_80211ag_RATES    8
 #define NUM_80211n_RATES    32
 #define NUM_80211_RATES        (NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
 
+begin_packed_struct
 typedef struct wl_pkteng_stats
 {
   uint32_t lostfrmcnt;
   int32_t rssi;
   int32_t snr;
   uint16_t rxpktcnt[NUM_80211_RATES + 1];
-} wl_pkteng_stats_t;
+}
+end_packed_struct wl_pkteng_stats_t;
 
 #define WL_WOWL_MAGIC    (1 << 0)
 #define WL_WOWL_NET    (1 << 1)
@@ -2636,32 +2846,40 @@ typedef struct wl_pkteng_stats
 #define WL_WOWL_BCAST    (1 << 15)
 #define MAGIC_PKT_MINLEN 102
 
+begin_packed_struct
 typedef struct
 {
   uint32_t masksize;
   uint32_t offset;
   uint32_t patternoffset;
   uint32_t patternsize;
-} wl_wowl_pattern_t;
+}
+end_packed_struct wl_wowl_pattern_t;
 
+begin_packed_struct
 typedef struct
 {
   uint32_t count;
   wl_wowl_pattern_t pattern[1];
-} wl_wowl_pattern_list_t;
+}
+end_packed_struct wl_wowl_pattern_list_t;
 
+begin_packed_struct
 typedef struct
 {
   uint8_t pci_wakeind;
   uint16_t ucode_wakeind;
-} wl_wowl_wakeind_t;
+}
+end_packed_struct wl_wowl_wakeind_t;
 
+begin_packed_struct
 typedef struct wl_txrate_class
 {
   uint8_t init_rate;
   uint8_t min_rate;
   uint8_t max_rate;
-} wl_txrate_class_t;
+}
+end_packed_struct wl_txrate_class_t;
 
 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT             100
 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN                 5
@@ -2685,6 +2903,7 @@ typedef struct wl_txrate_class
 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN            0
 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX            100
 
+begin_packed_struct
 typedef struct wl_obss_scan_arg
 {
   int16_t passive_dwell;
@@ -2694,7 +2913,8 @@ typedef struct wl_obss_scan_arg
   int16_t active_total;
   int16_t chanwidth_transition_delay;
   int16_t activity_threshold;
-} wl_obss_scan_arg_t;
+}
+end_packed_struct wl_obss_scan_arg_t;
 
 #define WL_OBSS_SCAN_PARAM_LEN   sizeof(wl_obss_scan_arg_t)
 #define WL_MIN_NUM_OBSS_SCAN_ARG 7
@@ -2703,28 +2923,34 @@ typedef struct wl_obss_scan_arg
 #define WL_COEX_40MHZ_INTOLERANT 0x02
 #define WL_COEX_WIDTH20          0x04
 
+begin_packed_struct
 typedef struct wl_action_obss_coex_req
 {
   uint8_t info;
   uint8_t num;
   uint8_t ch_list[1];
-} wl_action_obss_coex_req_t;
+}
+end_packed_struct wl_action_obss_coex_req_t;
 
 #define MAX_RSSI_LEVELS 8
 
+begin_packed_struct
 typedef struct wl_rssi_event
 {
   uint32_t rate_limit_msec;
   uint8_t num_rssi_levels;
   int8_t rssi_levels[MAX_RSSI_LEVELS];
-} wl_rssi_event_t;
+}
+end_packed_struct wl_rssi_event_t;
 
+begin_packed_struct
 typedef struct wl_sta_rssi
 {
   uint32_t          rssi;
   struct ether_addr sta_addr;
   uint16_t          foo;
-} wl_sta_rssi_t;
+}
+end_packed_struct wl_sta_rssi_t;
 
 #define WLFEATURE_DISABLE_11N          0x00000001
 #define WLFEATURE_DISABLE_11N_STBC_TX  0x00000002
@@ -2737,23 +2963,29 @@ typedef struct wl_sta_rssi
 
 #pragma pack(1)
 
+begin_packed_struct
 typedef struct sta_prbreq_wps_ie_hdr
 {
   struct ether_addr sta_addr;
   uint16_t ie_len;
-} sta_prbreq_wps_ie_hdr_t;
+}
+end_packed_struct sta_prbreq_wps_ie_hdr_t;
 
+begin_packed_struct
 typedef struct sta_prbreq_wps_ie_data
 {
   sta_prbreq_wps_ie_hdr_t hdr;
   uint8_t ie_data[1];
-} sta_prbreq_wps_ie_data_t;
+}
+end_packed_struct sta_prbreq_wps_ie_data_t;
 
+begin_packed_struct
 typedef  struct sta_prbreq_wps_ie_list
 {
   uint32_t tot_len;
   uint8_t ie_data_list[1];
-} sta_prbreq_wps_ie_list_t;
+}
+end_packed_struct sta_prbreq_wps_ie_list_t;
 
 /* EDCF related items from 802.11.h */
 
@@ -2782,12 +3014,14 @@ typedef  struct sta_prbreq_wps_ie_list
 #define EDCF_TXOP_MAX                65535       /* TXOP maximum value */
 #define EDCF_TXOP2USEC(txop)         ((txop) << 5)
 
+begin_packed_struct
 struct edcf_acparam
 {
   uint8_t   ACI;
   uint8_t   ECW;
   uint16_t  TXOP;       /* stored in network order (ls octet first) */
-};
+}
+end_packed_struct;
 
 typedef struct edcf_acparam edcf_acparam_t;
 


[nuttx] 01/06: arm/backtrace: fix compile warning

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5ac638944b79d225aed1632c13162a891ad99766
Author: chao an <an...@xiaomi.com>
AuthorDate: Mon Feb 6 16:47:57 2023 +0800

    arm/backtrace: fix compile warning
    
    common/arm_backtrace_unwind.c: In function 'up_backtrace':
    common/arm_backtrace_unwind.c:626:27:
    warning: assignment to 'long unsigned int' from 'uint8_t (*)[]'\
    {aka 'unsigned char (*)[]'} makes integer from pointer without a cast [-Wint-conversion]
    
      626 |           frame.stack_top = &g_intstacktop;
          |
---
 arch/arm/src/common/arm_backtrace_unwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/common/arm_backtrace_unwind.c b/arch/arm/src/common/arm_backtrace_unwind.c
index 3eb004b0db..22ea4acd17 100644
--- a/arch/arm/src/common/arm_backtrace_unwind.c
+++ b/arch/arm/src/common/arm_backtrace_unwind.c
@@ -623,7 +623,7 @@ int up_backtrace(struct tcb_s *tcb,
 #  ifdef CONFIG_SMP
           frame.stack_top = arm_intstack_top();
 #  else
-          frame.stack_top = &g_intstacktop;
+          frame.stack_top = (unsigned long)&g_intstacktop;
 #  endif /* CONFIG_SMP */
 #endif /* CONFIG_ARCH_INTERRUPTSTACK > 7 */
 


[nuttx] 06/06: rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit caa16742dbe0787168004e92ab54d3ba28839b14
Author: chao an <an...@xiaomi.com>
AuthorDate: Mon Feb 6 17:52:40 2023 +0800

    rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware
    
    The cyw43-driver is a submodule in the pick-sdk, if the submodule is
    not updated, the dummy firmware driver will be used, update the document
    to correct the setup flow.
    
    ${PICO_SDK_PATH}/lib/cyw43-driver/firmware/43439A0-7.95.49.00.combined
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 boards/arm/rp2040/raspberrypi-pico-w/README.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/boards/arm/rp2040/raspberrypi-pico-w/README.txt b/boards/arm/rp2040/raspberrypi-pico-w/README.txt
index 6c62454eee..43812d83ff 100644
--- a/boards/arm/rp2040/raspberrypi-pico-w/README.txt
+++ b/boards/arm/rp2040/raspberrypi-pico-w/README.txt
@@ -44,9 +44,11 @@ There is currently no direct user mode access to these RP2040 hardware features:
 Installation
 ============
 
-1. Download Raspberry Pi Pico SDK
+1. Download Raspberry Pi Pico SDK and update submodule(cyw43-driver)
 
-  $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git
+  $ git clone -b 1.4.0 https://github.com/raspberrypi/pico-sdk.git
+  $ cd pico-sdk
+  $ git submodule update --init --recursive lib/cyw43-driver
 
 2. Set PICO_SDK_PATH environment variable
 


[nuttx] 05/06: arm/rp2040: fix compile warning on boot2 build

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 1b245664ad665679fbee494994e0cf3ed0acea4b
Author: chao an <an...@xiaomi.com>
AuthorDate: Mon Feb 6 17:29:07 2023 +0800

    arm/rp2040: fix compile warning on boot2 build
    
    ld: warning: boards/arm/rp2040/raspberrypi-pico-w/scripts/raspberrypi-pico-flash.ld contains output sections; did you forget -T?
    Signed-off-by: chao an <an...@xiaomi.com>
---
 arch/arm/src/rp2040/boot2/Make.defs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/rp2040/boot2/Make.defs b/arch/arm/src/rp2040/boot2/Make.defs
index 4cd3d5c39b..9d5cd01e9d 100644
--- a/arch/arm/src/rp2040/boot2/Make.defs
+++ b/arch/arm/src/rp2040/boot2/Make.defs
@@ -48,7 +48,7 @@ $(BOOT_STAGE2).bin: %.bin: %.elf
 $(BOOT_STAGE2).elf: $(BOOT2SRC)
 	$(Q) touch $(PICO_SDK_PATH)/src/common/pico_base/include/pico/version.h
 	$(Q) touch $(PICO_SDK_PATH)/src/common/pico_base/include/pico/config_autogen.h
-	$(CC) -nostdlib $(ARCHSCRIPT) $(BOOT2CFLAGS) -o $@ $<
+	$(CC) -nostdlib -T$(ARCHSCRIPT) $(BOOT2CFLAGS) -o $@ $<
 	$(DELFILE) $(PICO_SDK_PATH)/src/common/pico_base/include/pico/version.h
 	$(DELFILE) $(PICO_SDK_PATH)/src/common/pico_base/include/pico/config_autogen.h
 


[nuttx] 03/06: wireless/bcm43xxx/qspi: try tx after rx fails

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 1779433c350f9e64678b77bc11b02e871949f9df
Author: chao an <an...@xiaomi.com>
AuthorDate: Mon Feb 6 17:05:54 2023 +0800

    wireless/bcm43xxx/qspi: try tx after rx fails
    
    1. Try tx after rx fails to avoid gspi_thread busy to try rx
    2. Add some delay if alloc frame buffer failed
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c    | 54 ++++++++--------------
 .../ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c        |  7 +--
 .../wireless/ieee80211/bcm43xxx/bcmf_interface.c   |  9 ++--
 3 files changed, 27 insertions(+), 43 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c
index f47372ef04..eacb8a0e4d 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c
@@ -356,7 +356,6 @@ static int bcmf_gspi_thread(int argc, char **argv)
   uint16_t               intr_flags;
   int                    ret;
   int                    length;
-  int                    wait_count      = 0;
   bool                   wait_for_event;
   bool                   enter_low_power = false;
 
@@ -424,7 +423,10 @@ static int bcmf_gspi_thread(int argc, char **argv)
 
           /* If we don't have a frame leave the loop */
 
-          if (length == 0) break;
+          if (length == 0)
+            {
+              break;
+            }
 
           /* Read and process frame. This updates gspi->status */
 
@@ -436,43 +438,21 @@ static int bcmf_gspi_thread(int argc, char **argv)
             }
           else
             {
-              wlerr("error reading f2 frame: %d\n", ret);
+              wlwarn("error reading f2 frame: %d\n", ret);
             }
         }
-      else
+
+      if (wait_for_event)
         {
-          /* If we don't have anything to read, try sending a packet */
+          /* Send the frame */
 
-          while ((status & CYW_REG_STATUS_F2_RECEIVE_RDY) == 0)
+          do
             {
-              /* Oops! no room for a packet.  We'll wait a bit to see
-               * if room shows up.
-               */
-
-              wlinfo(">>>> not ready to receive\n");
-
-              if (++wait_count > 100)
-                {
-                  wlerr("Chip cannot receive F2 frame\n");
-                  break;
-                }
-
-              /* No room at the inn for an f2 frame -- wait a bit */
-
-              usleep(10000);
-
+              ret = bcmf_gspi_send_f2_frame(priv);
               status = bcmf_gspi_read_reg_32(gspi,
-                                             gspi_f0_bus,
-                                             CYW_REG_STATUS);
+                                             gspi_f0_bus, CYW_REG_STATUS);
             }
-
-          /* reset the count for next time  */
-
-          wait_count = 0;
-
-          /* We have space, send the frame */
-
-          ret = bcmf_gspi_send_f2_frame(priv);
+          while (ret == OK && (status & CYW_REG_STATUS_F2_RECEIVE_RDY));
 
           if (ret == OK)
             {
@@ -480,12 +460,13 @@ static int bcmf_gspi_thread(int argc, char **argv)
             }
           else
             {
-#ifdef CONFIG_DEBUG_WIRELESS_ERROR
               if (ret != -ENODATA)
                 {
+#ifdef CONFIG_DEBUG_WIRELESS_ERROR
                   wlerr("error sending f2 frame: %d\n", ret);
-                }
 #endif
+                  nxsig_usleep(10 * 1000);
+                }
             }
         }
 
@@ -511,7 +492,10 @@ static int bcmf_gspi_thread(int argc, char **argv)
                             &gbus->thread_signal,
                             BCMF_GSPI_LOWPOWER_TIMEOUT_TICK);
 
-              if (ret == -ETIMEDOUT) enter_low_power = true;
+              if (ret == -ETIMEDOUT)
+                {
+                  enter_low_power = true;
+                }
             }
         }
     }
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c
index ae51d4a736..d77b719d63 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 #include <nuttx/compiler.h>
+#include <nuttx/signal.h>
 
 #include <debug.h>
 #include <errno.h>
@@ -40,7 +41,7 @@
 #include "bcmf_bdc.h"
 #include "bcmf_utils.h"
 
- #include "bcmf_netdev.h"
+#include "bcmf_netdev.h"
 
 #include "bcmf_sdio_regs.h"
 
@@ -327,8 +328,8 @@ int bcmf_gspi_send_f2_frame(FAR struct bcmf_dev_s *priv)
     {
       /* TODO handle this case */
 
-      wlerr("No credit to send frame\n");
-      return -EAGAIN;
+      wlwarn("No credit to send frame\n");
+      nxsig_usleep(10 * 1000);
     }
 
   if (nxmutex_lock(&gbus->queue_lock) < 0)
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_interface.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_interface.c
index ad9d398fb5..045295044b 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_interface.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_interface.c
@@ -89,8 +89,7 @@ void bcmf_interface_free_frame(FAR struct bcmf_dev_s  *priv,
 
 bcmf_interface_frame_t
 *bcmf_interface_allocate_frame(FAR struct bcmf_dev_s *priv,
-                                        bool                   block,
-                                        bool                   tx)
+                               bool block, bool tx)
 {
   FAR bcmf_interface_dev_t *ibus = (FAR bcmf_interface_dev_t *) priv->bus;
   bcmf_interface_frame_t   *iframe;
@@ -122,13 +121,13 @@ bcmf_interface_frame_t
 
       nxmutex_unlock(&ibus->queue_lock);
 
+      nxsig_usleep(10 * 1000);
+
       if (!block)
         {
-          wlinfo("No avail buffer\n");
+          wlwarn("No avail buffer\n");
           return NULL;
         }
-
-      nxsig_usleep(10 * 1000);
     }
 
 #if defined(CONFIG_IEEE80211_BROADCOM_FULLMAC_GSPI)


[nuttx] 04/06: raspberrypi-pico-w/telnet: enable more configs

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5c047f634f849f3fc9b4c7259a74ccbe24279e69
Author: chao an <an...@xiaomi.com>
AuthorDate: Mon Feb 6 17:17:48 2023 +0800

    raspberrypi-pico-w/telnet: enable more configs
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 .../raspberrypi-pico-w/configs/telnet/defconfig    | 24 +++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig
index e23eaa17e3..c5c8fdddca 100644
--- a/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig
+++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig
@@ -17,11 +17,17 @@ CONFIG_ARCH_BOARD="raspberrypi-pico-w"
 CONFIG_ARCH_BOARD_RASPBERRYPI_PICO_W=y
 CONFIG_ARCH_CHIP="rp2040"
 CONFIG_ARCH_CHIP_RP2040=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
 CONFIG_ARCH_RAMVECTORS=y
 CONFIG_ARCH_STACKDUMP=y
 CONFIG_BOARDCTL_RESET=y
 CONFIG_BOARD_LOOPSPERMSEC=10450
 CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_ERROR=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DISABLE_POSIX_TIMERS=y
 CONFIG_DRIVERS_IEEE80211=y
 CONFIG_DRIVERS_WIRELESS=y
@@ -29,10 +35,16 @@ CONFIG_EXAMPLES_HELLO=y
 CONFIG_FS_PROCFS=y
 CONFIG_FS_PROCFS_REGISTER=y
 CONFIG_IEEE80211_BROADCOM_DEFAULT_COUNTRY="XX"
+CONFIG_IEEE80211_BROADCOM_DMABUF_ALIGNMENT=16
+CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE=32
 CONFIG_IEEE80211_BROADCOM_FULLMAC_GSPI=y
 CONFIG_IEEE80211_INFINEON_CYW43439=y
 CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_IOB_NBUFFERS=196
+CONFIG_IOB_NCHAINS=24
+CONFIG_LIBC_FLOATINGPOINT=y
 CONFIG_MM_BACKTRACE=0
+CONFIG_NDEBUG=y
 CONFIG_NET=y
 CONFIG_NETDB_DNSCLIENT=y
 CONFIG_NETDB_DNSCLIENT_RECV_TIMEOUT=3
@@ -50,6 +62,7 @@ CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_LOOPBACK=y
 CONFIG_NET_LOOPBACK_PKTSIZE=1024
 CONFIG_NET_TCP=y
+CONFIG_NET_TCP_DELAYED_ACK=y
 CONFIG_NET_UDP=y
 CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
@@ -58,19 +71,28 @@ CONFIG_RAM_SIZE=270336
 CONFIG_RAM_START=0x20000000
 CONFIG_READLINE_CMD_HISTORY=y
 CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_BACKTRACE=y
 CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_WAITPID=y
+CONFIG_STACK_COLORATION=y
 CONFIG_START_DAY=9
 CONFIG_START_MONTH=2
 CONFIG_START_YEAR=2021
-CONFIG_SYSLOG_CONSOLE=y
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSLOG_INTBUFFER=y
+CONFIG_SYSLOG_INTBUFSIZE=2048
+CONFIG_SYSLOG_PROCESSID=y
 CONFIG_SYSTEM_DHCPC_RENEW=y
+CONFIG_SYSTEM_DUMPSTACK=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_SYSTEM_TELNET_CLIENT=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
+CONFIG_TTY_FORCE_PANIC=y
+CONFIG_TTY_SIGINT=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_UART0_SERIAL_CONSOLE=y
 CONFIG_WIRELESS_WAPI=y
 CONFIG_WIRELESS_WAPI_CMDTOOL=y