[Samsung Galaxy Player 4.0, 5.0] rjwil1086:
I've been playing with this but I haven't made any progress so I haven't posted anything. What I can note is that if I setup the wifi manually it connects every time. This is with my wifi configuration in wpa_supplicant.conf. I'm using WPA2 Personal at the house.

If I attempt to start wifi from the GUI, typically it will work the first time after a reboot. After that it gets iffy. Usually if I wait 10 minutes or so it will work again normally.

I'm not using all of ambrice's work though. I'm using entropy's kernel and initramfs from his github and cyanogen 7 form ambrices github.

(ex. from adb)

start kernel module

# insmod /system/lib/modules/dhd.ko firmware_path=/sytem/etc/wifi/bcm4329_fw.bin nvram_path=/system/etc/wifi/nvram_net.txt

start wpa_supplicant 6

# wpa_supplicant -dd -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf

Here is what I see in dmesg when the error occurs. What right looks like is below. Note what is seen after the READ MAC line. The problem has something to do with SDIO i think but I haven't done much programming in a few years and virutally no work in a linux kernel or android, so it's been slow going debugging the issue.

Please let me know if I sound like a babbling fool or if any of this makes any since to anyone.

<4>[ 1210.909880] ## wifi_probe
<4>[ 1210.911227] wifi_set_power = 1
<4>[ 1211.007489] wifi_set_carddetect = 1
<7>[ 1211.009714] sdhci_s3c_force_presence_change : Enter
<4>[ 1211.014725]
<4>[ 1211.014735] Dongle Host Driver, version 4.218.248.182
<4>[ 1211.014748] Compiled in drivers/net/wireless/bcm4329/src on Jul 3 2012 at 23:25:09
<4>[ 1211.122342] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
<6>[ 1211.126784] mmc2: new SDIO card at address 0001
<4>[ 1211.137217] dhd_customer_oob_irq_map: customer specific Host GPIO number is (164)
<4>[ 1211.144885] F1 signature read @0x18000000=0x9934329
<4>[ 1211.152680] DHD: dongle ram size is set to 294912(orig 294912)
<4>[ 1211.222836] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
<6>[ 1211.314751] wake enabled for irq 164
<4>[ 1211.317559] Read MAC : [F8:D0:BD:72:E2:7D] [1]
[B]<4>[ 1212.093603] dhdsdio_htclk: HT Avail timeout (1000000): clkctl 0x00[/B]
<3>[ 1214.917141] mmc2: cmd 53 data timeout error
<3>[ 1217.738243] mmc2: cmd 53 data timeout error
<3>[ 1220.559344] mmc2: cmd 53 data timeout error
<4>[ 1220.563859] dhdsdio_dpc: FAILEDnewstatusREAD, LINE 4173
<4>[ 1220.568545] dhdsdio_dpc: failed backplane access over SDIO, halting operation 1
<4>[ 1220.579371] dhdsdio_htclk: HT Avail request error: -35
<3>[ 1220.588062] mmc2: cmd 53 data crc error
<3>[ 1220.609197] mmc2: cmd 53 data crc error
<3>[ 1220.634742] mmc2: cmd 53 data crc error
<4>[ 1220.658043] dhdsdio_htclk: HT Avail request error: -35
<3>[ 1220.662600] mmc2: cmd 53 data crc error
<3>[ 1220.666045] mmc2: cmd 53 data crc error
<3>[ 1220.669865] mmc2: cmd 53 data crc error
<4>[ 1220.673908] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2754
<4>[ 1220.681342] dhd_bus_stop: Failed to force clock for F2: err -35
<3>[ 1220.688810] mmc2: cmd 53 data crc error
<3>[ 1220.691683] mmc2: cmd 53 data crc error
<3>[ 1220.695567] mmc2: cmd 53 data crc error
<4>[ 1220.699561] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2774
<4>[ 1220.709198] dhdsdio_htclk: HT Avail request error: -35
<3>[ 1220.713727] mmc2: cmd 53 data crc error
<3>[ 1220.717197] mmc2: cmd 53 data crc error
<3>[ 1220.721003] mmc2: cmd 53 data crc error
<4>[ 1220.725062] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2754
<4>[ 1220.732418] dhd_bus_stop: Failed to force clock for F2: err -35
<3>[ 1220.739887] mmc2: cmd 53 data crc error
<3>[ 1220.742768] mmc2: cmd 53 data crc error
<3>[ 1220.746649] mmc2: cmd 53 data crc error
<4>[ 1220.750644] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2774
<4>[ 1220.757922] eth%d: set cur_etheraddr failed
<4>[ 1220.761505] dhd_bus_start: _dhd_set_mac_address() failed
<4>[ 1220.770594] dhdsdio_htclk: HT Avail request error: -35
<3>[ 1220.775052] mmc2: cmd 53 data crc error
<3>[ 1220.794146] mmc2: cmd 53 data crc error
<3>[ 1220.814603] mmc2: cmd 53 data crc error
<4>[ 1220.833296] dhdcdc_query_ioctl: dhdcdc_msg failed w/status -5
<4>[ 1220.840436] dhdsdio_htclk: HT Avail request error: -35
<3>[ 1220.844680] mmc2: cmd 53 data crc error
<3>[ 1220.848658] mmc2: Got data interrupt 0x00000002 even though no data operation was in progress.
<7>[ 1220.857155] sdhci: ============== REGISTER DUMP ==============
<7>[ 1220.857203] sdhci: Sys addr: 0x3fc0a100 | Version: 0x00002401
<7>[ 1220.857250] sdhci: Blk size: 0x000070c0 | Blk cnt: 0x00000000
<7>[ 1220.857297] sdhci: Argument: 0xa50000c0 | Trn mode: 0x00000003
<7>[ 1220.857344] sdhci: Present: 0x01fa3000 | Host ctl: 0x00000013
<7>[ 1220.857389] sdhci: Power: 0x0000000e | Blk gap: 0x00000000
<7>[ 1220.857434] sdhci: Wake-up: 0x00000000 | Clock: 0x0000000f
<7>[ 1220.857479] sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
<7>[ 1220.857525] sdhci: Int enab: 0x02ff00cb | Sig enab: 0x02ff00cb
<7>[ 1220.857570] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
<7>[ 1220.857616] sdhci: Caps: 0x05e80080 | Max curr: 0x00000000
<7>[ 1220.857661] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x3d980808
<7>[ 1220.857700] sdhci: ===========================================
<3>[ 1220.875468] mmc2: cmd 53 data crc error
<3>[ 1220.894623] mmc2: cmd 53 data crc error
<4>[ 1220.913359] dhdcdc_query_ioctl: dhdcdc_msg failed w/status -5
<4>[ 1220.918030] dhdsdio_probe: failed
<4>[ 1220.923281] dhdsdio_htclk: HT Avail request error: -35
<4>[ 1220.927433] wl_iw_detach: Enter
<4>[ 1220.933074] dhdsdio_htclk: HT Avail request error: -35
<3>[ 1220.936998] mmc2: cmd 53 data crc error
<3>[ 1220.940981] mmc2: cmd 53 data crc error
<3>[ 1220.944676] mmc2: cmd 53 data crc error
<4>[ 1220.948410] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2754
<4>[ 1220.956118] dhd_bus_stop: Failed to force clock for F2: err -35
<3>[ 1220.964120] mmc2: cmd 53 data crc error
<3>[ 1220.966915] mmc2: cmd 53 data crc error
<3>[ 1220.970627] mmc2: cmd 53 data crc error
<4>[ 1220.974347] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2774
<6>[ 1220.979991] wake disabled for irq 164
<4>[ 1220.986523] bcmsdh_sdmmc: probe of mmc2:0001:3 failed with error -5
<6>[ 1224.534077] [BAT]:s3c_bat_set_compesation: device_state=0x800, compensation=-130
<4>[ 1239.201681] ## wifi_remove
<4>[ 1239.208071] wifi_set_carddetect = 0
<7>[ 1239.211695] sdhci_s3c_force_presence_change : Enter
<4>[ 1239.211840] wifi_set_power = 0
<3>[ 1239.273311] mmc2: cmd 7 command crc error
<3>[ 1239.276710] mmc2: cmd 7 command crc error
<3>[ 1239.281412] mmc2: cmd 7 command crc error
<3>[ 1239.284855] mmc2: cmd 7 command crc error
<6>[ 1239.310290] mmc2: card 0001 removed
<6>[ 1254.596639] [BAT]:s3c_bat_set_compesation: device_state=0x800, compensation=-130

AND here is what good looks like

<4>[ 14.669078] ## wifi_probe
<4>[ 14.670343] wifi_set_power = 1
<4>[ 14.756029] wifi_set_carddetect = 1
<7>[ 14.758132] sdhci_s3c_force_presence_change : Enter
<4>[ 14.759121]
<4>[ 14.759125] Dongle Host Driver, version 4.218.248.182
<4>[ 14.759131] Compiled in drivers/net/wireless/bcm4329/src on Jul 3 2012 at 23:25:09
<4>[ 14.870751] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
<6>[ 14.881648] mmc2: new SDIO card at address 0001
<4>[ 14.900272] dhd_customer_oob_irq_map: customer specific Host GPIO number is (164)
<4>[ 14.928200] F1 signature read @0x18000000=0x9934329
<4>[ 14.944666] DHD: dongle ram size is set to 294912(orig 294912)
<4>[ 14.987440] [VIBETONZ] enable_vibetonz_from_user : time = 0 msec
<4>[ 14.998206] [VIBETONZ] DISABLE
<4>[ 15.019009] [VIBETONZ] enable_vibetonz_from_user : time = 1 msec
<4>[ 15.023751] [VIBETONZ] ENABLE
<6>[ 15.027897] request_suspend_state: wakeup (3->0) at 13932136919 (2012-07-05 05:53:23.401181460 UTC)
<4>[ 15.042556] [VIBETONZ] DISABLE
<4>[ 15.045102] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
<4>[ 15.062733] [VIBETONZ] enable_vibetonz_from_user : time = 21 msec
<4>[ 15.067705] [VIBETONZ] ENABLE
<4>[ 15.092547] [VIBETONZ] DISABLE
<6>[ 15.174321] wake enabled for irq 164
[B]<4>[ 15.176638] Read MAC : [F8:D0:BD:72:E2:7D] [1] [/B]

<4>[ 15.214776] Firmware version = wl0: Apr 9 2011 23:33:08 version 4.218.248.184
<4>[ 15.384366] DHD Enable Keep Alive : 60 sec
<4>[ 15.391081] eth0: Broadcom Dongle Host Driver mac=f8:d0:bd:72:e2:7d
<4>[ 15.420794] Enter wl_control_wl_start
<4>[ 15.423222] Exited wl_control_wl_start
<4>[ 16.006803] wl_iw_event: dev=eth0 event=26
<4>[ 16.010361] results->count = 2
<4>[ 16.012679] results->buflen = 672
<4>[ 16.025651] Send Event ISCAN complete
<4>[ 16.127930] new_value = 1, old state = 0
<4>[ 16.130529] starting poll timer, delay 50000000ns
<4>[ 16.976052] eth0: SIOCSIWMODE
<4>[ 16.978852] eth0: SIOCSIWCOMMIT
<4>[ 16.989189] eth0: SIOCGIWRANGE
<4>[ 16.999286] eth0: SIOCGIWMODE
<4>[ 17.001588] eth0: SIOCSIWAP
<4>[ 17.053451] Unknown PRIVATE command 'RXFILTER-ADD 0'
<4>[ 17.057530] Unknown PRIVATE command 'RXFILTER-ADD 1'
<4>[ 17.135605] eth0 wl_iw_iscan_get_scan buflen_from_user 8192:
<4>[ 17.140058] eth0: SIOCGIWSCAN GET broadcast results
<4>[ 17.193644] wl_iw_iscan_get_scan return to WE 528 bytes APs=2
<4>[ 17.236655] eth0: SIOCSIWMODE
<4>[ 17.253396] eth0: SIOCSIWCOMMIT
<4>[ 17.265052] eth0: SIOCSIWGENIE
<4>[ 17.298373] eth0: SIOCSIWFREQ
<4>[ 17.300012] eth0: SIOCSIWCOMMIT
<4>[ 17.319860] eth0: SIOCSIWESSID
<4>[ 17.321556] wl_iw_ch_to_chanspec join_params->params.chanspec_list[0]= 2B01
<4>[ 17.394577] wl_iw_set_essid: join SSID=w_home ch=1
<4>[ 17.420197] eth0: SIOCSIWAP
<4>[ 17.421753] wl_iw_ch_to_chanspec join_params->params.chanspec_list[0]= 2B01
<4>[ 17.459708] wl_iw_event: dev=eth0 event=3
<4>[ 17.462481] Unknown Event 3: ignoring
<4>[ 17.485412] wl_iw_event: dev=eth0 event=16
<4>[ 17.488272] STA_LINK_UP
<4>[ 17.490639] Link UP
<4>[ 17.522078] Unknown PRIVATE command 'RXFILTER-ADD 3'
<4>[ 17.529983] wl_iw_event: dev=eth0 event=3
<4>[ 17.532679] Unknown Event 3: ignoring
<4>[ 17.553911] wl_iw_event: dev=eth0 event=16
<4>[ 17.556774] STA_LINK_UP
<4>[ 17.559112] Link UP
<4>[ 17.574130] eth0: SIOCGIWAP
<4>[ 17.582867] eth0: SIOCGIWAP
<4>[ 17.603479] eth0: SIOCGIWESSID
<4>[ 17.613823] eth0: SIOCGIWAP
<4>[ 17.636030] Unknown PRIVATE command 'RXFILTER-START'
<4>[ 17.640132] eth0: SIOCGIWESSID
<4>[ 17.671572] eth0: SIOCGIWAP
<4>[ 17.684034] eth0: SIOCGIWESSID
<4>[ 17.717262] wl_iw_event: dev=eth0 event=1
<4>[ 17.719963] STA connect received 1
<4>[ 17.723534] wl_iw_event: dev=eth0 event=0
<4>[ 17.727497] Unknown Event 0: ignoring
<4>[ 17.731380] eth0: SIOCGIWAP
<4>[ 17.737187] Unknown PRIVATE command 'BTCOEXSCAN-STOP'
<4>[ 17.829660] wl_iw_get_power_mode: Powermode = 2