b43: tell the ucode the mac capabilities

This is based on code form brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Hauke Mehrtens
2014-09-14 23:09:08 +02:00
committed by John W. Linville
parent a43b5142ad
commit 5eb3645e0f
2 changed files with 13 additions and 0 deletions

View File

@@ -4857,6 +4857,16 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
hf &= ~B43_HF_SKCFPUP;
b43_hf_write(dev, hf);
/* tell the ucode MAC capabilities */
if (dev->dev->core_rev >= 13) {
u32 mac_hw_cap = b43_read32(dev, B43_MMIO_MAC_HW_CAP);
b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_MACHW_L,
mac_hw_cap & 0xffff);
b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_MACHW_H,
(mac_hw_cap >> 16) & 0xffff);
}
b43_set_retry_limits(dev, B43_DEFAULT_SHORT_RETRY_LIMIT,
B43_DEFAULT_LONG_RETRY_LIMIT);
b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_SFFBLIM, 3);