ath9k bluetooth coexistence

ath9k supports Bluetooth coexistence under the 2-wire and 3-wire scheme. This section documents how this is supported and under what chipsets.

GPIO pin setup and configuration

Bluetooth coexistence on ath9k requires configuring the GPIO pins accordingly and setting up the coexistence scheme. The driver does this automatically upon module load as follows:

        if (AR_SREV_9280_10_OR_LATER(ah) &&
            ath9k_hw_btcoex_supported(ah)) {
                btcoex_hw->btactive_gpio = ATH_BTACTIVE_GPIO;
                btcoex_hw->wlanactive_gpio = ATH_WLANACTIVE_GPIO;

                if (AR_SREV_9285(ah)) {
                        btcoex_hw->scheme = ATH_BTCOEX_CFG_3WIRE;
                        btcoex_hw->btpriority_gpio = ATH_BTPRIORITY_GPIO;
                } else {
                        btcoex_hw->scheme = ATH_BTCOEX_CFG_2WIRE;
                }
        } else {
                btcoex_hw->scheme = ATH_BTCOEX_CFG_NONE;
        }

The ath9k_hw_btcoex_supported() check above enables BT coex only for specific subsystem IDs which we know have the GPIO pins connected for 2-wire or 3-wire coexistence. The details are listed below.

Chipset

BT-coex-scheme

Subsystem device ID

AR9280

2-wire

0x309b

AR9285

3-wire

0x30aa

AR9285

3-wire

0x30ab

Prior to enabling Bluetooth coexistence ASPM is disabled for PCI devices via ath_pci_bt_coex_prep(), a bus specific call. IfUSB or other bus requires bus specific changes prior to enabling bt-coexyou can add the respective callback for the bus (USB or AHB, for example).

Bluetooth coexistence code

The code for Bluetooth coexistence is in the file btcoex.c

2-wire Bluetooth coexistence

This is supported and enabled on all devices >= AR9280 except AR9285. This is initialized via ath9k_hw_btcoex_init_2wire().

3-wire Bluetooth coexistence

This is supported and enabled on all AR9285 devices. This is initialized via ath9k_hw_btcoex_init_3wire().

Enabling bluetooth coexistence

Bluetooth coexistence is automatically detected and enabled as of 2.6.32 so youdo not have to do anything for it. For kernels older than 2.6.32 you can can enable bluetooth coexistence on ath9k by using thebtcoex_enable module parameter, but you should not enable it unless you know you have one of the devices listed above.

modprobe ath9k btcoex_enable=1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值