wandboard quad wifi ap mode

This is the place for software discussions not having a dedicated subforum

Re: wandboard quad wifi ap mode

Postby Neogenesis » Thu Dec 12, 2013 9:59 am

Hi Mr Tapani,

could I get the most recent driver+firmware you got from you?
I would gladely like to try and get the AP mode working.

If I come to some constructive conclusion/solution I'll be glad to give back.

Thank you in advance

Neogenesis
Neogenesis
 
Posts: 2
Joined: Wed Nov 06, 2013 6:42 pm

Re: wandboard quad wifi ap mode

Postby Tapani » Tue Dec 17, 2013 1:37 pm

The mess we got from the manufacturer is at:
http://www.wandboard.org/images/downloa ... e_4329.tgz

There are two Makefiles, if the original one fails, use the .alt one.

Good luck!

ps: if you succeed.. please share! :-)
Tapani
Site Admin
 
Posts: 701
Joined: Tue Aug 27, 2013 8:32 am

Re: wandboard quad wifi ap mode

Postby CruX » Fri Dec 20, 2013 11:52 pm

Hey tapani,

thanks for sharing!
I tried to get it to compile but it seems this specific driver requires a kernel version >= 3.2.0, the only real kernel for the wandboard (=vpu/gpu support included) at the moment seems to be 3.0.35 :/
Is there any hope for a wandboard(quad) enabled 3.10.9 down the road? I can not say anything about the functionality of the driver :/


Cheers!
CruX
CruX
 
Posts: 68
Joined: Sun Oct 27, 2013 1:29 pm

Re: wandboard quad wifi ap mode

Postby Tapani » Mon Dec 23, 2013 3:34 am

Crux,

we got it to compile:
1. Edit PeterMake.sh to contain the paths to the kernel and cross-compiler
2. Copy Makefile.alt over Makefile (maybe save Makefile as Makefile.peter or smth)
3. Run the modified PeterMake

A .ko is generated.
Tapani
Site Admin
 
Posts: 701
Joined: Tue Aug 27, 2013 8:32 am

Re: wandboard quad wifi ap mode

Postby CruX » Mon Dec 23, 2013 9:46 am

Hey Tapani,

this is exactly what I've done. I've set KERNEL_PATH to a 3.0.35 kernel source and My_ARCH to arm.
I'm getting:

Code: Select all
/home/hanny/wifi/Driver_Release_4329/bcmdhd/wl_cfg80211.c: In function ‘wl_notify_connect_status_ap’:
/home/hanny/wifi/Driver_Release_4329/bcmdhd/wl_cfg80211.c:6321:8: error: ‘struct station_info’ has no member named ‘assoc_req_ies’
/home/hanny/wifi/Driver_Release_4329/bcmdhd/wl_cfg80211.c:6322:8: error: ‘struct station_info’ has no member named ‘assoc_req_ies_len’


Best regards,
CruX
CruX
 
Posts: 68
Joined: Sun Oct 27, 2013 1:29 pm

Re: wandboard quad wifi ap mode

Postby Tapani » Mon Dec 23, 2013 10:00 am

CruX wrote:this is exactly what I've done.

No, you skipped step 2 :-)
Tapani
Site Admin
 
Posts: 701
Joined: Tue Aug 27, 2013 8:32 am

Re: wandboard quad wifi ap mode

Postby CruX » Mon Dec 23, 2013 11:22 am

Damn, forgot to mention.

Im running
Code: Select all
make -f Makefile.alt -j4

of course :)

Cheers
CruX
 
Posts: 68
Joined: Sun Oct 27, 2013 1:29 pm

Re: wandboard quad wifi ap mode

Postby Tapani » Mon Dec 23, 2013 12:58 pm

Also to load the module, the following patch might be needed
(apply, rebuild kernel, rebuild module)

Code: Select all
From: Edward
Date: Wed, 20 Nov 2013 18:00:50 +0800
Subject: [PATCH 1/1] USI BCM4329 : fix build break for USI BCM4329 drivers.

---
 drivers/mmc/core/sdio.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++
 include/net/cfg80211.h  | 17 +++++++++++-
 net/wireless/nl80211.c  |  4 +++
 3 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index cc3736b..3512bdd 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -882,3 +882,77 @@ err:
    return err;
 }
 
+int sdio_reset_comm(struct mmc_card *card)
+{
+   struct mmc_host *host = card->host;
+   u32 ocr;
+   int err;
+
+   printk("%s():\n", __func__);
+   mmc_claim_host(host);
+
+   mmc_go_idle(host);
+
+   mmc_set_clock(host, host->f_min);
+
+   err = mmc_send_io_op_cond(host, 0, &ocr);
+   if (err)
+      goto err;
+
+   host->ocr = mmc_select_voltage(host, ocr);
+   if (!host->ocr) {
+      err = -EINVAL;
+      goto err;
+   }
+
+   err = mmc_send_io_op_cond(host, host->ocr, &ocr);
+   if (err)
+      goto err;
+
+   if (mmc_host_is_spi(host)) {
+      err = mmc_spi_set_crc(host, use_spi_crc);
+      if (err)
+         goto err;
+   }
+
+   if (!mmc_host_is_spi(host)) {
+      err = mmc_send_relative_addr(host, &card->rca);
+      if (err)
+         goto err;
+      mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
+   }
+   if (!mmc_host_is_spi(host)) {
+      err = mmc_select_card(card);
+      if (err)
+         goto err;
+   }
+
+   /*
+    * Switch to high-speed (if supported).
+    */
+   err = sdio_enable_hs(card);
+   if (err > 0)
+      mmc_sd_go_highspeed(card);
+   else if (err)
+      goto err;
+
+   /*
+    * Change to the card's maximum speed.
+    */
+   mmc_set_clock(host, mmc_sdio_get_max_clock(card));
+
+   err = sdio_enable_4bit_bus(card);
+   if (err > 0)
+      mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
+   else if (err)
+      goto err;
+
+   mmc_release_host(host);
+   return 0;
+err:
+   printk("%s: Error resetting SDIO communications (%d)\n",
+          mmc_hostname(host), err);
+   mmc_release_host(host);
+   return err;
+}
+EXPORT_SYMBOL(sdio_reset_comm);
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 396e8fc..d048ed5 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -426,6 +426,7 @@ struct station_parameters {
  * @STATION_INFO_RX_BITRATE: @rxrate fields are filled
  * @STATION_INFO_BSS_PARAM: @bss_param filled
  * @STATION_INFO_CONNECTED_TIME: @connected_time filled
+ * @STATION_INFO_ASSOC_REQ_IES: @assoc_req_ies filled
  */
 enum station_info_flags {
    STATION_INFO_INACTIVE_TIME   = 1<<0,
@@ -444,7 +445,8 @@ enum station_info_flags {
    STATION_INFO_SIGNAL_AVG      = 1<<13,
    STATION_INFO_RX_BITRATE      = 1<<14,
    STATION_INFO_BSS_PARAM          = 1<<15,
-   STATION_INFO_CONNECTED_TIME   = 1<<16
+   STATION_INFO_CONNECTED_TIME   = 1<<16,
+   STATION_INFO_ASSOC_REQ_IES   = 1<<17
 };
 
 /**
@@ -536,6 +538,11 @@ struct sta_bss_parameters {
  *   This number should increase every time the list of stations
  *   changes, i.e. when a station is added or removed, so that
  *   userspace can tell whether it got a consistent snapshot.
+ * @assoc_req_ies: IEs from (Re)Association Request.
+ *   This is used only when in AP mode with drivers that do not use
+ *   user space MLME/SME implementation. The information is provided for
+ *   the cfg80211_new_sta() calls to notify user space of the IEs.
+ * @assoc_req_ies_len: Length of assoc_req_ies buffer in octets.
  */
 struct station_info {
    u32 filled;
@@ -558,6 +565,14 @@ struct station_info {
    struct sta_bss_parameters bss_param;
 
    int generation;
+
+   const u8 *assoc_req_ies;
+   size_t assoc_req_ies_len;
+
+   /*
+    * Note: Add a new enum station_info_flags value for each new field and
+    * use it to check which fields are initialized.
+    */
 };
 
 /**
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index f310a0d..df6132b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2213,6 +2213,10 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
    }
    nla_nest_end(msg, sinfoattr);
 
+   if (sinfo->filled & STATION_INFO_ASSOC_REQ_IES)
+      NLA_PUT(msg, NL80211_ATTR_IE, sinfo->assoc_req_ies_len,
+         sinfo->assoc_req_ies);
+
    return genlmsg_end(msg, hdr);
 
  nla_put_failure:
--
1.8.0
Tapani
Site Admin
 
Posts: 701
Joined: Tue Aug 27, 2013 8:32 am

Re: wandboard quad wifi ap mode

Postby CruX » Tue Dec 24, 2013 1:30 pm

Using the patch tapani posted I was able to build and insert the module.

Using hostapd 2.0, the ap mode works (ping tested), but only if you use Open Mode (No auth/encryption).
I tested WPA1 and WPA2, none of them work.

I can't see any errors that occur only if wpa2 is enabled, so I'm guessing its maybe driver-related.


Best regards,
CruX
CruX
 
Posts: 68
Joined: Sun Oct 27, 2013 1:29 pm

Re: wandboard quad wifi ap mode

Postby JohanW » Wed Dec 25, 2013 12:23 am

CruX wrote:Ushttps://bbs.archlinux.org/viewtopic.php?pid=1221799ttps://bbs.archlinux.org/viewtopic.php?pid=1221799ttps://bbs.archlinux.org/viewtopic.php?id=156278&p=2ng the patch tapani posted I was able to build and insert the module.

Using hostapd 2.0, the ap mode works (ping tested), but only if you use Open Mode (No auth/encryption).
I tested WPA1 and WPA2, none of them work.

I can't see any errors that occur only if wpa2 is enabled, so I'm guessing its maybe driver-related.


Best regards,
CruX


Hi CruX

I am a total beginner when it come to Linux.
Very intressted to get the AP mode working as well.
It looks like some people have problem to get auth to work on hostapd 2.0.

Do you run wpa_supplicant?

Here is a link:
https://bbs.archlinux.org/viewtopic.php?pid=1221799

Good work.

Regards
Johan
JohanW
 
Posts: 3
Joined: Tue Dec 24, 2013 12:24 am

PreviousNext

Return to Software - General

Who is online

Users browsing this forum: No registered users and 12 guests

cron