[OpenWrt-Devel] [RFC PATCH] mac80211: brcmfmac: separate SDIO and USB support
José Vázquez
ppvazquezfer at gmail.com
Tue Jan 13 15:57:16 EST 2015
2015-01-13 8:46 GMT+01:00, Zoltan HERPAI <wigyori at uid0.hu>:
> I haven't seen any flags that does SDIO_SUPPORT or something similar. It's
> either removing "depend on USB_SUPPORT" or add dependencies for the
> targets that'll use the SDIO part. Do you know of other approach?
>
> Thanks,
> -w-
>
You are right: there isn't SDIO_SUPPORT flag. I suggested to delete
sunxi dependency because maybe in the future will be support for other
boards that belong to different targets that will need sdio support to
make the wifi work.
Anyway, while only sunxi based boards need it, the patch can be left
as is to avoid confusion.
Regards:
Pepe
> On Tue, 13 Jan 2015, José Vázquez wrote:
>
>> IMHO make sdio selecton depends only on sunxi is not a good idea.
>>
>> 2015-01-07 20:37 GMT+01:00, Zoltan HERPAI <wigyori at uid0.hu>:
>>> This patch will add options to select SDIO and USB support in the
>>> brcmfmac
>>> driver, and not tie it to only support USB. As the driver doesn't build
>>> the host interface code into separate .ko, the required ones are
>>> selected
>>> via config options.
>>>
>>> PCIe support is not added now, can be added later. As of now, only sunxi
>>> would use the SDIO support for the Ampak modules.
>>>
>>> Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
>>> ---
>>> Index: package/kernel/mac80211/Makefile
>>> ===================================================================
>>> --- package/kernel/mac80211/Makefile (revision 43857)
>>> +++ package/kernel/mac80211/Makefile (working copy)
>>> @@ -1477,17 +1477,36 @@
>>>
>>> define KernelPackage/brcmfmac
>>> $(call KernelPackage/mac80211/Default)
>>> - TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
>>> + TITLE:=Broadcom IEEE802.11n USB/SDIO FullMAC WLAN driver
>>> URL:=http://linuxwireless.org/en/users/Drivers/brcm80211
>>> - DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-cfg80211
>>> + at DRIVER_11N_SUPPORT
>>> +kmod-brcmutil
>>> + DEPENDS+= @(USB_SUPPORT||TARGET_sunxi) +kmod-cfg80211
>>> + at DRIVER_11N_SUPPORT +kmod-brcmutil
>>>
>>> FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko
>>> AUTOLOAD:=$(call AutoProbe,brcmfmac)
>>> endef
>>>
>>> define KernelPackage/brcmfmac/description
>>> - Kernel module for Broadcom IEEE802.11n USB Wireless cards
>>> + Kernel module for Broadcom IEEE802.11n USB/SDIO Wireless cards
>>> endef
>>>
>>> +define KernelPackage/brcmfmac/config
>>> + if PACKAGE_kmod-brcmfmac
>>> +
>>> + config PACKAGE_BRCMFMAC_SDIO
>>> + depends TARGET_sunxi
>>> + bool "Broadcom FullMAC SDIO support"
>>> + help
>>> + Say Y if you want to enable SDIO support for the brcmfmac
>>> driver.
>>> +
>>> + config PACKAGE_BRCMFMAC_USB
>>> + select PACKAGE_kmod-usb-core
>>> + default y
>>> + bool "Broadcom FullMAC USB support"
>>> + help
>>> + Say Y if you want to enable USB support for the brcmfmac driver.
>>> +
>>> + endif
>>> +endef
>>> +
>>> config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
>>>
>>> config-y:= \
>>> @@ -1558,8 +1577,9 @@
>>> config-$(call config_package,brcmutil) += BRCMUTIL
>>> config-$(call config_package,brcmsmac) += BRCMSMAC
>>> config-$(call config_package,brcmfmac) += BRCMFMAC
>>> -config-y += BRCMFMAC_USB
>>> +config-$(CONFIG_PACKAGE_BRCMFMAC_USB) += BRCMFMAC_USB
>>> config-$(CONFIG_PACKAGE_BRCM80211_DEBUG) += BRCMDBG
>>> +config-$(CONFIG_PACKAGE_BRCMFMAC_SDIO) += BRCMFMAC_SDIO
>>>
>>> config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
>>>
>>> @@ -1969,12 +1989,25 @@
>>>
>>> define KernelPackage/brcmfmac/install
>>> $(INSTALL_DIR) $(1)/lib/firmware/brcm
>>> +ifeq ($(CONFIG_PACKAGE_BRCMFMAC_USB),y)
>>> $(INSTALL_DATA) \
>>> $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43236b.bin
>>> \
>>> $(1)/lib/firmware/brcm/
>>> $(INSTALL_DATA) \
>>> $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143.bin
>>> \
>>> $(1)/lib/firmware/brcm/
>>> +endif
>>> +ifeq ($(CONFIG_PACKAGE_BRCMFMAC_SDIO),y)
>>> + $(INSTALL_DATA) \
>>> + $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4329-sdio.bin
>>> \
>>> + $(1)/lib/firmware/brcm/
>>> + $(INSTALL_DATA) \
>>> + $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4330-sdio.bin
>>> \
>>> + $(1)/lib/firmware/brcm/
>>> + $(INSTALL_DATA) \
>>> + $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43362-sdio.bin
>>> \
>>> + $(1)/lib/firmware/brcm/
>>> +endif
>>> endef
>>>
>>> $(eval $(call KernelPackage,adm8211))
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list