Browse Source

P2P: Delete redundant comparison in p2p_process_prov_disc_resp()

Delete redundant comparison of msg.wps_config_methods with
dev->req_config_methods in p2p_process_prov_disc_resp() since it's
already done early in this function. Also, the second comparison
doesn't make too much sense: it can happen after a possible
p2p_reset_pending_pd() call setting dev->req_config_methods to 0.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Max Stepanov 9 years ago
parent
commit
20f4c3d76b
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/p2p/p2p_pd.c

+ 1 - 2
src/p2p/p2p_pd.c

@@ -966,8 +966,7 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
 					p2p->cfg->cb_ctx, sa,
 					P2P_PROV_DISC_INFO_UNAVAILABLE,
 					adv_id, adv_mac, NULL);
-	} else if (msg.wps_config_methods != dev->req_config_methods ||
-		   status != P2P_SC_SUCCESS) {
+	} else if (status != P2P_SC_SUCCESS) {
 		p2p_dbg(p2p, "Peer rejected our Provision Discovery Request");
 		if (p2p->cfg->prov_disc_fail)
 			p2p->cfg->prov_disc_fail(p2p->cfg->cb_ctx, sa,