@@ -2153,32 +2153,9 @@ static int send_sta_btm_query_handler(struct packet_wrapper *req, struct packet_
21532153#ifdef CONFIG_P2P
21542154static int start_up_p2p_handler (struct packet_wrapper * req , struct packet_wrapper * resp )
21552155{
2156- char * message = TLV_VALUE_WPA_S_START_UP_NOT_OK ;
2157- char buffer [S_BUFFER_LEN ];
2158- int len , status = TLV_VALUE_STATUS_NOT_OK , ret ;
2159-
2160- /* TODO: Add functionality to stop Supplicant */
2161-
2162- /* Generate P2P config file */
2163- CHECK_SNPRINTF (buffer , sizeof (buffer ), ret ,
2164- "ctrl_interface=%s\n" , WPAS_CTRL_PATH_DEFAULT );
2165- /* Add Device name and Device type */
2166- strcat (buffer , "device_name=WFA P2P Device\n" );
2167- strcat (buffer , "device_type=1-0050F204-1\n" );
2168- /* Add config methods */
2169- strcat (buffer , "config_methods=keypad display push_button\n" );
2170- len = strlen (buffer );
2171-
2172- if (len ) {
2173- write_file (get_wpas_conf_file (), buffer , len );
2174- }
2175-
2176- /* Start WPA supplicant */
2177- /* TODO: Add functionality to start Supplicant */
2156+ char * message = TLV_VALUE_WPA_S_START_UP_OK ;
2157+ int status = TLV_VALUE_STATUS_OK ;
21782158
2179- status = TLV_VALUE_STATUS_OK ;
2180- message = TLV_VALUE_WPA_S_START_UP_OK ;
2181- done :
21822159 fill_wrapper_message_hdr (resp , API_CMD_RESPONSE , req -> hdr .seq );
21832160 fill_wrapper_tlv_byte (resp , TLV_STATUS , status );
21842161 fill_wrapper_tlv_bytes (resp , TLV_MESSAGE , strlen (message ), message );
@@ -2901,30 +2878,6 @@ static int start_wps_ap_handler(struct packet_wrapper *req, struct packet_wrappe
29012878 memset (pin_code , 0 , sizeof (pin_code ));
29022879 memcpy (pin_code , tlv -> value , sizeof (pin_code ));
29032880
2904- /* Please implement the wsc pin validation function to
2905- * identify the invalid PIN code and DONOT start wps.
2906- */
2907- #define WPS_PIN_VALIDATION_FILE "/tmp/pin_checksum.sh"
2908- int len = 0 ;
2909- char pipebuf [S_BUFFER_LEN ];
2910- static const char * const parameter [] = {"sh" ,
2911- WPS_PIN_VALIDATION_FILE ,
2912- pin_code , NULL };
2913-
2914- memset (pipebuf , 0 , sizeof (pipebuf ));
2915- if (access (WPS_PIN_VALIDATION_FILE , F_OK ) == 0 ) {
2916- len = pipe_command (pipebuf , sizeof (pipebuf ), "/bin/sh" , parameter );
2917- if (len && atoi (pipebuf )) {
2918- indigo_logger (LOG_LEVEL_INFO , "Valid PIN Code: %s" , pin_code );
2919- } else {
2920- indigo_logger (LOG_LEVEL_INFO , "Invalid PIN Code: %s" , pin_code );
2921- message = TLV_VALUE_AP_WSC_PIN_CODE_NOT_OK ;
2922- goto done ;
2923- }
2924- }
2925- /*
2926- * End of wsc pin validation function
2927- */
29282881 CHECK_SNPRINTF (buffer , sizeof (buffer ), ret , "WPS_PIN any %s" , pin_code );
29292882 } else {
29302883 CHECK_SNPRINTF (buffer , sizeof (buffer ), ret , "WPS_PBC" );
0 commit comments