anchao commented on code in PR #6494: URL: https://github.com/apache/incubator-nuttx/pull/6494#discussion_r903242639
########## drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c: ########## @@ -1744,3 +1744,39 @@ int bcmf_wl_get_ssid(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) return ret; } + +int bcmf_wl_set_country_code(FAR struct bcmf_dev_s *priv, + int interface, FAR void *code) +{ + uint8_t country[4] = + { + }; + + uint32_t out_len; + + memcpy(country, code, 2); + + /* Why out_len = 4 ? Padding bytes to ensure array is + * terminating with null byte + */ + + out_len = sizeof(country); + + return bcmf_cdc_iovar_request(priv, interface, true, Review Comment: Thanks for the question, at present implement, the control commands of cdc all use POSIX compatible errono return values. The private control state only log printed: ``` cp> wapi country wlan0 TE ioctl(0x8b37): 22 ERROR: Process command (country) failed. cp> [01/01 00:01:08.610412] [25] [cp] bcmf_cdc_control_request_unsafe: Invalid cdc status 0xfffffffe ``` https://github.com/apache/incubator-nuttx/blob/master/drivers/wireless/ieee80211/bcm43xxx/bcmf_cdc.c#L230 We will consider better mapping of driver errors into POSIX compatible ones in the next patch, as you mentioned, which will better help the user to understand what exactly happened in the driver -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org