[RK3288][Android6.0] 调试笔记 --- WiFi芯片AP6356S添加
Platform: RK3288
OS: Android 6.0
Kernel: 3.10.92
背景:
RK3288 Android6.0平台对AP6356S的支持不是很完善,直接修改wifi chip type后,会出现如下error:
[ 9.169008] dhdsdio_download_nvram: Open nvram file failed /system/etc/firmware/nvram_ap6356s.txt
[ 9.169016] _dhdsdio_download_firmware: dongle nvram file download failed
[ 9.169039] dhd_net_bus_devreset: dhd_bus_devreset: -35
[ 9.169045] dhd_prot_ioctl : bus is down. we have nothing to do
[ 9.169048] dhd_net_bus_devreset: dhd_bus_devreset: -35
也就是说对应的bin文件和nvram文件缺失,需要更新固件和驱动。
解决方法:
1. 更新驱动
diff --git a/arch/arm/boot/dts/rk3288-ben.dts b/arch/arm/boot/dts/rk3288-ben.dts
index c6faa65..d903a36 100644
@@ -17,19 +17,19 @@* rtl8188eu, rtl8723bs, rtl8723bu* esp8089*/
- wifi_chip_type = "ap6335";
+ wifi_chip_type = "ap6354";sdio_vref = <1800>; //1800mv or 3300mv//keep_wifi_power_on;//power_ctrl_by_pmu;
- power_pmu_regulator = "act_ldo3";
+ power_pmu_regulator = "rk818_ldo8";power_pmu_enable_level = <1>; //1->HIGH, 0->LOW//vref_ctrl_enable;//vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
- vref_pmu_regulator = "act_ldo3";
+ vref_pmu_regulator = "rk818_ldo8";vref_pmu_enable_level = <1>; //1->HIGH, 0->LOWWIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>;
@@ -742,8 +742,8 @@rk818_ldo8_reg: regulator@11 {regulator-name= "rk818_ldo8";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;regulator-initial-state = <3>;regulator-state-mem {regulator-state-enabled;
diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c
index 5f7e44c..2735b80 100755
--- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c
+++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c
@@ -5,7 +5,7 @@#include <bcmutils.h>#include <hndsoc.h>#include <bcmsdbus.h>
-#if defined(HW_OOB) || defined(FORCE_WOWLAN)
+#if defined(HW_OOB) || defined(FORCE_WOWLAN)#include <bcmdefs.h>#include <bcmsdh.h>#include <sdio.h>
@@ -15,26 +15,25 @@#include <dhd_config.h>#include <dhd_dbg.h>-/* message levels */
+/* message levels */#define CONFIG_ERROR_LEVEL 0x0001#define CONFIG_TRACE_LEVEL 0x0002
-#define USER_CONFIG_PATH "/data/misc/roam/config.properties"
-
+uint config_msg_level = CONFIG_ERROR_LEVEL;
-
+#define CONFIG_ERROR(x) \
- do { \
+ do { \if (config_msg_level & CONFIG_ERROR_LEVEL) { \printk(KERN_ERR "CONFIG-ERROR) "); \
- printk x; \
- } \
- } while (0)
+ printk x; \
+ } \
+ } while (0)#define CONFIG_TRACE(x) \
- do { \
+ do { \if (config_msg_level & CONFIG_TRACE_LEVEL) { \printk(KERN_ERR "CONFIG-TRACE) "); \
- printk x; \
- } \
+ printk x; \
+ } \} while (0)#define MAXSZ_BUF 1000
@@ -173,11 +172,11 @@ const static char *bcm4356a2_pcie_ag_fw_name[] = {};#endif-#define htod32(i) i
-#define htod16(i) i
-#define dtoh32(i) i
-#define dtoh16(i) i
-#define htodchanspec(i) i
+#define htod32(i) i
+#define htod16(i) i
+#define dtoh32(i) i
+#define dtoh16(i) i
+#define htodchanspec(i) i#define dtohchanspec(i) i#ifdef BCMSDIO
@@ -534,8 +533,10 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path)}break;case BCM4356_CHIP_ID:
- if (chiprev == BCM4356A2_CHIP_REV)
- strcpy(&fw_path[i+1], bcm4356a2_ag_fw_name[fw_type]);
+ if (chiprev == BCM4356A2_CHIP_REV) {
+ strcpy(&fw_path[i+1], bcm4356a2_ag_fw_name[fw_type]);
+ strcpy(&nv_path[j+1], "nvram_ap6356s.txt");
+ }break;case BCM4371_CHIP_ID:if (chiprev == BCM4356A2_CHIP_REV)
@@ -866,10 +867,10 @@ dhd_conf_fix_country(dhd_pub_t *dhd)if (!(dhd && dhd->conf)) {return bcmerror;}
-
+memset(valid_chan_list, 0, sizeof(valid_chan_list));
- list = (wl_uint32_list_t *)(void *) valid_chan_list;
- list->count = htod32(WL_NUMCHANNELS);
+ list = (wl_uint32_list_t *)(void *) valid_chan_list;
+ list->count = htod32(WL_NUMCHANNELS);if ((bcmerror = dhd_wl_ioctl_cmd(dhd, WLC_GET_VALID_CHANNELS, valid_chan_list, sizeof(valid_chan_list), FALSE, 0)) < 0) {CONFIG_ERROR(("%s: get channels failed with %d\n", __FUNCTION__, bcmerror));}
@@ -1283,8 +1284,8 @@ dhd_conf_read_log_level(dhd_pub_t *dhd, char *bufp, uint len)if (pick)MFREE(dhd->osh, pick, MAXSZ_BUF);
-}
-
+}
+voiddhd_conf_read_wme_ac_params(dhd_pub_t *dhd, char *bufp, uint len){
@@ -1719,7 +1720,6 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)bool conf_file_exists;struct dhd_conf *conf = dhd->conf;- conf_path = USER_CONFIG_PATH;conf_file_exists = ((conf_path != NULL) && (conf_path[0] != '\0'));if (!conf_file_exists) {printf("%s: config path %s\n", __FUNCTION__, conf_path);
@@ -1759,7 +1759,7 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)/* Process log_level */dhd_conf_read_log_level(dhd, bufp, len);dhd_conf_read_roam_params(dhd, bufp, len);
- dhd_conf_read_wme_ac_params(dhd, bufp, len);
+ dhd_conf_read_wme_ac_params(dhd, bufp, len);dhd_conf_read_fw_by_mac(dhd, bufp, len);dhd_conf_read_nv_by_mac(dhd, bufp, len);dhd_conf_read_nv_by_chip(dhd, bufp, len);
@@ -1948,7 +1948,7 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)len_val = process_config_vars(bufp, len, pick, "bus:txglom=");if (len_val) {conf->bus_txglom = (int)simple_strtol(pick, NULL, 10);
- printf("%s: bus:txglom = %d\n", __FUNCTION__, conf->bus_txglom);
+ printf("%s: bus:txglom = %d\n", __FUNCTION__, conf->bus_txglom);}/* Process ampdu_ba_wsize parameters */
@@ -2010,7 +2010,7 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)printf("%s: use_rxchain = %d\n", __FUNCTION__, conf->use_rxchain);}-#if defined(BCMSDIOH_TXGLOM)
+#if defined(BCMSDIOH_TXGLOM)/* Process txglomsize parameters */memset(pick, 0, MAXSZ_BUF);len_val = process_config_vars(bufp, len, pick, "txglomsize=");
@@ -2022,42 +2022,42 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)}/* Process swtxglom parameters */
- memset(pick, 0, MAXSZ_BUF);
+ memset(pick, 0, MAXSZ_BUF);len_val = process_config_vars(bufp, len, pick, "swtxglom=");
- if (len_val) {
- if (!strncmp(pick, "0", len_val))
+ if (len_val) {
+ if (!strncmp(pick, "0", len_val))conf->swtxglom = FALSE;
- else
+ elseconf->swtxglom = TRUE;printf("%s: swtxglom = %d\n", __FUNCTION__, conf->swtxglom);}- /* Process txglom_ext parameters */
- memset(pick, 0, MAXSZ_BUF);
- len_val = process_config_vars(bufp, len, pick, "txglom_ext=");
- if (len_val) {
- if (!strncmp(pick, "0", len_val))
- conf->txglom_ext = FALSE;
- else
- conf->txglom_ext = TRUE;
- printf("%s: txglom_ext = %d\n", __FUNCTION__, conf->txglom_ext);
- if (conf->txglom_ext) {
- if ((conf->chip == BCM43362_CHIP_ID) || (conf->chip == BCM4330_CHIP_ID))
- conf->txglom_bucket_size = 1680;
- else if (conf->chip == BCM43340_CHIP_ID || conf->chip == BCM43341_CHIP_ID ||
+ /* Process txglom_ext parameters */
+ memset(pick, 0, MAXSZ_BUF);
+ len_val = process_config_vars(bufp, len, pick, "txglom_ext=");
+ if (len_val) {
+ if (!strncmp(pick, "0", len_val))
+ conf->txglom_ext = FALSE;
+ else
+ conf->txglom_ext = TRUE;
+ printf("%s: txglom_ext = %d\n", __FUNCTION__, conf->txglom_ext);
+ if (conf->txglom_ext) {
+ if ((conf->chip == BCM43362_CHIP_ID) || (conf->chip == BCM4330_CHIP_ID))
+ conf->txglom_bucket_size = 1680;
+ else if (conf->chip == BCM43340_CHIP_ID || conf->chip == BCM43341_CHIP_ID ||conf->chip == BCM4334_CHIP_ID || conf->chip == BCM4324_CHIP_ID)
- conf->txglom_bucket_size = 1684;
- }
- printf("%s: txglom_bucket_size = %d\n", __FUNCTION__, conf->txglom_bucket_size);
- }
+ conf->txglom_bucket_size = 1684;
+ }
+ printf("%s: txglom_bucket_size = %d\n", __FUNCTION__, conf->txglom_bucket_size);
+ }#endif/* Process disable_proptx parameters */memset(pick, 0, MAXSZ_BUF);len_val = process_config_vars(bufp, len, pick, "disable_proptx=");if (len_val) {
- conf->disable_proptx = (int)simple_strtol(pick, NULL, 10);
- printf("%s: disable_proptx = %d\n", __FUNCTION__, conf->disable_proptx);
+ conf->disable_proptx = (int)simple_strtol(pick, NULL, 10);
+ printf("%s: disable_proptx = %d\n", __FUNCTION__, conf->disable_proptx);}/* Process dpc_cpucore parameters */
@@ -2131,44 +2131,44 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)if (len_val) {conf->pktprio8021x = (int)simple_strtol(pick, NULL, 10);printf("%s: pktprio8021x = %d\n", __FUNCTION__, conf->pktprio8021x);
- }
-
- /* Process txctl_tmo_fix parameters */
- memset(pick, 0, MAXSZ_BUF);
- len_val = process_config_vars(bufp, len, pick, "txctl_tmo_fix=");
- if (len_val) {
- if (!strncmp(pick, "0", len_val))
- conf->txctl_tmo_fix = FALSE;
- else
- conf->txctl_tmo_fix = TRUE;
- printf("%s: txctl_tmo_fix = %d\n", __FUNCTION__, conf->txctl_tmo_fix);
- }
-
- /* Process tx_in_rx parameters */
- memset(pick, 0, MAXSZ_BUF);
- len_val = process_config_vars(bufp, len, pick, "tx_in_rx=");
- if (len_val) {
- if (!strncmp(pick, "0", len_val))
- conf->tx_in_rx = FALSE;
- else
- conf->tx_in_rx = TRUE;
- printf("%s: tx_in_rx = %d\n", __FUNCTION__, conf->tx_in_rx);
- }
-
- /* Process dhd_txbound parameters */
- memset(pick, 0, MAXSZ_BUF);
- len_val = process_config_vars(bufp, len, pick, "dhd_txbound=");
- if (len_val) {
- dhd_txbound = (uint)simple_strtol(pick, NULL, 10);
- printf("%s: dhd_txbound = %d\n", __FUNCTION__, dhd_txbound);
- }
-
- /* Process dhd_rxbound parameters */
- memset(pick, 0, MAXSZ_BUF);
- len_val = process_config_vars(bufp, len, pick, "dhd_rxbound=");
- if (len_val) {
- dhd_rxbound = (uint)simple_strtol(pick, NULL, 10);
- printf("%s: dhd_rxbound = %d\n", __FUNCTION__, dhd_rxbound);
+ }
+
+ /* Process txctl_tmo_fix parameters */
+ memset(pick, 0, MAXSZ_BUF);
+ len_val = process_config_vars(bufp, len, pick, "txctl_tmo_fix=");
+ if (len_val) {
+ if (!strncmp(pick, "0", len_val))
+ conf->txctl_tmo_fix = FALSE;
+ else
+ conf->txctl_tmo_fix = TRUE;
+ printf("%s: txctl_tmo_fix = %d\n", __FUNCTION__, conf->txctl_tmo_fix);
+ }
+
+ /* Process tx_in_rx parameters */
+ memset(pick, 0, MAXSZ_BUF);
+ len_val = process_config_vars(bufp, len, pick, "tx_in_rx=");
+ if (len_val) {
+ if (!strncmp(pick, "0", len_val))
+ conf->tx_in_rx = FALSE;
+ else
+ conf->tx_in_rx = TRUE;
+ printf("%s: tx_in_rx = %d\n", __FUNCTION__, conf->tx_in_rx);
+ }
+
+ /* Process dhd_txbound parameters */
+ memset(pick, 0, MAXSZ_BUF);
+ len_val = process_config_vars(bufp, len, pick, "dhd_txbound=");
+ if (len_val) {
+ dhd_txbound = (uint)simple_strtol(pick, NULL, 10);
+ printf("%s: dhd_txbound = %d\n", __FUNCTION__, dhd_txbound);
+ }
+
+ /* Process dhd_rxbound parameters */
+ memset(pick, 0, MAXSZ_BUF);
+ len_val = process_config_vars(bufp, len, pick, "dhd_rxbound=");
+ if (len_val) {
+ dhd_rxbound = (uint)simple_strtol(pick, NULL, 10);
+ printf("%s: dhd_rxbound = %d\n", __FUNCTION__, dhd_rxbound);}/* Process tx_max_offset parameters */
@@ -2186,14 +2186,14 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)conf->rsdb_mode = (int)simple_strtol(pick, NULL, 10);printf("%s: rsdb_mode = %d\n", __FUNCTION__, conf->rsdb_mode);}
-
+/* Process txglom_mode parameters */
- memset(pick, 0, MAXSZ_BUF);
+ memset(pick, 0, MAXSZ_BUF);len_val = process_config_vars(bufp, len, pick, "txglom_mode=");
- if (len_val) {
- if (!strncmp(pick, "0", len_val))
+ if (len_val) {
+ if (!strncmp(pick, "0", len_val))conf->txglom_mode = FALSE;
- else
+ elseconf->txglom_mode = TRUE;printf("%s: txglom_mode = %d\n", __FUNCTION__, conf->txglom_mode);}
@@ -2332,9 +2332,9 @@ dhd_conf_preinit(dhd_pub_t *dhd)conf->roam_delta[0] = 15;#endifconf->roam_delta[1] = WLC_BAND_ALL;
-#ifdef FULL_ROAMING_SCAN_PERIOD_60_SEC
+#ifdef FULL_ROAMING_SCAN_PERIOD_60_SECconf->fullroamperiod = 60;
-#else /* FULL_ROAMING_SCAN_PERIOD_60_SEC */
+#else /* FULL_ROAMING_SCAN_PERIOD_60_SEC */conf->fullroamperiod = 120;#endif /* FULL_ROAMING_SCAN_PERIOD_60_SEC */#ifdef CUSTOM_KEEP_ALIVE_SETTING
@@ -2374,7 +2374,7 @@ dhd_conf_preinit(dhd_pub_t *dhd)conf->tcpack_sup_mode = TCPACK_SUP_OFF;#endifconf->dhd_poll = -1;
- conf->pktprio8021x = -1;
+ conf->pktprio8021x = -1;conf->txctl_tmo_fix = FALSE;conf->tx_in_rx = TRUE;conf->rsdb_mode = -2;
@@ -2386,7 +2386,7 @@ dhd_conf_preinit(dhd_pub_t *dhd)if (conf->chip == BCM43430_CHIP_ID) {conf->bus_rxglom = FALSE;conf->use_rxchain = 0;
- }
+ }if (conf->chip == BCM4339_CHIP_ID) {conf->txbf = 1;}
2. 更新firmware和nvram文件
kris@eco:~/rk3288/external/wlan_loader$ g st
On branch tek_dev
Your branch is up-to-date with 'origin/tek_dev'.Untracked files:(use "git add <file>..." to include in what will be committed)firmware/fw_bcm4356a2_ag.binfirmware/fw_bcm4356a2_ag_apsta.binfirmware/fw_bcm4356a2_ag_p2p.binfirmware/nvram_ap6356.txtfirmware/nvram_ap6356s.txt
注意:
由于AP6356S包含BT功能,因此也要更新,这里就不给出了。
[RK3288][Android6.0] 调试笔记 --- WiFi芯片AP6356S添加相关推荐
- [RK3288][Android6.0] 调试笔记 --- 伪电池驱动添加
Platform: ROCKCHIP OS: Android 6.0 Kernel: 3.10.92 由于电池部分是用户空间Service从另外一颗MCU获取,而Android需要显示电量, 所以按照 ...
- [RK3288][Android6.0] 调试笔记 --- 电池电量一直显示100%
Platform: Rockchip OS: Android 6.0 Kernel: 3.10.92 之前文章[RK3288][Android6.0] 调试笔记 - 伪电池驱动添加 阐述了如何添加一个 ...
- [RK3288][Android6.0] 调试笔记 --- touch无法获取坐标点
Platform: Rockchip OS: Android 6.0 Kernel: 3.10.92 有网友遇到调试touch的时候能触发中断,但无法获取坐标点 具体可参考文章 [RK3288][An ...
- [RK3288][Android6.0] 调试笔记 --- AndroidTool低格无效问题
Platform: Rockchip OS: Android 6.0 Kernel: 3.10.92 现象: 之前文章 [RK3288][Android6.0] 调试笔记 - AndroidTool两 ...
- gpio驱动广播Android,[RK3288][Android6.0] 调试笔记 --- 通用GPIO驱动控制LED【转】
Platform: ROCKCHIP OS: Android 6.0 Kernel: 3.10.92 由于板子没有lcd无法得知sd卡升级是否完成,因此使用LED显示. Recovery中升级完成后控 ...
- [RK3288][Android6.0] 调试笔记 --- 双屏显示内核Patch
Platform: RK3288 OS: Android 6.0 Kernel: 3.10.92 根据5.1的双屏显示patch,在android6.0上修改了下,因为没硬件环境,所以未经验证,仅供参 ...
- [RK3288][Android6.0] 调试笔记 --- ro.serialno的获取
Platform: RK3288 OS: Android 6.0 Kernel: 3.10.92 rk3288平台的serial number是由drmservice写进去的,drmservice在r ...
- [RK3288][Android6.0] 调试笔记 --- 调试串口的更换
Platform: ROCKCHIP OS: Android 6.0 Kernel: 3.10.92 假设项目有需求要将调试串口uart2 改成 uart1, 改动如下 (还未验证,先分享给大家,有问 ...
- [RK3288][Android6.0] 调试笔记 --- 软硬键盘同时使用【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/78748313 Platform: RK3288 OS: Android 6.0 Kern ...
最新文章
- 人类未来将毁于元宇宙?刘慈欣向往星辰大海,小扎却要深耕Meta
- 浏览器和迅雷简单拿到动漫妹子图
- 使用NSURLCache 数据缓存
- MySQL通讯协议研究3(Text模式查询)
- 如何使用点击超链接的方式打开Android手机上的应用
- linux gdb网络调试工具,Linux--gdb调试工具
- h5页面保存img_一文彻底解决HTML5页面中长按保存图片功能
- mysql查看版本号_十分钟了解MySQL事务机制
- 算法笔记_100:蓝桥杯练习 算法提高 三个整数的排序(Java)
- 金三银四大厂面经总结,淘汰了80%的Java面试者
- Windows Mobile入门
- car-like robot运动模型及应用分析(图片版)
- CSDN寄送的礼物,博客评选的阳光普照奖
- NPM 上传自己的包
- 软件开发各类文档模板
- 开心斗服务器维修要多久,大危机 《开心OL》史上最惨服务器开启?
- 学校校园监控安装安全系统方案
- OSChina 周二乱弹 ——深入浅出微信小程序
- 2020-2021学年第二学期期末考试《药物治疗学》大作业
- Minecraft整合包 [GTNH]格雷科技:新视野 服务器搭建教程
热门文章
- C1认证学习十三(数据结构常识)
- 物联网周刊(第 6 期):开源硬件公司 Adafruit
- 三菱梯形图转换c语言软件,三菱梯形图转51单片机软件使用程序超过100步又要使用软件的朋友.pdf...
- Pagination 分页实现跳转首页和尾页
- PS_BaseUse_白底照片
- 腾讯云常见云产品中的云硬盘(块存储)、文件存储、对象存储三者的区别!
- 电脑开机后无法启动出现的0xc0000428错误
- 电脑打字拼音出现下划线,没有中文提示框
- Unity3D-游戏ARVR开发进阶课程 - 动画系统-宋晓波-专题视频课程
- 【机器学习】线性回归实战案例一:多元素情况下广告投放效果分析步骤详解