5

I am trying to solve some issues with my wireless connection and trying to learn something on the way. From here and here I got to know two different ways to know my wireless driver. Thing is, I get two different results:

The first method, sudo lshw -C network gives me the follwing:

configuration: broadcast=yes driver=brcmsmac

While the second, lspci -knn | grep Net -A2 gives me this:

Kernel driver in use: bcma-pci-bridge

From my list of drivers I can find both brcmsmac and bcma:

> lsmod | grep brcmsmac
brcmsmac              563061  0 
cordic                 12574  1 brcmsmac
brcmutil               15579  1 brcmsmac
mac80211              652777  1 brcmsmac
cfg80211              498458  2 brcmsmac,mac80211
bcma                   52320  2 brcmsmac

So, what are exactly these two doing?

gsmafra
  • 183
  • 2
  • 7

2 Answers2

3

Broadcom's hardware design includes a standard PCI/PCIe interface module, which is identical in many of their products. Then there is Broadcom's own proprietary interface bus that can have one or more product-specific modules attached to it.

The bcma module is just the driver for the PCI/PCIe interface module, which will act as a "bridge" between the PCI/PCIe bus and Broadcom's proprietary bus. Once loaded, it will identify the other modules on the Broadcom bus and auto-load drivers for them if possible.

The brcmsmac is the driver for the actual WiFi hardware module. Since that hardware module is not actually present on the PCI(e) bus, lspci can only show the driver for the part that is actually connected to the PCI(e) bus.

You would have to have a new command like lsbcma to tell you more details about the contents of the Broadcom bus... as far as I know, such a command does not actually exist, but I think the diagnostic information that the bcma module outputs to dmesg when loaded can be used for the same purpose, as the Broadcom bus is usually pretty simple.

The brcmutil kernel module contains some code that can be shared between the different Broadcom WiFi modules (brcmsmac and brcmhmac).

telcoM
  • 87,318
  • 3
  • 112
  • 232
2

I had the same questions as you. In my case, the wireless controler is a Broadcom Corporation BCM4313 and the manufacturer and model numbers are 14e4 and 4727 :

$ lspci -nn -s 03:00 |grep -i net 03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)

1 - The module alias of the controler is bcma :

$ cat /lib/modules/$(uname -r)/modules.alias | grep -i 14e4 |grep -i 4727 alias pci:v000014E4d00004727sv*sd*bc*sc*i* bcma

bcma is loaded first and is in charge of the controler interface

2 - brmsmac depends on bcma

# modinfo brcmsmac |grep depends depends: bcma,mac80211,brcmutil,cfg80211,cordic

it is loaded after bcma and is in charge of the wireless protocol

3 - bcma-pci-bridge is not recognized as a driver :

# modinfo bcma-pci-bridge modinfo: ERROR: Module bcma-pci-bridge not found.

so my guess is that bcma-pci-bridge is probably a "free name" used to remember that the controler needs 2 drivers ....

I am not an expert, it is just my guess

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
linoux
  • 21
  • 3
  • You can also use `udevadm` to see the complete device/driver stack; maybe that'll help. – dirkt Mar 05 '19 at 07:15