Firstly you have to check the driver's installation for this device. To do so, access Device Manager using the following command:
Start > Run > devmgmt.msc.
In that list, all the devices should be installed properly. This means no exclamation marks, red crosses or something like that. Everything must be in perfect condition.
Secondly, you have to check the network you're connecting to. If you are the administrator of the WiFi network, then change its channel, encryption mode (TKIP > AES or TKIP/AES).
And finally, download and install the latest drivers available on the official website: http://support.dlink.com/ProductInfo.aspx?m=DWA-171