Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    RTL的USB接口的WiFi驱动移植问题

    D1系列-RISC-V
    1
    1
    56
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      casojie LV 5 last edited by

      WiFi芯片 rtl8818FU,也是USB接口的WiFi芯片,但是移植编译加载后

      [   65.256086] 8188fu: loading out-of-tree module taints kernel.
      [   91.352280] RTW: module init start
      [   91.352292] RTW: rtl8188fu v5.11.5.4-0-g65b8f0aad.20220413
      [   91.352298] RTW: build time: Feb 28 2023 11:52:06
      [   91.352307] RTW: rtw_drv_entry: power on failed!!(-22)
      [   91.352312] RTW: module init ret=-1
      [  117.393206] RTW: module init start
      [  117.393217] RTW: rtl8188fu v5.11.5.4-0-g65b8f0aad.20220413
      [  117.393223] RTW: build time: Feb 28 2023 11:52:06
      [  117.393232] RTW: rtw_drv_entry: power on failed!!(-22)
      [  117.393237] RTW: module init ret=-1
      

      好像设备注册或者什么出了问题,导致有个变量没有初始化
      e6cdd489-00ac-472e-9ed5-c40c82d1bf3b-ad806a78464f808878442f5c65d42a8.jpg
      还有你们没有遇到驱动原本的platform_ARM_SUNxl_usb.c不能使用吗,我很好奇你们你们这个文件中的函数是怎么写的

      platform_wifi_power_on
      platform_wifi_power_off
      

      这是我的,大佬看看有问题吗

      /******************************************************************************
       *
       * Copyright(c) 2013 - 2017 Realtek Corporation.
       *
       * This program is free software; you can redistribute it and/or modify it
       * under the terms of version 2 of the GNU General Public License as
       * published by the Free Software Foundation.
       *
       * This program is distributed in the hope that it will be useful, but WITHOUT
       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
       * more details.
       *
       *****************************************************************************/
      /*
       * Description:
       *	This file can be applied to following platforms:
       *	CONFIG_PLATFORM_ARM_SUNXI Series platform
       *
       */
      
      #include <drv_types.h>
      
      extern int sunxi_usb_disable_hcd(__u32 usbc_no);
      extern int sunxi_usb_enable_hcd(__u32 usbc_no);
      extern int sunxi_wlan_get_bus_index(void);
      extern void sunxi_wlan_set_power(int on);
      
      int platform_wifi_power_on(void)
      {
          int ret = 0;
          int wlan_bus_index = sunxi_wlan_get_bus_index();
          if (wlan_bus_index < 0)
              return wlan_bus_index;
      
          sunxi_wlan_set_power(1);
          mdelay(100);
          sunxi_usb_enable_hcd(wlan_bus_index);
      
          return ret;
      }
      void platform_wifi_power_off(void)
      {
          int wlan_bus_index = sunxi_wlan_get_bus_index();
          if (wlan_bus_index < 0)
              return wlan_bus_index;
          sunxi_usb_disable_hcd(wlan_bus_index);
          sunxi_wlan_set_power(0);
      }
      

      就是platform_wifi_power_on报错才加载失败的,求指点

      1 Reply Last reply Reply Quote Share 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策