An AP detects brute force attacks by checking whether the number of key negotiation failures during the WPA/WPA2-PSK, WAPI-PSK or WEP-Sha re-Key authentication exceeds the configured threshold.