int _mh_core_add_port_filtering_rule(int port, const char *protocol, int allow);
int _mh_core_add_custom_port_filtering_rule(int port1, int port2, const char *protocol, int allow);
int _mh_core_set_vpn_passthrough_rule(int vpn_type, int enable);
+#ifdef TIZEN_WLAN_BOARD_SPRD
int _mh_core_push_wps_button(void);
int _mh_core_set_wps_pin(const char *wps_pin);
+#endif
void _register_wifi_station_handler(void);
void _unregister_wifi_station_handler(void);
DBG("+");
+#ifdef TIZEN_WLAN_BOARD_SPRD
ret = _mh_core_push_wps_button();
+#else
+ ret = MOBILE_AP_ERROR_NOT_PERMITTED;
+#endif
tethering_complete_push_wps_button(obj, context, ret);
DBG("+");
+#ifdef TIZEN_WLAN_BOARD_SPRD
ret = _mh_core_set_wps_pin(wps_pin);
+#else
+ ret = MOBILE_AP_ERROR_NOT_PERMITTED;
+#endif
tethering_complete_set_wps_pin(obj, context, ret);
return MOBILE_AP_ERROR_NONE;
}
+#ifdef TIZEN_WLAN_BOARD_SPRD
static int __execute_hostapd_wps(const mobile_ap_type_e type, const char *ssid,
const char *passphrase, const char *mode, int channel, int hide_mode, int mac_filter, int max_sta)
{
return MOBILE_AP_ERROR_NONE;
}
+#endif
static int __terminate_hostapd()
{
break;
}
- if (security != NULL && !strcmp(security, "wps"))
- ret_status = __execute_hostapd_wps(type, ssid, key, mode, channel, hide_mode, mac_filter, max_sta);
- else
- ret_status = __execute_hostapd(type, ssid, security, key, mode, channel, hide_mode, mac_filter, max_sta);
+ if (security != NULL && !strcmp(security, "wps")) {
+#ifdef TIZEN_WLAN_BOARD_SPRD
+ ret_status = __execute_hostapd_wps(type, ssid, key,
+ mode, channel, hide_mode,
+ mac_filter, max_sta);
+#else
+ ret_status = MOBILE_AP_ERROR_NOT_PERMITTED;
+#endif
+ } else {
+ ret_status = __execute_hostapd(type, ssid, security, key,
+ mode, channel, hide_mode,
+ mac_filter, max_sta);
+ }
if (ret_status != MOBILE_AP_ERROR_NONE) {
ERR("__execute_hostapd is failed\n");
return ret_status;
}
+#ifdef TIZEN_WLAN_BOARD_SPRD
int _mh_core_set_wps_pin(const char *wps_pin)
{
int ret = 0;
return MOBILE_AP_ERROR_NONE;
}
+#endif
static int __get_device_info_by_wext(softap_device_info_t *di)
{
{
mobile_ap_error_code_e ret = MOBILE_AP_ERROR_NONE;
+#ifdef TIZEN_WLAN_BOARD_SPRD
ret = _mh_core_set_wps_pin(wps_pin);
+#else
+ ret = MOBILE_AP_ERROR_NOT_PERMITTED;
+#endif
+
softap_complete_set_wps_pin(obj, context, ret);
return TRUE;
{
mobile_ap_error_code_e ret = MOBILE_AP_ERROR_NONE;
+#ifdef TIZEN_WLAN_BOARD_SPRD
ret = _mh_core_push_wps_button();
+#else
+ ret = MOBILE_AP_ERROR_NOT_PERMITTED;
+#endif
+
softap_complete_push_wps_button(obj, context, ret);
return TRUE;