A method for a access point device having first network identity
information to automatically establish a security link with a peer access
point device in a wireless communication system includes searching and
receiving a beacon corresponding to the peer access point device by radio
frequency scan, obtaining second network identity information
corresponding to the peer access point device from the beacon,
determining a primary-secondary relationship for the access point device
and the peer access point device according to the first and second
network identity information, generating or receiving security data
according to the primary-secondary relationship, and then establishing
the security link with the peer access point device according to the
security data.