No Joy with Wireless

I have been playing with this for sometime now (maybe years).Here as instructed is some hopefully helpful stuff:

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0d49:7310 Maxtor
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 007: ID 0bda:8192 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 045e:009d Microsoft Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 045e:00f7 Microsoft Corp. LifeCam VX-1000
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 04b8:0005 Seiko Epson Corp. Stylus D88+

and:

6.024344] usb 1-4.2: new high speed USB device using ehci_hcd and address 7
6.123304] usb 1-4.2: New USB device found, idVendor=0bda, idProduct=8192
6.123313] usb 1-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
6.123320] usb 1-4.2: Product: RTL8192 WLAN Adapter
6.123324] usb 1-4.2: Manufacturer: Realtek
6.123328] usb 1-4.2: SerialNumber: 00e04c000001
6.123532] usb 1-4.2: configuration #1 chosen from 1 choice

and:

iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 802.11b/g Mode:Managed Access Point: Not-Associated
Bit Rate:0 kb/s
Retry min limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

and:

sudo /usr/sbin/iwlist scan
lo Interface doesn’t support scanning.

eth0 Interface doesn’t support scanning.

wlan0 Interface doesn’t support scanning : Network is down

I have three other wireless devices accessing my router and all work well.

Help will be appreciated.

TIA

Here is some more stuff that looks relevant!

] rtl819xU: —>FirmwareDownload92S()
110.453748]
110.453760] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
110.480377] rtl819xU:request firmware fail!
110.480380]
110.480677] rtl819xU:Firmware Download Fail!!4544
110.480680]
110.497115] rtl819xU: —>FirmwareDownload92S()
110.497122]
110.497135] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
110.511539] rtl819xU:request firmware fail!
110.511542]
110.511742] rtl819xU:Firmware Download Fail!!4544
110.511745]
110.511751] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
110.511753]
112.934101] ip_tables: (C) 2000-2006 Netfilter Core Team
298.211847] rtl819xU: —>FirmwareDownload92S()
298.211853]
298.211866] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
298.224075] rtl819xU:request firmware fail!
298.224078]
298.224326] rtl819xU:Firmware Download Fail!!4544
298.224329]
298.241603] rtl819xU: —>FirmwareDownload92S()
298.241607]
298.241618] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
298.256403] rtl819xU:request firmware fail!
298.256406]
298.256703] rtl819xU:Firmware Download Fail!!4544
298.256706]
298.256711] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
298.256714]
486.779685] eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
490.172874] rtl819xU: —>FirmwareDownload92S()
490.172879]
490.172889] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
490.184747] rtl819xU:request firmware fail!
490.184751]
490.185006] rtl819xU:Firmware Download Fail!!4544
490.185009]
490.203822] rtl819xU: —>FirmwareDownload92S()
490.203827]
490.203839] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
490.216474] rtl819xU:request firmware fail!
490.216477]
490.216764] rtl819xU:Firmware Download Fail!!4544
490.216767]
490.216772] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
490.216775]
490.711683] rtl819xU: —>FirmwareDownload92S()
490.711688]
490.711700] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
490.729356] rtl819xU:request firmware fail!
490.729359]
490.729584] rtl819xU:Firmware Download Fail!!4544
490.729586]
490.746060] rtl819xU: —>FirmwareDownload92S()
490.746064]
490.746076] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
490.761034] rtl819xU:request firmware fail!
490.761037]
490.761314] rtl819xU:Firmware Download Fail!!4544
490.761317]
490.761323] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
490.761325]
497.178765] rtl819xU: —>FirmwareDownload92S()
497.178770]
497.178782] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
497.200733] rtl819xU:request firmware fail!
497.200737]
497.201027] rtl819xU:Firmware Download Fail!!4544
497.201030]
497.217015] rtl819xU: —>FirmwareDownload92S()
497.217020]
497.217032] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
497.229513] rtl819xU:request firmware fail!
497.229517]
497.229775] rtl819xU:Firmware Download Fail!!4544
497.229778]
497.229784] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
497.229786]
497.670454] rtl819xU: —>FirmwareDownload92S()
497.670460]
497.670473] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
497.682906] rtl819xU:request firmware fail!
497.682909]
497.683213] rtl819xU:Firmware Download Fail!!4544
497.683216]
497.699471] rtl819xU: —>FirmwareDownload92S()
497.699476]
497.699488] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
497.713302] rtl819xU:request firmware fail!
497.713306]
497.713594] rtl819xU:Firmware Download Fail!!4544
497.713596]
497.713602] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
497.713605]
531.007739] rtl819xU: —>FirmwareDownload92S()
531.007745]
531.007756] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
531.022694] rtl819xU:request firmware fail!
531.022698]
531.023092] rtl819xU:Firmware Download Fail!!4544
531.023095]
531.041490] rtl819xU: —>FirmwareDownload92S()
531.041494]
531.041507] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
531.057404] rtl819xU:request firmware fail!
531.057408]
531.057608] rtl819xU:Firmware Download Fail!!4544
531.057612]
531.057617] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
531.057619]
685.052731] eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
700.103098] __ratelimit: 3 callbacks suppressed
700.103130] npviewer.bin[13664]: segfault at b68dfaf0 ip b68dfaf0 sp bf90dedc error 4
lines 643-760/764 99%

On 02/09/2010 04:06 PM, vchapman wrote:
> 497.713605]
> 531.007739] rtl819xU: —>FirmwareDownload92S()
> 531.007745]
> 531.007756] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 531.022694] rtl819xU:request firmware fail!
> 531.022698]
> 531.023092] rtl819xU:Firmware Download Fail!!4544
> 531.023095]

Do you just suppose that it needs firmware? :wink:

You can get the file from

http://launchpadlibrarian.net/37387612/rtl8192sfw.bin.gz

Decompress it with gunzip and do the following:

sudo mkdir /lib/firmware/rtl819xU
sudo cp rtl8192sfw.bin /lib/firmware/rtl819xU/.

Well I did all of this:

/lib/firmware/rtl819xU # ls
rtl8192sfw.bin

and I still have this:

rtl819xU: —>FirmwareDownload92S()
85.229533]
85.229617] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
85.337241] rtl819xU:request firmware fail!
85.337245]
85.337484] rtl819xU:Firmware Download Fail!!4544
85.337487]
85.354205] rtl819xU: —>FirmwareDownload92S()
85.354211]
85.354222] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
85.387671] rtl819xU:request firmware fail!
85.387674]
85.387986] rtl819xU:Firmware Download Fail!!4544
85.387990]
85.387995] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
85.387998]
87.320623] rtl819xU: —>FirmwareDownload92S()
87.320628]
87.320639] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
87.425207] rtl819xU:request firmware fail!
87.425211]
87.425529] rtl819xU:Firmware Download Fail!!4544
87.425532]
87.446231] rtl819xU: —>FirmwareDownload92S()
87.446237]
87.446323] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
87.530795] rtl819xU:request firmware fail!
87.530798]
87.531111] rtl819xU:Firmware Download Fail!!4544
87.531114]
87.531120] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
87.531123]
100.167937] rtl819xU: —>FirmwareDownload92S()
100.167942]
100.167954] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
100.213258] rtl819xU:request firmware fail!
100.213262]
100.213709] rtl819xU:Firmware Download Fail!!4544
100.213712]
100.229935] rtl819xU: —>FirmwareDownload92S()
100.229942]
100.229953] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
100.256293] rtl819xU:request firmware fail!
100.256297]
100.256603] rtl819xU:Firmware Download Fail!!4544
100.256606]
100.256612] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
100.256615]
101.014716] rtl819xU: —>FirmwareDownload92S()
101.014722]
101.014734] usb 1-4.2: firmware: requesting RTL8192SU/rtl8192sfw.bin
101.059893] rtl819xU:request firmware fail!
101.059897]
101.060428] rtl819xU:Firmware Download Fail!!4544
101.060431]
101.076839] rtl819xU: —>FirmwareDownload92S()
lines 644-701/749 95%

Is there a problem between where I put the firmware and where the kernel is looking for it?

On 02/10/2010 06:36 PM, vchapman wrote:
>
> lwfinger;2117809 Wrote:
>> On 02/09/2010 04:06 PM, vchapman wrote:
>>>
>>
>> http://launchpadlibrarian.net/37387612/rtl8192sfw.bin.gz
>>
>> Decompress it with gunzip and do the following:
>>
>> sudo mkdir /lib/firmware/rtl819xU
>> sudo cp rtl8192sfw.bin /lib/firmware/rtl819xU/.
>
> Well I did all of this:
>
> /lib/firmware/rtl819xU # ls
> rtl8192sfw.bin
>
> and I still have this:
>
> rtl819xU: —>FirmwareDownload92S()
> 85.229533]
> 85.229617] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 85.337241] rtl819xU:request firmware fail!
> 85.337245]
> 85.337484] rtl819xU:Firmware Download Fail!!4544
> 85.337487]
> 85.354205] rtl819xU: —>FirmwareDownload92S()
> 85.354211]
> 85.354222] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 85.387671] rtl819xU:request firmware fail!
> 85.387674]
> 85.387986] rtl819xU:Firmware Download Fail!!4544
> 85.387990]
> 85.387995] rtl819xU:ERR!!! _rtl8192_up(): initialization is
> failed!
> 85.387998]
> 87.320623] rtl819xU: —>FirmwareDownload92S()
> 87.320628]
> 87.320639] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 87.425207] rtl819xU:request firmware fail!
> 87.425211]
> 87.425529] rtl819xU:Firmware Download Fail!!4544
> 87.425532]
> 87.446231] rtl819xU: —>FirmwareDownload92S()
> 87.446237]
> 87.446323] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 87.530795] rtl819xU:request firmware fail!
> 87.530798]
> 87.531111] rtl819xU:Firmware Download Fail!!4544
> 87.531114]
> 87.531120] rtl819xU:ERR!!! _rtl8192_up(): initialization is
> failed!
> 87.531123]
> 100.167937] rtl819xU: —>FirmwareDownload92S()
> 100.167942]
> 100.167954] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 100.213258] rtl819xU:request firmware fail!
> 100.213262]
> 100.213709] rtl819xU:Firmware Download Fail!!4544
> 100.213712]
> 100.229935] rtl819xU: —>FirmwareDownload92S()
> 100.229942]
> 100.229953] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 100.256293] rtl819xU:request firmware fail!
> 100.256297]
> 100.256603] rtl819xU:Firmware Download Fail!!4544
> 100.256606]
> 100.256612] rtl819xU:ERR!!! _rtl8192_up(): initialization is
> failed!
> 100.256615]
> 101.014716] rtl819xU: —>FirmwareDownload92S()
> 101.014722]
> 101.014734] usb 1-4.2: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 101.059893] rtl819xU:request firmware fail!
> 101.059897]
> 101.060428] rtl819xU:Firmware Download Fail!!4544
> 101.060431]
> 101.076839] rtl819xU: —>FirmwareDownload92S()
> lines 644-701/749 95%
>
> Is there a problem between where I put the firmware and where the
> kernel is looking for it?

Yes. In Linux, case matters.

Of course, messing up the case was my fault. I gave you wrong info.

===========================================

I would like to pick up on this again as I am still having problems.

76.027721] rtl819xU: —>FirmwareDownload92S()
76.027727]
76.027739] usb 1-4.3: firmware: requesting RTL8192SU/rtl8192sfw.bin
76.409044] rtl819xU:signature:8192, version:902b, size:30, imemsize:7408, sr
am size:9688
76.409048]
76.409128] rtl819xU:—>FirmwareDownloadCode()
76.409131]
76.409195] rtl819xU:—>FirmwareCheckReady(): LoadStaus(1),
76.705036] rtl819xU:FW_STATUS_LOAD_IMEM FAIL CPU, Status=44
76.705041]
76.705046] rtl819xU:FirmwareDownloadCode() fail !
76.705048]
76.705273] rtl819xU:Firmware Download Fail!!4544
76.705276]
76.725408] rtl819xU: —>FirmwareDownload92S()
76.725413]
76.725420] rtl819xU:—>FirmwareDownloadCode()
76.725422]
76.725488] rtl819xU:—>FirmwareCheckReady(): LoadStaus(1),
76.999512] rtl819xU:FW_STATUS_LOAD_IMEM FAIL CPU, Status=44
76.999516]
76.999521] rtl819xU:FirmwareDownloadCode() fail !
76.999524]
76.999747] rtl819xU:Firmware Download Fail!!4544
76.999750]
76.999755] rtl819xU:ERR!!! _rtl8192_up(): initialization is failed!
76.999758]
77.051004] rtl819xU: —>FirmwareDownload92S()
77.051010]

=======================================

Here is more info on the directory and file

linux-victor:/lib/firmware # cd RTL8192SU
linux-victor:/lib/firmware/RTL8192SU # ls
rtl8192sfw.bin
linux-victor:/lib/firmware/RTL8192SU #

==========================

I think that the file is in the right directory, but maybe its the wrong file?

On 03/23/2010 01:06 PM, vchapman wrote:
>
> lwfinger;2118365 Wrote:
>> On 02/10/2010 06:36 PM, vchapman wrote: kernel is looking for
>> it?
>>
>> Yes. In Linux, case matters.
>
> ===========================================
>
> I would like to pick up on this again as I am still having problems.
>
> 76.027721] rtl819xU: —>FirmwareDownload92S()
> 76.027727]
> 76.027739] usb 1-4.3: firmware: requesting
> RTL8192SU/rtl8192sfw.bin
> 76.409044] rtl819xU:signature:8192, version:902b, size:30,
> imemsize:7408, sram size:9688
> 76.409048]
> 76.409128] rtl819xU:—>FirmwareDownloadCode()
> 76.409131]
> 76.409195] rtl819xU:—>FirmwareCheckReady(): LoadStaus(1),
> 76.705036] rtl819xU:FW_STATUS_LOAD_IMEM FAIL CPU, Status=44
–snip–
> ==========================
>
> I think that the file is in the right directory, but maybe its the
> wrong file?

The system is finding the file. If not, at 76.409, the message would have been
“request firmware fail!”.

It is failing in routine FirmwareCheckReady() with a bad value in the status
register for the on-board CPU when loading IMEM. I have no idea what would cause
that. Perhaps it is the wrong firmware, but it could be a faulty device. Note:
it loads IMEM first, thus it fails on the first task.

Correct but uncorrect…

The kernel seems to look for files in /lib/firmware/‘kernel-version’. In my case /lib/firmware/2.6.34-12-default/

dmesg says it wants “firmware: requesting RTL8192SU/rtl8192sfw.bin” which apparently (I worked out after a few tries) means file rtl8192sfw.bin from directory RTL8192SU.

Therefore you need to copy the extracted file rtl8192sfw.bin to (in my case) /lib/firmware/2.6.34-12-default/RTL8192SU/

I didn’t get link straight away so I changed to be using KNetworkManager in YaST (by unticking ifup in Network Settings). Now I have Internet through König USB 300 Mbps WLAN dongle (CMP-WNUSB40) in OpenSuSE 11.3 rotfl! (after how many years of trying different WLAN dongles, I lost count… :sarcastic: ). Good Luck!!! :wink:

On 08/03/2010 01:06 PM, Maacus0 wrote:
>
> Correct but uncorrect…
>
> The kernel seems to look for files in /lib/firmware/‘kernel-version’.
> In my case /lib/firmware/2.6.34-12-default/
>
> dmesg says it wants “firmware: requesting RTL8192SU/rtl8192sfw.bin”
> which apparently (I worked out after a few tries) means file
> rtl8192sfw.bin from directory RTL8192SU.
>
> Therefore you need to copy the extracted file rtl8192sfw.bin to (in my
> case) /lib/firmware/2.6.34-12-default/RTL8192SU/
>
> I didn’t get link straight away so I changed to be using
> KNetworkManager in YaST (by unticking ifup in Network Settings). Now I
> have Internet through König USB 300 Mbps WLAN dongle (CMP-WNUSB40) in
> OpenSuSE 11.3 rotfl! (after how many years of trying different WLAN
> dongles, I lost count… :sarcastic: ). Good Luck!!! :wink:

If you do not know what you are doing, please try not to counsel the newcomers.

If the dmesg output says that it is looking for firmware in file
RTL8192SU/rtl8192sfw.bin, then that means
/lib/firmware/RTL8192SU/rtl8192sfw.bin. Putting it in /lib/firmware/uname -r/RTL8192SU/rtl8192sfw.bin might very well work; however, it will break as
soon as the kernel is updated. Why should we recommend that to a user?

As I clearly stated, the system FOUND the firmware where the OP put it,
otherwise the message would have been different.

Hi

I tried to load RTL8192SU driver for dwa 131 USB dongle in mips(big endian) machine

i end up with the following logs

<4>Linux kernel driver for RTL8192 based WLAN cards
<6>Copyright (c) 2007-2008, Realsil Wlan
<6>usbcore: registered new driver rtl819xSU
<6>usb 2-1: new high speed USB device using brcm-ehci-1 and address 2
<6>usb 2-1: configuration #1 chosen from 1 choice
<4>==>ep_num:4, in_ep_num:1, out_ep_num:3
<4>==>RtInPipes:3
<4>==>RtOutPipes:4 6 13
<4>==>txqueue_to_outpipemap for BK, BE, VI, VO, HCCA, TXCMD, MGNT, HIGH, BEACON:
<4>1 1 0 0 2 2 2 2 2
Dot11d_Init()
<7>rtl819xSU:unknown rf chip, can’t set channel map in function:rtl819x_set_channel_
map()

iwconfig

lo no wireless extensions.

wlan0 802.11bg Mode:Managed Access Point: Not-Associated
Bit Rate:0 kb/s
Retry min limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/100 Signal level=-256 dBm Noise level=-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

when i do iwlist wlan0 scan
wlan0 Interface doesn’t support scanning : Network is down

ifconfig wlan0 up

rtl819xSU: —>FirmwareDownload92S()
<4>
<4>Using FW_SOURCE_HEADER_FILE
<7>rtl819xSU:signature:9281, version:3e90, size:30000000, imemsize:8880000, sram siz
e:8b70000
<4>
<4>FirmwareDownload92S(): memory for data image is less than IMEM required
<7>rtl819xSU:Firmware Download Fail!!a00
<4>
<7>rtl819xSU: —>FirmwareDownload92S()
<4>
<4>Using FW_SOURCE_HEADER_FILE
<7>rtl819xSU:signature:9281, version:3e90, size:30000000, imemsize:8880000, sram siz
e:8b70000
<4>
<4>FirmwareDownload92S(): memory for data image is less than IMEM required
<7>rtl819xSU:Firmware Download Fail!!a00
<4>
<7>rtl819xSU: —>FirmwareDownload92S()
<4>

It is working pretty fine in x86 machine and I am using 2.6.18.8 kernel for both

can any one help me to know where I am wrong

Thanks in advance

On 08/11/2010 12:06 AM, rajitha wrote:
>
> It is working pretty fine in x86 machine and I am using 2.6.18.8 kernel
> for both
>
> can any one help me to know where I am wrong

The only thing you are doing wrong is running in an untested (big-endian)
configuration. You will have to debug where the driver fails to do the proper
conversion using cpu_to_leXX or leXX_to_cpu, where XX is 16 or 32. The CPU on
the device runs in little-endian mode.

A place to start would be in the “memory for data image less that IMEM required”.

Hi,

Thanks for suggestion

I went through the source files of the driver to know where exactly it is getting stuck

Inside  r8192U_core.c 
    in the function rtl8192SU_ReadAdapterInfo8192SUsb()
           EFUSE_ShadowMapUpdate() is being called from there it is taking 7 min to
                 return i think it is if I am right it is failing in memcpy() inside this function
why is it so?

On 08/12/2010 04:06 AM, rajitha wrote:
>
> Hi,
>
> Thanks for suggestion
>
> I went through the source files of the driver to know where exactly
> it is getting stuck
>
> Inside r8192U_core.c
> in the function rtl8192SU_ReadAdapterInfo8192SUsb()
> EFUSE_ShadowMapUpdate() is being called from there it is
> taking 7 min to
> return i think it is if I am right it is failing
> in memcpy() inside this function
> why is it so?

A memcpy should take a few nanoseconds per byte unless you are getting page
faults, or a little/big-endian problem is messing up the byte count. Of course,
I would expect the machine to crash in that case.

In the section of code from that routine as follows:


if (priv->AutoloadFailFlag == true){
memset(&(priv->EfuseMap[EFUSE_INIT_MAP][0]), 0xff, 128);
}else{
efuse_ReadAllMap(dev, &priv->EfuseMap[EFUSE_INIT_MAP][0]);
}

Which branch of this “if” is it taking? It only makes sense if it is taking the
“efuse_ReadAllMap” branch. Is that routine taking all the time?

Hi,

It is always falling in to else condition only

the kernel crash is not happening after 7 minutes it is printing Dot11d_Init() log also

IMEM size is 8880000 in mips machine case and for little Endian machine it is 8808

any idea what are all the kernel configuration parameters we have to change

On 08/13/2010 12:06 AM, rajitha wrote:
>
> the kernel crash is not happening after 7 minutes it is printing
> Dot11d_Init() log also
>
> IMEM size is 8880000 in mips machine case and for little Endian machine
> it is 8808
>
> any idea what are all the kernel configuration parameters we have to
> change

The problem is not a matter of kernel parameters. If we look at the IMEM size
for the MIPS, and fill in the extra leading zero, we get 0x08880000. If you read
byte by byte from the other end, you get 0x00008808. They are the little and
big-endian representations of the same number. This problem arises because the
CPU on the device runs in little-endian mode, and the MIPS is big endian. The
solution is to find ALL the affected quantities and convert them If a 16- or
32-bit quantity is read from the device, it needs to be converted to big endian.
If being sent to the device, if also needs to be converted. This is something
that the Realtek coder should have taken care of.

There are some macros that are helpful. I can help you with one section, but
doing the entire driver will take a lot of time. In struct RT_8192S_FIRMWARE_HDR
found in r8192S_firmware.h, all those data are read from the device. A patch to
convert them would look like:


Index: linux-2.6/drivers/staging/rtl8192su/r8192S_firmware.c
===================================================================
--- linux-2.6.orig/drivers/staging/rtl8192su/r8192S_firmware.c
+++ linux-2.6/drivers/staging/rtl8192su/r8192S_firmware.c
@@ -358,6 +358,15 @@ bool FirmwareRequest92S(struct net_devic
pFirmware->pFwHeader = (PRT_8192S_FIRMWARE_HDR) pucMappedFile;
pFwHdr = pFirmware->pFwHeader;

+#ifdef __BIG_ENDIAN
+       pFwHdr->Signature = le16_to_cpu(pFwHdr->Signature);
+       pFwHdr->Version = le16_tp_cpu(pFwHdr->Version);
+       pFwHdr->DMEMSize = le32_to_cpu(pFwHdr->DMEMSize);
+       pFwHdr->IMG_IMEM_SIZE = le32_to_cpu(pFwHdr->IMG_IMEM_SIZE);
+       pFwHdr->IMG_SRAM_SIZE = le32_to_cpu(pFwHdr->IMG_SRAM_SIZE);
+       pFwHdr->FW_PRIV_SIZE = le32_to_cpu(pFwHdr->FW_PRIV_SIZE);
+#endif
+
RT_TRACE(COMP_FIRMWARE, "%s(): signature: %x, version: %x, "
"size: %x, imemsize: %x, sram size: %x",
__func__, pFwHdr->Signature, pFwHdr->Version,

In the struct, the members named Rsvd0, etc. are merely place holders and need
not be converted.

The above patch should get the firmware loaded. Your job will be to find the
other places that data are written to/from the device. Good luck.

Hi,

 Thanks a lot for your help. I will try out with this patch and try to modify rest of 
    the code and I will let you know what happened.

  Is there any driver code available for big endian machine? If so let me know..
   Thanks again

To my knowledge, there is no big-endian version of the driver.