Jump to content

[DEV] [JB] [CM10] [4.1.1] CyanogenMod 10 for the Huawei Ascend G300 [ROM] [Last updated: 26/08]


Guest Dazzozo

Recommended Posts

Daz, Samsung Tuna uses bcm4330 and from what i can tell, they use the bcmdhd driver just fine.

https://github.com/C.../BoardConfig.mk


# Wifi related defines
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_WLAN_DEVICE := bcmdhd
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
#WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/bcmdhd.ko"
WIFI_DRIVER_FW_PATH_STA := "/vendor/firmware/fw_bcmdhd.bin"
WIFI_DRIVER_FW_PATH_P2P := "/vendor/firmware/fw_bcmdhd_p2p.bin"
WIFI_DRIVER_FW_PATH_AP := "/vendor/firmware/fw_bcmdhd_apsta.bin"
[/CODE] https://github.com/C...ybean/device.mk
[CODE]BOARD_WLAN_DEVICE_REV := bcm4330_b2
WIFI_BAND := 802_11_ABG
$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/firmware/bcm4330/device-bcm.mk)

Kernel source is here: https://github.com/C...ng_tuna/tree/jb

Would love to help but no device tree made public yet from you

Worth a try, revving up a build now

Link to comment
Share on other sites

Guest timfimjim

The longer we wait for the next release, the more things that are getting fixed and the better the ROM will be. Until a new release comes out (depending on how much time you have), either use another ROM, or look into development and maybe you could help Dazzozo? :)

Link to comment
Share on other sites

I've not had much luck with bcm4330 open source, case in point Blade2 :P

Yeah I didn't have much look on the blade2 myself with that but at the time a few people suggested using the Samsung code. I've just seen somebody else suggest using it too. In the meantime hex editing will work although it's rather messy.

I so need to pick up a G300 cheap. Guess who missed the Tesco ones.. yeah :(

Link to comment
Share on other sites

Yeah, I hex edited module_layout, but then that led to another 20 address differences, symbols in cfg80211, etc.

I'll probably just suck it up and hex edit it all. I think all the addresses can be found in System.map, though I'm not sure how many are actually in dhd_4330.ko...

I tried brcm80211, I ended up with two modules and didn't manage to get anywhere with it. I also tried the Tuna method (pretty much word for word) and couldn't get any interface online at all. There are no modules involved there, it all seems to build in to the kernel itself.

What happened to the Tesco deal? Has it ended? Get oneeee, more devs :P

Link to comment
Share on other sites

Even with the exact same version:

<4>[1204, insmod] [ 431.605674] [DHD]

<4>[1204, insmod] [ 431.605684] Dongle Host Driver, version 5.90.125.120.2

<4>[1204, insmod] [ 431.605691] Compiled in drivers/net/wireless/bcmdhd on Sep27 2012 at 18:01:18

<4>[1204, insmod] [ 443.604564] [DHD] dhd_module_init: sdio_register_driver timeout

Hex hacking, here we come. :P

Link to comment
Share on other sites

I got distracted and found the vendor/qcom/msm7627a repo, and I'm building with some optimisations Qcom use for 7x27a.

I also merged recent updates to the kernel which broke things, and then I fixed them. :P

I'll work on the module once I see it through that all this builds still.

Link to comment
Share on other sites

I found a little endian big endian converter which is saving my ass here. :P

bcmdhd helps too, I dumped modversions on it, and they're all in the same order as dhd_4330. Copy address -> paste it in to converter -> copy output -> replace it in dhd_4330.

Long night. :D

Link to comment
Share on other sites

Done all but three addresses.

<4>[1468, Thread-147] [ 5337.642574] dhd: disagrees about version of symbol kobject_uevent_env

<4>[1468, Thread-147] [ 5337.642649] dhd: Unknown symbol kobject_uevent_env (err -22)

<4>[1468, Thread-147] [ 5337.642759] dhd: disagrees about version of symbol init_net

<4>[1468, Thread-147] [ 5337.642809] dhd: Unknown symbol init_net (err -22)

<4>[1468, Thread-147] [ 5337.644151] dhd: disagrees about version of symbol dev_get_by_name

<4>[1468, Thread-147] [ 5337.644204] dhd: Unknown symbol dev_get_by_name (err -22)

Why these? These aren't in bcmdhd, so I'm going to have to find the addresses somewhere else. I can't manage to make System.map ones work.

Edit: I managed to find init_net in cfg80211. The other two are really tricky, I can't find them in any module.

Link to comment
Share on other sites

I got them, but RIP.


<4>[1505, Thread-154] [ 6385.288416] dhd_module_init: Enter
<4>[1505, Thread-154] [ 6385.288597] ## wifi_probe
<4>[1505, Thread-154] [ 6385.288609] wifi_set_power = 1
<3>[1505, Thread-154] [ 6385.441589] bcm_wifi_set_power: wifi power successed to pull up
<4>[1505, Thread-154] [ 6385.441614] dhd_enable_mmchost_polling: /sys/devices/platform/msm_sdcc.2/polling
<4>[1505, Thread-154] [ 6385.441672] store_polling : no need to enable polling for slot 2 (as host->pdev_id)
<4>[1505, Thread-154] [ 6385.476377]
<4>[1505, Thread-154] [ 6385.476389] Dongle Host Driver, version 5.90.125.120.2
<6>[1479, kworker/u:1] [ 6385.743191] mmc2: new high speed SDIO card at address0001
<4>[1479, kworker/u:1] [ 6385.746047] dhd_customer_oob_irq_map oob gpio is : 48;wifi slot is :2
<4>[1479, kworker/u:1] [ 6385.746162] alloc static buf at dc540000!
<4>[1479, kworker/u:1] [ 6385.746516] dhd_common_init:fw_path = /data/misc/wifi/load/firmware.bin
<4>[1479, kworker/u:1] [ 6385.751782] DHD: dongle ram size is set to 294912(orig 294912)
<4>[1479, kworker/u:1] [ 6385.752067] ------------[ cut here ]------------
<4>[1479, kworker/u:1] [ 6385.752106] WARNING: at /home/Dazzozo/source/cm10/kernel/huawei/u8815/net/wireless/util.c:136 ieee80211_set_bitrate_flags+0x16c/0x180[cfg80211]()
<4>[1479, kworker/u:1] [ 6385.752121] Modules linked in: dhd(+) cfg80211 [last unloaded: cfg80211]
<4>[1479, kworker/u:1] [ 6385.752169] [<c0043344>] (unwind_backtrace+0x0/0x11c)from [<c00b2f7c>] (warn_slowpath_common+0x4c/0x64)
<4>[1479, kworker/u:1] [ 6385.752192] [<c00b2f7c>] (warn_slowpath_common+0x4c/0x64) from [<c00b2fac>] (warn_slowpath_null+0x18/0x1c)
<4>[1479, kworker/u:1] [ 6385.752221] [<c00b2fac>] (warn_slowpath_null+0x18/0x1c) from [<bf7a2740>] (ieee80211_set_bitrate_flags+0x16c/0x180 [cfg80211])
<4>[1479, kworker/u:1] [ 6385.752261] [<bf7a2740>] (ieee80211_set_bitrate_flags+0x16c/0x180 [cfg80211]) from [<bf7a0f54>] (wiphy_register+0x320/0x414 [cfg80211])
<4>[1479, kworker/u:1] [ 6385.752326] [<bf7a0f54>] (wiphy_register+0x320/0x414 [cfg80211]) from [<bf7ec434>] (wl_cfg80211_attach+0x208/0xae8 [dhd])
<4>[1479, kworker/u:1] [ 6385.752392] [<bf7ec434>] (wl_cfg80211_attach+0x208/0xae8 [dhd]) from [<bf7c82f4>] (dhd_attach+0x2b4/0x6e8 [dhd])
<4>[1479, kworker/u:1] [ 6385.752454] [<bf7c82f4>] (dhd_attach+0x2b4/0x6e8 [dhd]) from [<bf7d6bf0>] (dhdsdio_probe+0x300/0x60c [dhd])
<4>[1479, kworker/u:1] [ 6385.752521] [<bf7d6bf0>] (dhdsdio_probe+0x300/0x60c [dhd]) from [<bf7deaf0>] (bcmsdh_probe+0xe4/0x138 [dhd])
<4>[1479, kworker/u:1] [ 6385.752569] [<bf7deaf0>] (bcmsdh_probe+0xe4/0x138 [dhd]) from [<c03d2f9c>] (sdio_bus_probe+0x88/0xec)
<4>[1479, kworker/u:1] [ 6385.752596] [<c03d2f9c>] (sdio_bus_probe+0x88/0xec) from [<c02b378c>] (driver_probe_device+0x144/0x28c)
<4>[1479, kworker/u:1] [ 6385.752624] [<c02b378c>] (driver_probe_device+0x144/0x28c) from [<c02b2548>] (bus_for_each_drv+0x4c/0x84)
<4>[1479, kworker/u:1] [ 6385.752646] [<c02b2548>] (bus_for_each_drv+0x4c/0x84)from [<c02b35cc>] (device_attach+0x74/0xa0)
<4>[1479, kworker/u:1] [ 6385.752666] [<c02b35cc>] (device_attach+0x74/0xa0) from [<c02b2dc0>] (bus_probe_device+0x24/0x40)
<4>[1479, kworker/u:1] [ 6385.752687] [<c02b2dc0>] (bus_probe_device+0x24/0x40)from [<c02b1394>] (device_add+0x3f8/0x574)
<4>[1479, kworker/u:1] [ 6385.752709] [<c02b1394>] (device_add+0x3f8/0x574) from [<c03d318c>] (sdio_add_func+0x34/0x4c)
<4>[1479, kworker/u:1] [ 6385.752732] [<c03d318c>] (sdio_add_func+0x34/0x4c) from [<c03d27e8>] (mmc_attach_sdio+0x278/0x324)
<4>[1479, kworker/u:1] [ 6385.752754] [<c03d27e8>] (mmc_attach_sdio+0x278/0x324) from [<c03cc8d8>] (mmc_rescan+0x274/0x31c)
<4>[1479, kworker/u:1] [ 6385.752781] [<c03cc8d8>] (mmc_rescan+0x274/0x31c) from [<c00c7340>] (process_one_work+0x1f8/0x34c)
<4>[1479, kworker/u:1] [ 6385.752806] [<c00c7340>] (process_one_work+0x1f8/0x34c) from [<c00c7e2c>] (worker_thread+0x1fc/0x370)
<4>[1479, kworker/u:1] [ 6385.752829] [<c00c7e2c>] (worker_thread+0x1fc/0x370) from [<c00cb480>] (kthread+0x7c/0x84)
<4>[1479, kworker/u:1] [ 6385.752851] [<c00cb480>] (kthread+0x7c/0x84) from [<c003ec14>] (kernel_thread_exit+0x0/0x8)
<4>[1479, kworker/u:1] [ 6385.752866] ---[ end trace f2c4dc69874a0e10 ]---
<4>[1479, kworker/u:1] [ 6385.765784] Broadcom Dongle Host Driver: register interface [eth0] MAC: 00:90:4c:11:22:33
<4>[1505, Thread-154] [ 6385.776051] wifi_set_power = 0
<3>[1505, Thread-154] [ 6385.777091] bcm_wifi_set_power: wifi power successed to pull down
<4>[1505, Thread-154] [ 6385.777101] =========== WLAN placed in RESET ========
<4>[1511, wpa_supplicant] [ 6385.915737]
<4>[1511, wpa_supplicant] [ 6385.915752] Dongle Host Driver, version 5.90.125.120.2
<4>[1511, wpa_supplicant] [ 6385.915769] wl_android_wifi_on in
<4>[1511, wpa_supplicant] [ 6385.915781] wifi_set_power = 1
<3>[1511, wpa_supplicant] [ 6386.236074] bcm_wifi_set_power: wifi power successed to pull up
<4>[1511, wpa_supplicant] [ 6386.236099] =========== WLAN going back to live ========
<4>[1511, wpa_supplicant] [ 6386.236111] sdio_reset_comm():
<4>[1511, wpa_supplicant] [ 6386.420549] dhd_preinit_ioctls: use MAC address innvram 00:90:4c:ce:43:30
<4>[1511, wpa_supplicant] [ 6386.420574] Firmware up: op_mode=1, Broadcom Dongle Host Driver mac=00:90:4c:ce:43:30
<4>[1511, wpa_supplicant] [ 6386.897467] wl_android_wifi_off in
<3>[1511, wpa_supplicant] [ 6386.902556] bcm_wifi_set_power: wifi power successed to pull down
<4>[1511, wpa_supplicant] [ 6386.902612] =========== WLAN placed in RESET ========
<4>[1511, wpa_supplicant] [ 6386.908156] do_exit: exit code=65280
<4>[1511, wpa_supplicant] [ 6386.908506] wpa_supplicant used greatest stack depth: 4768 bytes left
[/CODE]

Unless there's any other solution I'm probably going to have to revert parts of the net code in the kernel to 3.0.8.

Link to comment
Share on other sites

It begins to start printing the error at

------------[ cut here ]------------

You can relate that to the other log on that page. Currently I'm just seeing if I can find any bcm4330 drivers that have identical print messages.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.