8
8
from jockey.oslib import OSLib
9
9
from jockey.handlers import KernelModuleHandler
11
# PCI ID data gathered from the firmware-b43* postinst scripts
15
"4301" : "firmware-b43legacy-installer",
16
"4306" : "firmware-b43legacy-installer",
18
"4315" : "firmware-b43-lpphy-installer",
20
"4321" : "firmware-b43-installer",
21
"4324" : "firmware-b43-installer",
22
"4325" : "firmware-b43-installer",
23
"4328" : "firmware-b43-installer",
24
"4329" : "firmware-b43-installer",
25
"43b5" : "firmware-b43-installer",
29
11
class B43Handler(KernelModuleHandler):
30
12
'''Handler for Broadcom Wifi chipsets which use the b43 module and
33
15
def __init__(self, ui):
34
16
KernelModuleHandler.__init__(self, ui, 'b43')
35
# ideally we would look at self._modinfo and the alias field
36
# in there. but for b43 this is ssb: and mapping that to a
37
# PCI id seems to be not straightforward (like walking the sysfs
38
# tree, finding the right uevent file with the matching ssb ID,
39
# and then walking "up" (cd ..) to the pci device and then checking
41
# so a simpler apparoch is used
42
for line in OSLib.inst.lspci():
44
(vendor_id, device_id) = line.split()[2].split(":")
45
if vendor_id == BASE_ID and device_id in PCIID_TO_DRIVER:
46
self.package = PCIID_TO_DRIVER[device_id]
51
raise SystemError, "Unknown/Unsupported pciid"
18
self.package = "firmware-b43-installer"
54
21
'''Return if the handler is enabled.