Skip to content

Commit

Permalink
adding atbm-wifi package, atbm6012b-ssc333-tapo-c110 module load
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Simpson committed Nov 25, 2024
1 parent 3506ab3 commit d77f457
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 0 deletions.
7 changes: 7 additions & 0 deletions general/overlay/etc/wireless/usb
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ if [ "$1" = "ssw101b-ssc333-tapo-c110" ]; then
exit 0
fi

# SSC333 Tapo C110 v2.6
if [ "$1" = "atbm6012b-ssc333-tapo-c110" ]; then
set_gpio 16 1
modprobe atbm6012b_wifi_usb
exit 0
fi

# SSC335DE Uniview C1L-2WN-G
if [ "$1" = "rtl8188fu-ssc335de-uniview-c1l-2wn-g" ]; then
set_gpio 1 0
Expand Down
1 change: 1 addition & 0 deletions general/package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/aic8800-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/allwinner-osdrv-v83x/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ambarella-osdrv-s3l/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/atbm60xx/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/atbm-wifi/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/aura-httpd/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/autonight/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/aws-producer/Config.in"
Expand Down
20 changes: 20 additions & 0 deletions general/package/atbm-wifi/0001-casting.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/hal_apollo/dev_ioctl.c 2024-11-24 17:40:15.325813428 -0800
+++ b/hal_apollo/dev_ioctl.c 2024-11-24 16:16:47.360567731 -0800
@@ -320,7 +320,7 @@
memcpy(&ap_vendor_cfg_ie.private_ie , &private_ie,sizeof(struct atbm_vendor_cfg_ie));

ap_vendor_cfg_ie.ap_sdata = sdata;
- ieee80211_send_probe_resp_mgmt_queue(hw_priv,&ap_vendor_cfg_ie,1);
+ ieee80211_send_probe_resp_mgmt_queue(hw_priv,(char *) &ap_vendor_cfg_ie,1);



@@ -350,7 +350,7 @@
memset(&customer_action_ie,0,sizeof(struct atbm_customer_action));
customer_action_ie.sdata = sdata;
customer_action_ie.action = msg->externData[1];
- ieee80211_send_action_mgmt_queue(hw_priv,&customer_action_ie,1);
+ ieee80211_send_action_mgmt_queue(hw_priv,(char *)&customer_action_ie,1);
}
}break;
default:{
39 changes: 39 additions & 0 deletions general/package/atbm-wifi/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
config BR2_PACKAGE_ATBM_WIFI
bool "atbm_wifi"
depends on BR2_LINUX_KERNEL
help
Wireless driver atbm-wifi

if BR2_PACKAGE_ATBM_WIFI
choice
prompt "ATBM_WIFI Model"
help
Select the ATBM_WIFI model

config BR2_PACKAGE_ATBM_WIFI_MODEL_6012B
bool "ATBM6012b"

config BR2_PACKAGE_ATBM_WIFI_MODEL_603X
bool "ATBM603x"

config BR2_PACKAGE_ATBM_WIFI_MODEL_6132
bool "ATBM6132"

endchoice

if BR2_PACKAGE_ATBM_WIFI_MODEL_6012B || BR2_PACKAGE_ATBM_WIFI_MODEL_603X || BR2_PACKAGE_ATBM_WIFI_MODEL_6132
choice
prompt "Interface type for selected ATBM-WIFI model"
help
Select the interface type for the selected ATBM-WIFI model

config BR2_PACKAGE_ATBM_WIFI_INTERFACE_USB
bool "USB"

config BR2_PACKAGE_ATBM_WIFI_INTERFACE_SDIO
bool "SDIO"

endchoice

endif
endif
54 changes: 54 additions & 0 deletions general/package/atbm-wifi/atbm-wifi.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
################################################################################
#
# atbm-wifi
#
################################################################################

ATBM_WIFI_SITE = $(call github,gtxaspec,atbm-wifi,$(ATBM_WIFI_VERSION))
ATBM_WIFI_VERSION = HEAD

define ATBM_WIFI_INSTALL_TARGET_CMDS
# $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/share/ATBM-WIFI_conf
# $(INSTALL) -m 644 -t $(TARGET_DIR)/usr/share/ATBM-WIFI_conf $(ATBM-WIFI_PKGDIR)/files/*.txt
endef

ATBM_WIFI_MODULE_MAKE_OPTS = KSRC=$(LINUX_DIR)

# Set the module name based on the model and interface type
ATBM_WIFI_MODEL_NAME =

# Disable all models by default
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM6012B_y=n CONFIG_ATBM603x=n CONFIG_ATBM6132=n

# Enable the selected model and set the interface type
ifeq ($(BR2_PACKAGE_ATBM_WIFI_MODEL_6012B),y)
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM6012B_y=y
ATBM_WIFI_MODEL_NAME = atbm6012b_wifi
endif
ifeq ($(BR2_PACKAGE_ATBM_WIFI_MODEL_603X),y)
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM603x=y
ATBM_WIFI_MODEL_NAME = atbm603x_wifi
endif
ifeq ($(BR2_PACKAGE_ATBM_WIFI_MODEL_6132),y)
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM6132=y
ATBM_WIFI_MODEL_NAME = atbm6132_wifi
endif

# Set the interface type
ifeq ($(BR2_PACKAGE_ATBM_WIFI_INTERFACE_USB),y)
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM_USB_BUS=y CONFIG_ATBM_SDIO_BUS=n
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM_MODULE_NAME="$(ATBM_WIFI_MODEL_NAME)_usb"
ifneq ($(BR2_PACKAGE_ATBM_WIFI_USB_PID),)
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM_USB_PID="$(BR2_PACKAGE_ATBM_WIFI_USB_PID)"
endif
endif

ifeq ($(BR2_PACKAGE_ATBM_WIFI_INTERFACE_SDIO),y)
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM_USB_BUS=n CONFIG_ATBM_SDIO_BUS=y
ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM_MODULE_NAME="$(ATBM_WIFI_MODEL_NAME)_sdio"
endif

ATBM_WIFI_LICENSE = GPL-2.0

$(eval $(kernel-module))
$(eval $(generic-package))
3 changes: 3 additions & 0 deletions general/package/atbm-wifi/files/atbm_txpwer_dcxo_cfg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
delta_gain1:-1 delta_gain2:-1 delta_gain3:-1 dcxo:-1
b_delta_gain1:10 b_delta_gain2:12 b_delta_gain3:15
gn_delta_gain1:10 gn_delta_gain2:8 gn_delta_gain3:12
11 changes: 11 additions & 0 deletions general/package/atbm-wifi/files/set_rate_power.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
b_1M_2M=0
b_5_5M_11M=0
g_6M_n_6_5M=0
g_9M=0
g_12M_n_13M=0
g_18M_n_19_5M=0
g_24M_n_26M=0
g_36M_n_39M=0
g_48M_n_52M=0
g_54M_n_58_5M=0
n_65M=2

0 comments on commit d77f457

Please sign in to comment.