* brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) @ 2015-02-09 17:57 Steeve Morin 2015-02-09 22:00 ` Arend van Spriel 0 siblings, 1 reply; 9+ messages in thread From: Steeve Morin @ 2015-02-09 17:57 UTC (permalink / raw) To: linux-wireless Hi linux-wireless, I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). I had to apply multiple custom patches [1]: - Make sure the wifi chip is on via custom GPIO [1] - Remove a problematic piece of code related to power manager (will look into it later) [1] - Mix the mmc->max_blk_count on the host (would cause a BUG_ON assertion later on) [2] [3] After that, I am able to modprobe brcmfmac see wlan0. The interface correctly scans for wifi aps, and I can connect to unprotected ones. It fails, however, to connect to WPA/WPA2 protected aps. I have attached a debug log obtained with debug=0xffffff [4] I don't see any errors in it though... Would anyone of you guys have any idea why ? Thanks a lot, [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch [2] https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch [3] https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 [4] https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log -- Steeve Morin twitter.com/steeve github.com/steeve linkd.in/smorin ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-09 17:57 brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) Steeve Morin @ 2015-02-09 22:00 ` Arend van Spriel 2015-02-09 22:17 ` Steeve Morin 0 siblings, 1 reply; 9+ messages in thread From: Arend van Spriel @ 2015-02-09 22:00 UTC (permalink / raw) To: Steeve Morin; +Cc: linux-wireless On 02/09/15 18:57, Steeve Morin wrote: > Hi linux-wireless, > > I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running > on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). > > I had to apply multiple custom patches [1]: > - Make sure the wifi chip is on via custom GPIO [1] > - Remove a problematic piece of code related to power manager (will > look into it later) [1] > - Mix the mmc->max_blk_count on the host (would cause a BUG_ON > assertion later on) [2] [3] > > After that, I am able to modprobe brcmfmac see wlan0. > The interface correctly scans for wifi aps, and I can connect to > unprotected ones. > > It fails, however, to connect to WPA/WPA2 protected aps. I have > attached a debug log obtained with debug=0xffffff [4] > I don't see any errors in it though... > > Would anyone of you guys have any idea why ? In the log I don't see any connect attempt. Only seeing a scan completing. So how do you try to connect? Regards, Arend > Thanks a lot, > > [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch > [2] https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch > [3] https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 > [4] https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-09 22:00 ` Arend van Spriel @ 2015-02-09 22:17 ` Steeve Morin 2015-02-09 23:06 ` Steeve Morin 0 siblings, 1 reply; 9+ messages in thread From: Steeve Morin @ 2015-02-09 22:17 UTC (permalink / raw) To: Arend van Spriel; +Cc: linux-wireless Thanks for answering. I'm using connmanctl [1] The funny thing is trying to make this gist, I tried and it connected succesfully.... Could it be a race somewhere? [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-004-connmanctl On 9 February 2015 at 23:00, Arend van Spriel <arend@broadcom.com> wrote: > On 02/09/15 18:57, Steeve Morin wrote: >> >> Hi linux-wireless, >> >> I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running >> on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). >> >> I had to apply multiple custom patches [1]: >> - Make sure the wifi chip is on via custom GPIO [1] >> - Remove a problematic piece of code related to power manager (will >> look into it later) [1] >> - Mix the mmc->max_blk_count on the host (would cause a BUG_ON >> assertion later on) [2] [3] >> >> After that, I am able to modprobe brcmfmac see wlan0. >> The interface correctly scans for wifi aps, and I can connect to >> unprotected ones. >> >> It fails, however, to connect to WPA/WPA2 protected aps. I have >> attached a debug log obtained with debug=0xffffff [4] >> I don't see any errors in it though... >> >> Would anyone of you guys have any idea why ? > > > In the log I don't see any connect attempt. Only seeing a scan completing. > So how do you try to connect? > > Regards, > Arend > > >> Thanks a lot, >> >> [1] >> https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch >> [2] >> https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch >> [3] >> https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 >> [4] https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log > > -- Steeve Morin twitter.com/steeve github.com/steeve linkd.in/smorin ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-09 22:17 ` Steeve Morin @ 2015-02-09 23:06 ` Steeve Morin 2015-02-10 0:34 ` Steeve Morin 0 siblings, 1 reply; 9+ messages in thread From: Steeve Morin @ 2015-02-09 23:06 UTC (permalink / raw) To: Arend van Spriel; +Cc: linux-wireless The weird thing is that wpa_supplicant apparently manages to associate with the AP (but i'm not really sure about that) [1] [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-005-wpa-supplicant-conf On 9 February 2015 at 23:17, Steeve Morin <steeve.morin@gmail.com> wrote: > Thanks for answering. > > I'm using connmanctl [1] > > The funny thing is trying to make this gist, I tried and it connected > succesfully.... > Could it be a race somewhere? > > [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-004-connmanctl > > On 9 February 2015 at 23:00, Arend van Spriel <arend@broadcom.com> wrote: >> On 02/09/15 18:57, Steeve Morin wrote: >>> >>> Hi linux-wireless, >>> >>> I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running >>> on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). >>> >>> I had to apply multiple custom patches [1]: >>> - Make sure the wifi chip is on via custom GPIO [1] >>> - Remove a problematic piece of code related to power manager (will >>> look into it later) [1] >>> - Mix the mmc->max_blk_count on the host (would cause a BUG_ON >>> assertion later on) [2] [3] >>> >>> After that, I am able to modprobe brcmfmac see wlan0. >>> The interface correctly scans for wifi aps, and I can connect to >>> unprotected ones. >>> >>> It fails, however, to connect to WPA/WPA2 protected aps. I have >>> attached a debug log obtained with debug=0xffffff [4] >>> I don't see any errors in it though... >>> >>> Would anyone of you guys have any idea why ? >> >> >> In the log I don't see any connect attempt. Only seeing a scan completing. >> So how do you try to connect? >> >> Regards, >> Arend >> >> >>> Thanks a lot, >>> >>> [1] >>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch >>> [2] >>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch >>> [3] >>> https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 >>> [4] https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log >> >> > > > > -- > Steeve Morin > twitter.com/steeve > github.com/steeve > linkd.in/smorin -- Steeve Morin twitter.com/steeve github.com/steeve linkd.in/smorin ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-09 23:06 ` Steeve Morin @ 2015-02-10 0:34 ` Steeve Morin 2015-02-10 1:37 ` Steeve Morin 0 siblings, 1 reply; 9+ messages in thread From: Steeve Morin @ 2015-02-10 0:34 UTC (permalink / raw) To: Arend van Spriel; +Cc: linux-wireless Also, using udhcpc fails to retrieve an IP with a rather strange "error" udhcpc (v1.22.1) started Sending discover... Sending select for 192.168.1.89... Sending select for 192.168.1.89... Sending select for 192.168.1.89... Sending discover... Sending discover... Which leads me to believe this might be due to data being lost somewhere... However, the rare times I managed to make it connect, SSH was functionning normally. Let me know if you need more log. Thanks On 10 February 2015 at 00:06, Steeve Morin <steeve.morin@gmail.com> wrote: > The weird thing is that wpa_supplicant apparently manages to associate > with the AP (but i'm not really sure about that) [1] > > [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-005-wpa-supplicant-conf > > On 9 February 2015 at 23:17, Steeve Morin <steeve.morin@gmail.com> wrote: >> Thanks for answering. >> >> I'm using connmanctl [1] >> >> The funny thing is trying to make this gist, I tried and it connected >> succesfully.... >> Could it be a race somewhere? >> >> [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-004-connmanctl >> >> On 9 February 2015 at 23:00, Arend van Spriel <arend@broadcom.com> wrote: >>> On 02/09/15 18:57, Steeve Morin wrote: >>>> >>>> Hi linux-wireless, >>>> >>>> I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running >>>> on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). >>>> >>>> I had to apply multiple custom patches [1]: >>>> - Make sure the wifi chip is on via custom GPIO [1] >>>> - Remove a problematic piece of code related to power manager (will >>>> look into it later) [1] >>>> - Mix the mmc->max_blk_count on the host (would cause a BUG_ON >>>> assertion later on) [2] [3] >>>> >>>> After that, I am able to modprobe brcmfmac see wlan0. >>>> The interface correctly scans for wifi aps, and I can connect to >>>> unprotected ones. >>>> >>>> It fails, however, to connect to WPA/WPA2 protected aps. I have >>>> attached a debug log obtained with debug=0xffffff [4] >>>> I don't see any errors in it though... >>>> >>>> Would anyone of you guys have any idea why ? >>> >>> >>> In the log I don't see any connect attempt. Only seeing a scan completing. >>> So how do you try to connect? >>> >>> Regards, >>> Arend >>> >>> >>>> Thanks a lot, >>>> >>>> [1] >>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch >>>> [2] >>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch >>>> [3] >>>> https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 >>>> [4] https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log >>> >>> >> >> >> >> -- >> Steeve Morin >> twitter.com/steeve >> github.com/steeve >> linkd.in/smorin > > > > -- > Steeve Morin > twitter.com/steeve > github.com/steeve > linkd.in/smorin -- Steeve Morin twitter.com/steeve github.com/steeve linkd.in/smorin ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-10 0:34 ` Steeve Morin @ 2015-02-10 1:37 ` Steeve Morin 2015-02-10 17:31 ` Arend van Spriel 0 siblings, 1 reply; 9+ messages in thread From: Steeve Morin @ 2015-02-10 1:37 UTC (permalink / raw) To: Arend van Spriel; +Cc: linux-wireless I've managed to get a lease via udhcpc, over and over again, but as soon as a scan operation comes along, I am now unable to get a lease. On 10 February 2015 at 01:34, Steeve Morin <steeve.morin@gmail.com> wrote: > Also, using udhcpc fails to retrieve an IP with a rather strange "error" > udhcpc (v1.22.1) started > Sending discover... > Sending select for 192.168.1.89... > Sending select for 192.168.1.89... > Sending select for 192.168.1.89... > Sending discover... > Sending discover... > > Which leads me to believe this might be due to data being lost somewhere... > > However, the rare times I managed to make it connect, SSH was > functionning normally. > > Let me know if you need more log. > > Thanks > > On 10 February 2015 at 00:06, Steeve Morin <steeve.morin@gmail.com> wrote: >> The weird thing is that wpa_supplicant apparently manages to associate >> with the AP (but i'm not really sure about that) [1] >> >> [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-005-wpa-supplicant-conf >> >> On 9 February 2015 at 23:17, Steeve Morin <steeve.morin@gmail.com> wrote: >>> Thanks for answering. >>> >>> I'm using connmanctl [1] >>> >>> The funny thing is trying to make this gist, I tried and it connected >>> succesfully.... >>> Could it be a race somewhere? >>> >>> [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-004-connmanctl >>> >>> On 9 February 2015 at 23:00, Arend van Spriel <arend@broadcom.com> wrote: >>>> On 02/09/15 18:57, Steeve Morin wrote: >>>>> >>>>> Hi linux-wireless, >>>>> >>>>> I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running >>>>> on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). >>>>> >>>>> I had to apply multiple custom patches [1]: >>>>> - Make sure the wifi chip is on via custom GPIO [1] >>>>> - Remove a problematic piece of code related to power manager (will >>>>> look into it later) [1] >>>>> - Mix the mmc->max_blk_count on the host (would cause a BUG_ON >>>>> assertion later on) [2] [3] >>>>> >>>>> After that, I am able to modprobe brcmfmac see wlan0. >>>>> The interface correctly scans for wifi aps, and I can connect to >>>>> unprotected ones. >>>>> >>>>> It fails, however, to connect to WPA/WPA2 protected aps. I have >>>>> attached a debug log obtained with debug=0xffffff [4] >>>>> I don't see any errors in it though... >>>>> >>>>> Would anyone of you guys have any idea why ? >>>> >>>> >>>> In the log I don't see any connect attempt. Only seeing a scan completing. >>>> So how do you try to connect? >>>> >>>> Regards, >>>> Arend >>>> >>>> >>>>> Thanks a lot, >>>>> >>>>> [1] >>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch >>>>> [2] >>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch >>>>> [3] >>>>> https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 >>>>> [4] https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log >>>> >>>> >>> >>> >>> >>> -- >>> Steeve Morin >>> twitter.com/steeve >>> github.com/steeve >>> linkd.in/smorin >> >> >> >> -- >> Steeve Morin >> twitter.com/steeve >> github.com/steeve >> linkd.in/smorin > > > > -- > Steeve Morin > twitter.com/steeve > github.com/steeve > linkd.in/smorin -- Steeve Morin twitter.com/steeve github.com/steeve linkd.in/smorin ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-10 1:37 ` Steeve Morin @ 2015-02-10 17:31 ` Arend van Spriel 2015-02-10 20:03 ` Steeve Morin 0 siblings, 1 reply; 9+ messages in thread From: Arend van Spriel @ 2015-02-10 17:31 UTC (permalink / raw) To: Steeve Morin; +Cc: linux-wireless On 02/10/15 02:37, Steeve Morin wrote: > I've managed to get a lease via udhcpc, over and over again, but as > soon as a scan operation comes along, I am now unable to get a lease. If you can provide a kernel log running into this situation I might get a clue about what is happening. Regards, Arend > On 10 February 2015 at 01:34, Steeve Morin<steeve.morin@gmail.com> wrote: >> Also, using udhcpc fails to retrieve an IP with a rather strange "error" >> udhcpc (v1.22.1) started >> Sending discover... >> Sending select for 192.168.1.89... >> Sending select for 192.168.1.89... >> Sending select for 192.168.1.89... >> Sending discover... >> Sending discover... >> >> Which leads me to believe this might be due to data being lost somewhere... >> >> However, the rare times I managed to make it connect, SSH was >> functionning normally. >> >> Let me know if you need more log. >> >> Thanks >> >> On 10 February 2015 at 00:06, Steeve Morin<steeve.morin@gmail.com> wrote: >>> The weird thing is that wpa_supplicant apparently manages to associate >>> with the AP (but i'm not really sure about that) [1] >>> >>> [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-005-wpa-supplicant-conf >>> >>> On 9 February 2015 at 23:17, Steeve Morin<steeve.morin@gmail.com> wrote: >>>> Thanks for answering. >>>> >>>> I'm using connmanctl [1] >>>> >>>> The funny thing is trying to make this gist, I tried and it connected >>>> succesfully.... >>>> Could it be a race somewhere? >>>> >>>> [1] https://gist.github.com/steeve/10a9a643476cea99abf4#file-004-connmanctl >>>> >>>> On 9 February 2015 at 23:00, Arend van Spriel<arend@broadcom.com> wrote: >>>>> On 02/09/15 18:57, Steeve Morin wrote: >>>>>> >>>>>> Hi linux-wireless, >>>>>> >>>>>> I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running >>>>>> on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). >>>>>> >>>>>> I had to apply multiple custom patches [1]: >>>>>> - Make sure the wifi chip is on via custom GPIO [1] >>>>>> - Remove a problematic piece of code related to power manager (will >>>>>> look into it later) [1] >>>>>> - Mix the mmc->max_blk_count on the host (would cause a BUG_ON >>>>>> assertion later on) [2] [3] >>>>>> >>>>>> After that, I am able to modprobe brcmfmac see wlan0. >>>>>> The interface correctly scans for wifi aps, and I can connect to >>>>>> unprotected ones. >>>>>> >>>>>> It fails, however, to connect to WPA/WPA2 protected aps. I have >>>>>> attached a debug log obtained with debug=0xffffff [4] >>>>>> I don't see any errors in it though... >>>>>> >>>>>> Would anyone of you guys have any idea why ? >>>>> >>>>> >>>>> In the log I don't see any connect attempt. Only seeing a scan completing. >>>>> So how do you try to connect? >>>>> >>>>> Regards, >>>>> Arend >>>>> >>>>> >>>>>> Thanks a lot, >>>>>> >>>>>> [1] >>>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch >>>>>> [2] >>>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch >>>>>> [3] >>>>>> https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 >>>>>> [4] https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Steeve Morin >>>> twitter.com/steeve >>>> github.com/steeve >>>> linkd.in/smorin >>> >>> >>> >>> -- >>> Steeve Morin >>> twitter.com/steeve >>> github.com/steeve >>> linkd.in/smorin >> >> >> >> -- >> Steeve Morin >> twitter.com/steeve >> github.com/steeve >> linkd.in/smorin > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-10 17:31 ` Arend van Spriel @ 2015-02-10 20:03 ` Steeve Morin 2015-02-10 21:42 ` Arend van Spriel 0 siblings, 1 reply; 9+ messages in thread From: Steeve Morin @ 2015-02-10 20:03 UTC (permalink / raw) To: Arend van Spriel; +Cc: linux-wireless Okay I've managed to fix it, it was due to a faulty mmc setting in the kernel driver from the chip maker. Basically it was setting a wrong max_blk_count and max_blk_size for the MMC host. Basically, max_blk_count was set wrong, causing a BUG_ON assertion, and when patched, because the max_blk_size was wrong, it was overflowing the MMC buffer (this is 128k according to the device tree). Thank you for your time, actually talking about it and laying it out made me look in the right direction. Here is the fix. >From 6c92e578748e039dfcfd8e737efdead6cd3e7568 Mon Sep 17 00:00:00 2001 From: Steeve Morin <steeve.morin@gmail.com> Date: Mon, 9 Feb 2015 16:25:49 +0100 Subject: [PATCH 4/4] Properly set max_blk_count and max_blk_size for the host mmc Signed-off-by: Steeve Morin <steeve.morin@gmail.com> --- drivers/amlogic/mmc/aml_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/mmc/aml_sdio.c b/drivers/amlogic/mmc/aml_sdio.c index 680b95a..8b42f0e 100755 --- a/drivers/amlogic/mmc/aml_sdio.c +++ b/drivers/amlogic/mmc/aml_sdio.c @@ -1322,10 +1322,10 @@ static int aml_sdio_probe(struct platform_device *pdev) mmc->alldev_claim = &aml_sdio_claim; mmc->ios.clock = 400000; mmc->ios.bus_width = MMC_BUS_WIDTH_1; - mmc->max_blk_count = 4095; - mmc->max_blk_size = 4095; + mmc->max_blk_count = 256; mmc->max_req_size = pdata->max_req_size; mmc->max_seg_size = mmc->max_req_size; + mmc->max_blk_size = mmc->max_req_size / mmc->max_blk_count; mmc->max_segs = 1024; mmc->ocr_avail = pdata->ocr_avail; mmc->ocr = pdata->ocr_avail; -- 2.2.1 On 10 February 2015 at 18:31, Arend van Spriel <arend@broadcom.com> wrote: > On 02/10/15 02:37, Steeve Morin wrote: >> >> I've managed to get a lease via udhcpc, over and over again, but as >> soon as a scan operation comes along, I am now unable to get a lease. > > > If you can provide a kernel log running into this situation I might get a > clue about what is happening. > > Regards, > Arend > > >> On 10 February 2015 at 01:34, Steeve Morin<steeve.morin@gmail.com> wrote: >>> >>> Also, using udhcpc fails to retrieve an IP with a rather strange "error" >>> udhcpc (v1.22.1) started >>> Sending discover... >>> Sending select for 192.168.1.89... >>> Sending select for 192.168.1.89... >>> Sending select for 192.168.1.89... >>> Sending discover... >>> Sending discover... >>> >>> Which leads me to believe this might be due to data being lost >>> somewhere... >>> >>> However, the rare times I managed to make it connect, SSH was >>> functionning normally. >>> >>> Let me know if you need more log. >>> >>> Thanks >>> >>> On 10 February 2015 at 00:06, Steeve Morin<steeve.morin@gmail.com> >>> wrote: >>>> >>>> The weird thing is that wpa_supplicant apparently manages to associate >>>> with the AP (but i'm not really sure about that) [1] >>>> >>>> [1] >>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-005-wpa-supplicant-conf >>>> >>>> On 9 February 2015 at 23:17, Steeve Morin<steeve.morin@gmail.com> >>>> wrote: >>>>> >>>>> Thanks for answering. >>>>> >>>>> I'm using connmanctl [1] >>>>> >>>>> The funny thing is trying to make this gist, I tried and it connected >>>>> succesfully.... >>>>> Could it be a race somewhere? >>>>> >>>>> [1] >>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-004-connmanctl >>>>> >>>>> On 9 February 2015 at 23:00, Arend van Spriel<arend@broadcom.com> >>>>> wrote: >>>>>> >>>>>> On 02/09/15 18:57, Steeve Morin wrote: >>>>>>> >>>>>>> >>>>>>> Hi linux-wireless, >>>>>>> >>>>>>> I'm running brcmfmac from backports-3.19-rc1-1 on linux 3.10. running >>>>>>> on an arm Amlogic S805 (cortex-a5, arm7) board (CX-S859). >>>>>>> >>>>>>> I had to apply multiple custom patches [1]: >>>>>>> - Make sure the wifi chip is on via custom GPIO [1] >>>>>>> - Remove a problematic piece of code related to power manager (will >>>>>>> look into it later) [1] >>>>>>> - Mix the mmc->max_blk_count on the host (would cause a BUG_ON >>>>>>> assertion later on) [2] [3] >>>>>>> >>>>>>> After that, I am able to modprobe brcmfmac see wlan0. >>>>>>> The interface correctly scans for wifi aps, and I can connect to >>>>>>> unprotected ones. >>>>>>> >>>>>>> It fails, however, to connect to WPA/WPA2 protected aps. I have >>>>>>> attached a debug log obtained with debug=0xffffff [4] >>>>>>> I don't see any errors in it though... >>>>>>> >>>>>>> Would anyone of you guys have any idea why ? >>>>>> >>>>>> >>>>>> >>>>>> In the log I don't see any connect attempt. Only seeing a scan >>>>>> completing. >>>>>> So how do you try to connect? >>>>>> >>>>>> Regards, >>>>>> Arend >>>>>> >>>>>> >>>>>>> Thanks a lot, >>>>>>> >>>>>>> [1] >>>>>>> >>>>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-backports-power-on-wifi-sdio-patch >>>>>>> [2] >>>>>>> >>>>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-fix-block-size-patch >>>>>>> [3] >>>>>>> >>>>>>> https://github.com/codesnake/linux-amlogic/blob/master/drivers/amlogic/mmc/aml_sdio.c#L317 >>>>>>> [4] >>>>>>> https://gist.github.com/steeve/10a9a643476cea99abf4#file-003-dmesg-log >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Steeve Morin >>>>> twitter.com/steeve >>>>> github.com/steeve >>>>> linkd.in/smorin >>>> >>>> >>>> >>>> >>>> -- >>>> Steeve Morin >>>> twitter.com/steeve >>>> github.com/steeve >>>> linkd.in/smorin >>> >>> >>> >>> >>> -- >>> Steeve Morin >>> twitter.com/steeve >>> github.com/steeve >>> linkd.in/smorin >> >> >> >> > -- Steeve Morin twitter.com/steeve github.com/steeve linkd.in/smorin ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) 2015-02-10 20:03 ` Steeve Morin @ 2015-02-10 21:42 ` Arend van Spriel 0 siblings, 0 replies; 9+ messages in thread From: Arend van Spriel @ 2015-02-10 21:42 UTC (permalink / raw) To: Steeve Morin; +Cc: linux-wireless On 02/10/15 21:03, Steeve Morin wrote: > Okay I've managed to fix it, it was due to a faulty mmc setting in the > kernel driver from the chip maker. > > Basically it was setting a wrong max_blk_count and max_blk_size for > the MMC host. > > Basically, max_blk_count was set wrong, causing a BUG_ON assertion, > and when patched, because the max_blk_size was wrong, it was > overflowing the MMC buffer (this is 128k according to the device > tree). > > Thank you for your time, actually talking about it and laying it out > made me look in the right direction. Glad to help. Did not expect I would get off that easy ;-) Regards, Arend > Here is the fix. > > From 6c92e578748e039dfcfd8e737efdead6cd3e7568 Mon Sep 17 00:00:00 2001 > From: Steeve Morin<steeve.morin@gmail.com> > Date: Mon, 9 Feb 2015 16:25:49 +0100 > Subject: [PATCH 4/4] Properly set max_blk_count and max_blk_size for the host > mmc > > Signed-off-by: Steeve Morin<steeve.morin@gmail.com> > --- > drivers/amlogic/mmc/aml_sdio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/amlogic/mmc/aml_sdio.c b/drivers/amlogic/mmc/aml_sdio.c > index 680b95a..8b42f0e 100755 > --- a/drivers/amlogic/mmc/aml_sdio.c > +++ b/drivers/amlogic/mmc/aml_sdio.c > @@ -1322,10 +1322,10 @@ static int aml_sdio_probe(struct platform_device *pdev) > mmc->alldev_claim =&aml_sdio_claim; > mmc->ios.clock = 400000; > mmc->ios.bus_width = MMC_BUS_WIDTH_1; > - mmc->max_blk_count = 4095; > - mmc->max_blk_size = 4095; > + mmc->max_blk_count = 256; > mmc->max_req_size = pdata->max_req_size; > mmc->max_seg_size = mmc->max_req_size; > + mmc->max_blk_size = mmc->max_req_size / mmc->max_blk_count; > mmc->max_segs = 1024; > mmc->ocr_avail = pdata->ocr_avail; > mmc->ocr = pdata->ocr_avail; ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-02-10 21:42 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-02-09 17:57 brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) Steeve Morin 2015-02-09 22:00 ` Arend van Spriel 2015-02-09 22:17 ` Steeve Morin 2015-02-09 23:06 ` Steeve Morin 2015-02-10 0:34 ` Steeve Morin 2015-02-10 1:37 ` Steeve Morin 2015-02-10 17:31 ` Arend van Spriel 2015-02-10 20:03 ` Steeve Morin 2015-02-10 21:42 ` Arend van Spriel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).