1 diff -rup osso-wlan-1.3.10/common.h osso-wlan-1.3.10+wpa/common.h
2 --- osso-wlan-1.3.10/common.h 2007-12-20 07:20:35.000000000 +0100
3 +++ osso-wlan-1.3.10+wpa/common.h 2009-02-23 14:03:24.000000000 +0100
4 @@ -202,6 +202,7 @@ gboolean set_power_state(guint state, in
5 int get_encryption_info(void);
6 void remove_connect_timer(void);
7 int disassociate_eap(void);
8 +int using_supplicant(void);
10 DBusHandlerResult wlancond_req_handler(DBusConnection *connection,
11 DBusMessage *message, void *user_data);
12 diff -rup osso-wlan-1.3.10/dbus-handler.c osso-wlan-1.3.10+wpa/dbus-handler.c
13 --- osso-wlan-1.3.10/dbus-handler.c 2007-12-04 12:20:31.000000000 +0100
14 +++ osso-wlan-1.3.10+wpa/dbus-handler.c 2009-02-23 14:03:32.000000000 +0100
16 #include <dbus/dbus.h>
18 #include <wlancond-dbus.h>
19 +#include <wlancond-supp.h>
21 #include <mce/dbus-names.h>
23 @@ -73,6 +74,9 @@ static gboolean power_down_after_scan =
24 static gboolean scan_threshold_supported = FALSE;
25 static dbus_bool_t saved_inactivity = FALSE;
27 +/* Indicates if we are using wpa_supplicant for the job */
28 +static gboolean use_supplicant = FALSE;
31 static guint wlan_if_down_timer_id = 0;
32 static guint wlan_connect_timer_id = 0;
33 @@ -605,14 +609,18 @@ static gboolean wlan_connect_timer_cb(vo
35 wlan_connect_timer_id = 0;
37 - if (get_wlan_state() == WLAN_INITIALIZED && !get_mic_status()) {
38 - DLOG_DEBUG("Association timeout");
39 - set_wlan_state(WLAN_NOT_INITIALIZED, DISCONNECTED_SIGNAL,
42 + if (get_wlan_state() == WLAN_INITIALIZED) {
43 + if (use_supplicant) {
44 + DLOG_DEBUG("wpa_supplicant should do its job now");
45 + } else if (!get_mic_status()) {
46 + DLOG_DEBUG("Association timeout");
48 + set_wlan_state(WLAN_NOT_INITIALIZED, DISCONNECTED_SIGNAL,
51 + DLOG_DEBUG("Association OK");
55 - //DLOG_DEBUG("Association OK");
59 @@ -1176,6 +1184,14 @@ static DBusHandlerResult settings_and_co
60 powersave = WLANCOND_SHORT_CAM;
63 + if (flags & WLANCOND_USE_SUPPLICANT) {
64 + DLOG_DEBUG("Using wpa_supplicant");
65 + use_supplicant = TRUE;
66 + encryption = WLANCOND_OPEN; // Don't handle it
68 + use_supplicant = FALSE;
71 if (power_level != WLANCOND_TX_POWER10 &&
72 power_level != WLANCOND_TX_POWER100) {
73 DLOG_ERR("Invalid power level");
74 @@ -2153,6 +2169,9 @@ int wpa_ie_push(unsigned char* ap_mac_ad
76 DBusPendingCall *pending;
81 if (wlan_status.wpa_ie.ie_valid == IE_NOT_VALID ||
82 selected_ssid == NULL) {
83 DLOG_ERR("WPA IE / SSID (%s) not valid", selected_ssid);
84 @@ -2205,6 +2224,9 @@ int wpa_mic_failure_event(dbus_bool_t ke
91 msg = dbus_message_new_method_call(
94 @@ -2249,6 +2271,9 @@ int disassociate_eap(void) {
101 msg = dbus_message_new_method_call(
104 @@ -2280,6 +2305,11 @@ int disassociate_eap(void) {
108 +int using_supplicant(void)
110 + return use_supplicant;
114 static DBusHandlerResult ignore_cover_request(DBusMessage *message,
115 DBusConnection *connection)
116 diff -rup osso-wlan-1.3.10/dbus-signal.c osso-wlan-1.3.10+wpa/dbus-signal.c
117 --- osso-wlan-1.3.10/dbus-signal.c 2008-04-09 12:53:28.000000000 +0200
118 +++ osso-wlan-1.3.10+wpa/dbus-signal.c 2009-02-27 19:39:32.000000000 +0100
119 @@ -274,7 +274,7 @@ static void handle_wap_event(struct scan
120 if (state != WLAN_CONNECTED) {
121 set_wlan_state(WLAN_NO_ADDRESS, NO_SIGNAL, FORCE_NO);
124 + } else if (!using_supplicant()) {
126 /* Set_wlan_state puts IF down */
127 set_wlan_state(WLAN_NOT_INITIALIZED,
128 @@ -488,7 +488,7 @@ static int handle_wpa_ie_assoc_event_bin
132 - if (get_wpa_mode() == FALSE)
133 + if (!get_wpa_mode() || using_supplicant())
136 // event is MAC:IE, do minimal sanity checking
137 diff -rup osso-wlan-1.3.10/debian/changelog osso-wlan-1.3.10+wpa/debian/changelog
138 --- osso-wlan-1.3.10/debian/changelog 2008-04-09 12:54:37.000000000 +0200
139 +++ osso-wlan-1.3.10+wpa/debian/changelog 2009-02-22 13:58:58.000000000 +0100
141 +osso-wlan (1.3.10+wpa) unstable; urgency=low
143 + * Added flag USE_SUPPLICANT (meaning "leave me alone")
145 + -- Javier <javier@javispedro.com> Sun, 22 Feb 2009 13:58:22 +0100
147 osso-wlan (1.3.10) unstable; urgency=low
149 * Fix build issues for SDK. Fixes: NB#83881
150 diff -rup osso-wlan-1.3.10/Makefile osso-wlan-1.3.10+wpa/Makefile
151 --- osso-wlan-1.3.10/Makefile 2008-04-09 12:54:37.000000000 +0200
152 +++ osso-wlan-1.3.10+wpa/Makefile 2009-02-27 19:40:17.000000000 +0100
153 @@ -25,7 +25,7 @@ CFLAGS += -DVERSION=\"$(VERSION)\" -D_GN
156 #CFLAGS += -g -ggdb -DDEBUG -O0 -rdynamic
158 +#CFLAGS += -DDEBUG -DOSSOLOG_STDERR
159 CFLAGS += -DUSE_MCE_MODE -DACTIVITY_CHECK
162 diff -rup osso-wlan-1.3.10/wpa.c osso-wlan-1.3.10+wpa/wpa.c
163 --- osso-wlan-1.3.10/wpa.c 2007-06-08 09:14:17.000000000 +0200
164 +++ osso-wlan-1.3.10+wpa/wpa.c 2009-02-23 13:55:36.000000000 +0100
165 @@ -188,6 +188,7 @@ static gboolean mic_failure_running_cb(v
167 gboolean get_mic_status(void)
169 + DLOG_DEBUG("get_mic_status timer=%d", mic_failure_running_timer_id);
170 return (mic_failure_running_timer_id != 0 ? TRUE:FALSE);
173 @@ -198,6 +199,12 @@ gboolean get_mic_status(void)
175 int handle_mic_failure(gboolean key_type)
177 + DLOG_WARN("MIC failure");
179 + if (using_supplicant()) {
180 + DLOG_DEBUG("Using supplicant: ignoring MIC failure");
184 if (mic_failure_timer_id != 0) {