Hi Guys,
As I have said before I am cross compiling the o11s code to the Omap3EVM. I 
found I needed to make three simple patches to get it to compile.

Here is my build environment:
buildroot-2010.05
gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202)
linville/wireless-testing commit edb7fb09d8a4edfc6843259531cbb16bbb2acf3a
Linux-omap commit 38e1447b0a0e8d20a232e1e218f38de9af612c30

From: authsae 7ba08827ad2b1bbb17363fc06b3699e003decd77

diff --git a/ampe.c b/ampe.c
index 373d73b..065c344 100644
--- a/ampe.c
+++ b/ampe.c
@@ -126,7 +126,7 @@ static int plink_free_count() {
 static inline u8* start_of_ies(struct ieee80211_mgmt_frame *frame,
     int len, u16 *ie_len)
 {
-    int offset;
+    int offset=0;
     switch(frame->action.action_code) {
         case PLINK_OPEN:
             offset = 2;
@@ -328,6 +328,7 @@ static int check_frame_protection(struct candidate *cand, 
struct ieee80211_mgmt_
     struct info_elems ies_parsed;
     unsigned short ampe_ie_len, cat_to_mic_len;
     int r;
+    unsigned int* key_expiration_p;
 
     assert(len && cand && mgmt);
 
@@ -389,8 +390,8 @@ static int check_frame_protection(struct candidate *cand, 
struct ieee80211_mgmt_
     memcpy(cand->peer_nonce, ies_parsed.ampe->local_nonce, 32);
     memcpy(cand->mgtk, ies_parsed.ampe->mgtk, sizeof(cand->mgtk));
     sae_hexdump(AMPE_DEBUG_KEYS, "Received mgtk: ", cand->mgtk, 
sizeof(cand->mgtk));
-    cand->mgtk_expiration = le32toh(*((unsigned int *)
-            ies_parsed.ampe->key_expiration));
+    key_expiration_p = (unsigned int *)ies_parsed.ampe->key_expiration;
+    cand->mgtk_expiration = le32toh(*key_expiration_p);
     free(clear_ampe_ie);
     return -1;
 #undef MIC_IE_BODY_SIZE
diff --git a/linux/Makefile b/linux/Makefile
index 1f5f3d4..637b1c8 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -12,7 +12,7 @@ libsae.a: ../common.o ../sae.o ../service.o ../ampe.o 
../crypto/aes_siv.o
        ar rcs $@ $^
 
 meshd-nl80211: meshd-nl80211.o nlutils.o libsae.a
-       $(CC) -o $@ $^ $(LDFLAGS) -lsae -lnl -lnl-genl -lcrypto  -lconfig
+       $(CC) -o $@ $^ $(LDFLAGS) -lsae -lnl -lnl-genl-3 -lcrypto  -lconfig
 
 mon:   mon.o ../service.o ../common.o
        $(CC) $^ -o $@
diff --git a/linux/meshd-nl80211.c b/linux/meshd-nl80211.c
index dc1f167..d0dd49e 100644
--- a/linux/meshd-nl80211.c
+++ b/linux/meshd-nl80211.c
@@ -990,11 +990,11 @@ meshd_parse_libconfig (struct config_setting_t 
*meshd_section,
         config->meshid_len = strlen(config->meshid);
     }
 
-    config_setting_lookup_int(meshd_section, "passive", (long int 
*)&config->passive);
-    config_setting_lookup_int(meshd_section, "beacon", (long int 
*)&config->beacon);
-    config_setting_lookup_int(meshd_section, "debug", (long int 
*)&config->debug);
-    config_setting_lookup_int(meshd_section, "mediaopt", (long int 
*)&config->mediaopt);
-    config_setting_lookup_int(meshd_section, "channel", (long int 
*)&config->channel);
+    config_setting_lookup_int(meshd_section, "passive", &config->passive);
+    config_setting_lookup_int(meshd_section, "beacon", &config->beacon);
+    config_setting_lookup_int(meshd_section, "debug", &config->debug);
+    config_setting_lookup_int(meshd_section, "mediaopt", &config->mediaopt);
+    config_setting_lookup_int(meshd_section, "channel", &config->channel);
     config->band = MESHD_11b;
 
     if (config_setting_lookup_string(meshd_section, "band", (const char 
**)&str)) {
diff --git a/sae.c b/sae.c
index 0d22ae2..4cb382f 100644
--- a/sae.c
+++ b/sae.c
@@ -2010,7 +2010,7 @@ sae_parse_libconfig (struct config_setting_t 
*sae_section, struct sae_config* co
     char *pwd;
 
     memset(config, 0, sizeof(struct sae_config));
-    config_setting_lookup_int(sae_section, "debug", (long int 
*)&config->debug);
+    config_setting_lookup_int(sae_section, "debug", &config->debug);
     setting = config_setting_get_member(sae_section, "group");
     if (setting != NULL) {
         while (1) {
@@ -2031,11 +2031,11 @@ sae_parse_libconfig (struct config_setting_t 
*sae_section, struct sae_config* co
             config->pwd[SAE_MAX_PASSWORD_LEN - 1] = 0;
         }
     }
-    config_setting_lookup_int(sae_section, "retrans", (long int 
*)&config->retrans);
-    config_setting_lookup_int(sae_section, "lifetime", (long int 
*)&config->pmk_expiry);
-    config_setting_lookup_int(sae_section, "thresh", (long int 
*)&config->open_threshold);
-    config_setting_lookup_int(sae_section, "blacklist", (long int 
*)&config->blacklist_timeout);
-    config_setting_lookup_int(sae_section, "giveup", (long int 
*)&config->giveup_threshold);
+    config_setting_lookup_int(sae_section, "retrans", &config->retrans);
+    config_setting_lookup_int(sae_section, "lifetime", &config->pmk_expiry);
+    config_setting_lookup_int(sae_section, "thresh", &config->open_threshold);
+    config_setting_lookup_int(sae_section, "blacklist", 
&config->blacklist_timeout);
+    config_setting_lookup_int(sae_section, "giveup", 
&config->giveup_threshold);
     return 0;
 }
_______________________________________________
Devel mailing list
[email protected]
http://open80211s.com/mailman/listinfo/devel

Reply via email to