# Driver interface for Host AP driver
-CONFIG_DRIVER_HOSTAP=y
+#CONFIG_DRIVER_HOSTAP=y
# Driver interface for Agere driver
#CONFIG_DRIVER_HERMES=y
# Driver interface for Host AP driver
-CONFIG_DRIVER_HOSTAP=y
+#CONFIG_DRIVER_HOSTAP=y
# Driver interface for Agere driver
#CONFIG_DRIVER_HERMES=y
# replacement for WEXT and its use allows wpa_supplicant to properly control
# the driver to improve existing functionality like roaming and to support new
# functionality.
-CONFIG_DRIVER_WEXT=y
+#CONFIG_DRIVER_WEXT=y
# Driver interface for Linux drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is
# included)
-CONFIG_IEEE8021X_EAPOL=y
+#CONFIG_IEEE8021X_EAPOL=y
# EAP-MD5
-CONFIG_EAP_MD5=y
+#CONFIG_EAP_MD5=y
# EAP-MSCHAPv2
-CONFIG_EAP_MSCHAPV2=y
+#CONFIG_EAP_MSCHAPV2=y
# EAP-TLS
-CONFIG_EAP_TLS=y
+#CONFIG_EAP_TLS=y
# EAL-PEAP
-CONFIG_EAP_PEAP=y
+#CONFIG_EAP_PEAP=y
# EAP-TTLS
-CONFIG_EAP_TTLS=y
+#CONFIG_EAP_TTLS=y
# EAP-FAST
# Note: Default OpenSSL package does not include support for all the
#CONFIG_EAP_FAST=y
# EAP-GTC
-CONFIG_EAP_GTC=y
+#CONFIG_EAP_GTC=y
# EAP-OTP
-CONFIG_EAP_OTP=y
+#CONFIG_EAP_OTP=y
# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
#CONFIG_EAP_SIM=y
#CONFIG_EAP_PAX=y
# LEAP
-CONFIG_EAP_LEAP=y
+#CONFIG_EAP_LEAP=y
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
#CONFIG_EAP_AKA=y
# Smartcard support (i.e., private key on a smartcard), e.g., with openssl
# engine.
-CONFIG_SMARTCARD=y
+#CONFIG_SMARTCARD=y
# PC/SC interface for smartcards (USIM, GSM SIM)
# Enable this if EAP-SIM or EAP-AKA is included
# Add support for new DBus control interface
# (fi.w1.hostap.wpa_supplicant1)
-CONFIG_CTRL_IFACE_DBUS_NEW=y
+#CONFIG_CTRL_IFACE_DBUS_NEW=y
# Add introspection support for new DBus control interface
-CONFIG_CTRL_IFACE_DBUS_INTRO=y
+#CONFIG_CTRL_IFACE_DBUS_INTRO=y
# Add support for loading EAP methods dynamically as shared libraries.
# When this option is enabled, each EAP method can be either included
# external networks (GAS/ANQP to learn more about the networks and network
# selection based on available credentials).
#CONFIG_INTERWORKING=y
+
+CONFIG_NO_RADIUS=y
+CONFIG_AP=y
+TIZEN_EXT=y
-wpasupplicant (1.0.0-1) precise; urgency=low
+wpasupplicant (1.0.1-2) unstable; urgency=low
+
+ * Enable hostapd with secured mode
+ * Git: framework/connectivity/wpasupplicant
+ * Tag: wpasupplicant_1.0.1-2
+
+ -- Gibyoung Kim <lastkgb.kim@samsung.com> Wed, 24 Apr 2013 00:59:05 +0900
+
+wpasupplicant (1.0.1-1) precise; urgency=low
* State clear when assoc_reject
* Git: framework/connectivity/wpasupplicant
OBJS_c = hostapd_cli.o ../src/common/wpa_ctrl.o ../src/utils/os_$(CONFIG_OS).o
+ifdef TIZEN_EXT
+CFLAGS += -DTIZEN_EXT
+CFLAGS += -DTIZEN_EXT_SOFTAP
+CFLAGS += -DBCM_DRIVER_V115
+CFLAGS += -I../src/drivers
+
+# To force sizeof(enum) = 4
+ifeq ($(TARGET_ARCH),arm)
+CFLAGS += -mabi=aapcs-linux
+endif
+endif
+
NEED_RC4=y
NEED_AES=y
NEED_MD5=y
fi
install: all
+ifdef TIZEN_EXT
+ mkdir -p $(DESTDIR)/usr/sbin
+ for i in $(ALL); do cp -f $$i $(DESTDIR)/usr/sbin/$$i; done
+else
mkdir -p $(DESTDIR)/usr/local/bin
for i in $(ALL); do cp -f $$i $(DESTDIR)/usr/local/bin/$$i; done
+endif
../src/drivers/build.hostapd:
@if [ -f ../src/drivers/build.wpa_supplicant ]; then \
ifdef CONFIG_WPA_TRACE
OBJS_c += ../src/utils/trace.o
+OBJS_c += ../src/utils/wpa_debug.o
endif
hostapd_cli: $(OBJS_c)
$(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c)
# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
# management frames); ath0 for madwifi
-interface=wlan0
+#interface=wlan0
# In case of madwifi, atheros, and nl80211 driver interfaces, an additional
# configuration parameter, bridge, may be used to notify hostapd if the
# than one interface is used.
# /var/run/hostapd is the recommended directory for sockets and by default,
# hostapd_cli will use it when trying to connect with hostapd.
-ctrl_interface=/var/run/hostapd
+#ctrl_interface=/var/run/hostapd
# Access control for the control interface can be configured by setting the
# directory to allow only members of a group to use sockets. This way, it is
##### IEEE 802.11 related configuration #######################################
# SSID to be used in IEEE 802.11 management frames
-ssid=test
+#ssid=test
# Country code (ISO/IEC 3166-1). Used to set regulatory domain.
# Set as needed to indicate country in which device is operating.
# Use integrated EAP server instead of external RADIUS authentication
# server. This is also needed if hostapd is configured to act as a RADIUS
# authentication server.
-eap_server=0
+#eap_server=0
# Path for EAP server user database
#eap_user_file=/etc/hostapd.eap_user
# authentication with external ACL for MAC addresses, and accounting
# The own IP address of the access point (used as NAS-IP-Address)
-own_ip_addr=127.0.0.1
+#own_ip_addr=127.0.0.1
# Optional NAS-Identifier string for RADIUS messages. When used, this should be
# a unique to the NAS within the scope of the RADIUS server. For example, a
#bss=wlan0_1
#bssid=00:13:10:95:fe:0b
# ...
+
+## Tizen Setting Example #######
+
+interface=wlan0
+ctrl_interface=/var/run/hostapd
+ssid=Tizen_AP
+
+wpa=2
+wpa_key_mgmt=WPA-PSK
+wpa_pairwise=CCMP
+wpa_passphrase=12345678
+wps_pin_requests=/var/run/hostapd_wps_pin_requests
+wps_state=2
+eap_server=1
+ap_setup_locked=1
+config_methods=label display push_button keypad
+########################
Name: wpasupplicant
Summary: Support for WPA and WPA2 (IEEE 802.11i / RSN)
Version: 1.0.1
-Release: 1
+Release: 2
Group: System/Network
License: BSD license
Source0: %{name}-%{version}.tar.gz
capab |= WPA_CAPABILITY_PREAUTH;
if (conf->peerkey)
capab |= WPA_CAPABILITY_PEERKEY_ENABLED;
+#ifdef TIZEN_EXT_SOFTAP
+ capab |= (RSN_NUM_REPLAY_COUNTERS_16 << 2);
+#else
if (conf->wmm_enabled) {
/* 4 PTKSA replay counters when using WMM */
capab |= (RSN_NUM_REPLAY_COUNTERS_16 << 2);
}
+#endif
#ifdef CONFIG_IEEE80211W
if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
capab |= WPA_CAPABILITY_MFPC;
u16 status;
mgmt = (const struct ieee80211_mgmt *) frame;
+#ifdef TIZEN_EXT
+ if (drv->nlmode == NL80211_IFTYPE_AP || drv->nlmode == NL80211_IFTYPE_P2P_GO) {
+ if (len < 24 + sizeof(mgmt->u.assoc_req)) {
+ wpa_printf(MSG_DEBUG, "nl80211: Too short association event "
+ "frame");
+ return;
+ }
+ os_memset(&event, 0, sizeof(event));
+ event.assoc_info.freq = drv->assoc_freq;
+ event.assoc_info.req_ies = (u8 *) mgmt->u.assoc_req.variable;
+ event.assoc_info.req_ies_len = len - 24 - sizeof(mgmt->u.assoc_req);
+ event.assoc_info.addr = mgmt->sa;
+ } else {
+#endif
if (len < 24 + sizeof(mgmt->u.assoc_resp)) {
wpa_printf(MSG_DEBUG, "nl80211: Too short association event "
"frame");
}
event.assoc_info.freq = drv->assoc_freq;
-
+#ifdef TIZEN_EXT
+ }
+#endif
wpa_supplicant_event(drv->ctx, EVENT_ASSOC, &event);
}
wpa_supplicant_event(drv->ctx, ev, &event);
}
+#ifdef TIZEN_EXT
+#ifdef BCM_DRIVER_V115
+static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
+ enum wpa_event_type type,
+ const u8 *frame, size_t len);
+#endif
+#endif
static void mlme_event_mgmt(struct wpa_driver_nl80211_data *drv,
struct nlattr *freq, const u8 *frame, size_t len)
event.rx_action.data = &mgmt->u.action.category + 1;
event.rx_action.len = frame + len - event.rx_action.data;
wpa_supplicant_event(drv->ctx, EVENT_RX_ACTION, &event);
+#ifdef TIZEN_EXT
+#ifdef BCM_DRIVER_V115
+ } else if (stype == WLAN_FC_STYPE_ASSOC_REQ) {
+ mlme_event_assoc(drv, frame, len);
+ } else if (stype == WLAN_FC_STYPE_DISASSOC) {
+ mlme_event_deauth_disassoc(drv, EVENT_DISASSOC, frame, len);
+ } else if (stype == WLAN_FC_STYPE_DEAUTH) {
+ mlme_event_deauth_disassoc(drv, EVENT_DEAUTH, frame, len);
+#endif
+#endif
} else {
event.rx_mgmt.frame = frame;
event.rx_mgmt.frame_len = len;
nl80211_set_bss(bss, params->cts_protect, params->preamble,
params->short_slot_time, params->ht_opmode);
}
+
+#ifdef TIZEN_EXT
+ wpa_driver_nl80211_probe_req_report(priv, 1);
+#endif
+
return ret;
nla_put_failure:
nlmsg_free(msg);
{
enum nl80211_iftype nlmode;
+#ifdef TIZEN_EXT
+ nlmode = NL80211_IFTYPE_AP;
+#else
if (params->p2p) {
wpa_printf(MSG_DEBUG, "nl80211: Setup AP operations for P2P "
"group (GO)");
nlmode = NL80211_IFTYPE_P2P_GO;
} else
nlmode = NL80211_IFTYPE_AP;
-
+#endif
if (wpa_driver_nl80211_set_mode(&drv->first_bss, nlmode) ||
wpa_driver_nl80211_set_freq(drv, params->freq, 0, 0)) {
nl80211_remove_monitor_interface(drv);
return -1;
}
+#ifndef TIZEN_EXT
if (drv->no_monitor_iface_capab) {
if (wpa_driver_nl80211_probe_req_report(&drv->first_bss, 1) < 0)
{
/* Try to survive without this */
}
}
-
+#endif
drv->ap_oper_freq = params->freq;
return 0;
NLA_PUT_U32(msg, NL80211_ATTR_AUTH_TYPE, type);
skip_auth_type:
+#ifdef TIZEN_EXT
+ if (params->wpa_ie && params->wpa_ie_len) {
+ enum nl80211_wpa_versions ver;
+
+ if (params->wpa_ie[0] == WLAN_EID_RSN)
+ ver = NL80211_WPA_VERSION_2;
+ else
+ ver = NL80211_WPA_VERSION_1;
+#else
if (params->wpa_proto) {
enum nl80211_wpa_versions ver = 0;
ver |= NL80211_WPA_VERSION_1;
if (params->wpa_proto & WPA_PROTO_RSN)
ver |= NL80211_WPA_VERSION_2;
-
+#endif
wpa_printf(MSG_DEBUG, " * WPA Versions 0x%x", ver);
NLA_PUT_U32(msg, NL80211_ATTR_WPA_VERSIONS, ver);
}
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
+#ifndef BCM_DRIVER_V115
if (wait)
NLA_PUT_U32(msg, NL80211_ATTR_DURATION, wait);
+#endif
NLA_PUT_FLAG(msg, NL80211_ATTR_OFFCHANNEL_TX_OK);
if (no_cck)
NLA_PUT_FLAG(msg, NL80211_ATTR_TX_NO_CCK_RATE);
NULL, 0) < 0)
goto out_err;
+#ifdef TIZEN_EXT
+ if (drv->nlmode != NL80211_IFTYPE_AP &&
+ drv->nlmode != NL80211_IFTYPE_P2P_GO) {
+ wpa_printf(MSG_DEBUG, "nl80211: probe_req_report control only "
+ "allowed in AP or P2P GO mode (iftype=%d)",
+ drv->nlmode);
+ goto done;
+ }
+
+ if (nl80211_register_frame(drv, drv->nl_preq.handle,
+ (WLAN_FC_TYPE_MGMT << 2) |
+ (WLAN_FC_STYPE_ASSOC_REQ << 4),
+ NULL, 0) < 0) {
+ goto out_err;
+ }
+
+ if (nl80211_register_frame(drv, drv->nl_preq.handle,
+ (WLAN_FC_TYPE_MGMT << 2) |
+ (WLAN_FC_STYPE_REASSOC_REQ << 4),
+ NULL, 0) < 0) {
+ goto out_err;
+ }
+
+ if (nl80211_register_frame(drv, drv->nl_preq.handle,
+ (WLAN_FC_TYPE_MGMT << 2) |
+ (WLAN_FC_STYPE_DISASSOC << 4),
+ NULL, 0) < 0) {
+ goto out_err;
+ }
+
+ if (nl80211_register_frame(drv, drv->nl_preq.handle,
+ (WLAN_FC_TYPE_MGMT << 2) |
+ (WLAN_FC_STYPE_DEAUTH << 4),
+ NULL, 0) < 0) {
+ goto out_err;
+ }
+
+done:
+#endif
eloop_register_read_sock(nl_socket_get_fd(drv->nl_preq.handle),
wpa_driver_nl80211_event_receive, drv,
drv->nl_preq.handle);
if (*attr.msg_type != WPS_M1 &&
(attr.registrar_nonce == NULL ||
os_memcmp(wps->nonce_r, attr.registrar_nonce,
- WPS_NONCE_LEN != 0))) {
+ WPS_NONCE_LEN) != 0)) {
wpa_printf(MSG_DEBUG, "WPS: Mismatch in registrar nonce");
return WPS_FAILURE;
}
#endif /* CONFIG_WPS_UPNP */
if (attr.registrar_nonce == NULL ||
- os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN != 0))
+ os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
{
wpa_printf(MSG_DEBUG, "WPS: Mismatch in registrar nonce");
return WPS_FAILURE;
}
if (attr.enrollee_nonce == NULL ||
- os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
+ os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
wpa_printf(MSG_DEBUG, "WPS: Mismatch in enrollee nonce");
return WPS_FAILURE;
}
#endif /* CONFIG_WPS_UPNP */
if (attr.registrar_nonce == NULL ||
- os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN != 0))
+ os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
{
wpa_printf(MSG_DEBUG, "WPS: Mismatch in registrar nonce");
return WPS_FAILURE;
}
if (attr.enrollee_nonce == NULL ||
- os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
+ os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
wpa_printf(MSG_DEBUG, "WPS: Mismatch in enrollee nonce");
return WPS_FAILURE;
}
#endif /* CONFIG_WPS_UPNP */
if (attr.registrar_nonce == NULL ||
- os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN != 0))
+ os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
{
wpa_printf(MSG_DEBUG, "WPS: Mismatch in registrar nonce");
return WPS_FAILURE;
}
if (attr.enrollee_nonce == NULL ||
- os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
+ os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
wpa_printf(MSG_DEBUG, "WPS: Mismatch in enrollee nonce");
return WPS_FAILURE;
}
$(STRIP) $(WINALL)
wpa_gui/Makefile:
- qmake -o wpa_gui/Makefile wpa_gui/wpa_gui.pro
+ qmake -o wpa_gui/Makefile wpa_gui/wpa_gui.pro
wpa_gui: wpa_gui/Makefile
$(MAKE) -C wpa_gui
data->assoc_reject.status_code);
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
sme_event_assoc_reject(wpa_s, data);
-
#if defined TIZEN_EXT
- wpa_supplicant_cancel_auth_timeout(wpa_s);
- /* Clear the states */
- wpa_sm_notify_disassoc(wpa_s->wpa);
- wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
- wpa_s->reassociate = 1;
- wpa_supplicant_req_scan(wpa_s, 1, 0);
+ wpa_supplicant_cancel_auth_timeout(wpa_s);
+ /* Clear the states */
+ wpa_sm_notify_disassoc(wpa_s->wpa);
+ wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+ wpa_s->reassociate = 1;
+ wpa_supplicant_req_scan(wpa_s, 1, 0);
#endif
-
break;
case EVENT_AUTH_TIMED_OUT:
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
p2p.get_noa = wpas_get_noa;
p2p.go_connected = wpas_go_connected;
-#ifdef TIZEN_EXT
-#ifdef BCM_DRIVER_V115
+#if defined(TIZEN_EXT_P2P) && defined(BCM_DRIVER_V115)
char buf[64];
-// wpa_drv_driver_cmd(wpa_s, "P2P_DEV_ADDR", buf, sizeof(buf));
- wpa_s->driver->driver_cmd(wpa_s->drv_priv, "P2P_DEV_ADDR", buf, sizeof(buf));
-// os_memcpy(p2p.p2p_dev_addr, buf, ETH_ALEN);
+ wpa_s->driver->priv_cmd(wpa_s->drv_priv, "P2P_DEV_ADDR", buf, sizeof(buf));
os_memcpy(wpa_s->global->p2p_dev_addr, buf, ETH_ALEN);
wpa_printf(MSG_DEBUG, "P2P: Device address ("MACSTR")", MAC2STR(buf));
-#endif
+ os_memcpy(p2p.own_addr, wpa_s->own_addr, ETH_ALEN);
#else
os_memcpy(wpa_s->global->p2p_dev_addr, wpa_s->own_addr, ETH_ALEN);
#endif