概述
Platform: ROCKCHIP
Chip: RK3288
OS: Android7.1.2
Kernel: 4.4.143
背景
旧板wifi模块ap6235,硬件将wifi模块替换成ap6256,未改代码情况下,wifi不能用, 设备打印如下
代码修改
1.新增固件:wifi在externawlan_loaderfirmware
蓝牙固件在:vendorrockchipcommonbluetoothlibfirmware
3.代码补丁
a.kernel/arch/arm/boot/dts/rk3288-evb.dtsi
wireless-wlan {
compatible = "wlan-platdata";
rockchip,grf = <&grf>;
- wifi_chip_type = "ap6235";
+ wifi_chip_type = "ap6256";
sdio_vref = <1800>;
WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
status = "okay";
b.kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.h
dhd_slpauto;
#endif
#define BCM4356A2_CHIP_REV 2
#define BCM4358A3_CHIP_REV 3
+#define BCM43456C5_CHIP_REV 9
typedef struct wl_mac_range {
c.kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c
dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path)
case BCM4345_CHIP_ID:
case BCM43454_CHIP_ID:
if (chiprev == BCM43455C0_CHIP_REV) {
strcpy(&fw_path[i+1], FW_BCM43455C0);
strcpy(&nv_path[j + 1], "nvram_ap6255.txt");
} else if (chiprev == BCM43456C5_CHIP_REV) {
strcpy(&fw_path[i+1], FW_BCM43456C5);
+ strcpy(&nv_path[j + 1], "nvram_ap6256.txt");
}
break;
d.kernel/drivers/net/wireless/rockchip_wlan/rkwifi/rk_wifi_config.c
if (chip == WIFI_AP6255) {
sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_bcm43455c0_ag.bin");
sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_ap6255.txt");
}
+
+if (chip == WIFI_AP6256) {
+ sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_bcm43456c5_ag.bin");
+ sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_ap6256.txt");
+}
+
e.kernel/include/linux/rfkill-wlan.h
WIFI_AP6212,
WIFI_AP6234,
WIFI_AP6255,
+ WIFI_AP6256,
WIFI_AP6330,
WIFI_AP6335,
WIFI_AP6354,
f.kernel/net/rfkill/rfkill-wlan.c
get_wifi_chip_type(void)
type = WIFI_AP6234;
} else if (strcmp(wifi_chip_type_string, "ap6255") == 0) {
type = WIFI_AP6255;
+ } else if (strcmp(wifi_chip_type_string, "ap6256") == 0) {
+ type = WIFI_AP6256;
编译后烧录有如下打印即可正常使用
测试其吞吐量
接天线,白天接收(上行):70+Mbits/sec
接天线,白天发送(下行):40+Mbits/sec
最后
以上就是悦耳中心为你收集整理的[RK3288 Android7.1.2 ]新增wifi模块ap6256的全部内容,希望文章能够帮你解决[RK3288 Android7.1.2 ]新增wifi模块ap6256所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复