*** hostap_ioctl.c.old	Thu Sep 19 14:10:16 2002
--- hostap_ioctl.c	Thu Sep 19 15:20:38 2002
***************
*** 221,230 ****
--- 221,237 ----
   done:
  	local->open_wep = erq->flags & IW_ENCODE_OPEN;
  
+ #ifdef HOSTAP_RESET_AFTER_KEY
  	if (hostap_set_encryption(local) || local->func->reset_port(dev)) {
  		printk(KERN_DEBUG "set_encryption or reset_port failed\n");
  		return -EINVAL;
  	}
+ #else
+         if (hostap_set_encryption(local)) {
+                 printk(KERN_DEBUG "set_encryption failed\n");
+ 	        return -EINVAL;
+ 	}
+ #endif
  
  	return 0;
  }
***************
*** 1891,1905 ****
--- 1898,1921 ----
  
  	case PRISM2_PARAM_HOST_ENCRYPT:
  		local->host_encrypt = value;
+ #ifdef HOSTAP_RESET_AFTER_KEY
  		if (hostap_set_encryption(local) ||
  		    local->func->reset_port(dev))
+ #else
+ 	        if (hostap_set_encryption(local))
+ #endif
  			ret = -EINVAL;
+ 
  		break;
  
  	case PRISM2_PARAM_HOST_DECRYPT:
  		local->host_decrypt = value;
+ #ifdef HOSTAP_RESET_AFTER_KEY
  		if (hostap_set_encryption(local) ||
  		    local->func->reset_port(dev))
+ #else
+ 	        if (hostap_set_encryption(local))
+ #endif
  			ret = -EINVAL;
  		break;
  
***************
*** 2485,2492 ****
  		hostap_handle_sta_release(sta_ptr);
  
  	if (ret == 0 &&
! 	    (hostap_set_encryption(local) ||
! 	     local->func->reset_port(local->dev))) {
  		param->u.crypt.err = HOSTAP_CRYPT_ERR_CARD_CONF_FAILED;
  		return -EINVAL;
  	}
--- 2501,2511 ----
  		hostap_handle_sta_release(sta_ptr);
  
  	if (ret == 0 &&
! 	    (hostap_set_encryption(local) 
! #ifdef HOSTAP_RESET_AFTER_KEY
! 	     || local->func->reset_port(local->dev)
! #endif
! 	     )) {
  		param->u.crypt.err = HOSTAP_CRYPT_ERR_CARD_CONF_FAILED;
  		return -EINVAL;
  	}

