Well, a reliable way of configuring your card is with the iwconfig command. If you issue iwconfig wlan0, you'll see the current configuration and then you can use the various iwconfig options to set the card properly. For example, iwconfig wlan0 key WEPKey will set the WEP key (if you use one). The man page for iwconfig (man iwconfig) is actaully pretty good and worth a read to see everything iwconfig can use. You don't say what drivers you use, but if they are the linux_wlan_ng then you need to read their documentation because that driver doesn't work with iwconfig.
The ifup command does more than just bring up the interface. If you've already configured the card and given it an IP address, then you don't really need ifup. You can use the regular ifconfig wlan0 up instead. Since you can see that the card is properly configured before you ifup, just do what you are already doing, but use ifconfig wlan0 up instead.