P2P: Delete redundant comparison in p2p_process_prov_disc_resp()
authorMax Stepanov <Max.Stepanov@intel.com>
Thu, 2 Jul 2015 07:45:00 +0000 (10:45 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 7 Jul 2015 17:20:43 +0000 (20:20 +0300)
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>
src/p2p/p2p_pd.c

index f62c63d..ba01da1 100644 (file)
@@ -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,