
(bytes)
wrq->u.frag.disabled = (wrq->u.frag.value >= MAX_FRAG_THRESHOLD);
wrq->u.frag.fixed = 1;
Encoding
token & mode
SIOCGIWENCODE index = (wrq->u.encoding.flags & IW_ENCODE_INDEX) - 1;
if ((index < 0) || (index >= NR_WEP_KEYS))
index = pAd-> CommonCfg.DefaultKeyId; // Default key for tx
(shared key)
if (pAd-> CommonCfg.AuthMode == Ndis802_11AuthModeOpen)
wrq->u.encoding.flags = IW_ENCODE_OPEN;
else if (pAd-> CommonCfg.AuthMode == Ndis802_11AuthModeShared)
wrq->u.encoding.flags = IW_ENCODE_RESTRICTED;
if (pAd-> CommonCfg.WepStatus == Ndis802_11WEPDisabled)
wrq->u.encoding.flags |= IW_ENCODE_DISABLED;
else
{
if(wrq->u.encoding.pointer)
{
wrq->u.encoding.length = pAd->SharedKey[index].KeyLen;
Status = copy_to_user(wrq->u.encoding.pointer,
pAd->SharedKey[index].Key,
pAd->SharedKey[index].KeyLen);
wrq->u.encoding.flags |= (index + 1);
}
}
AP’s MAC address
SIOCGIWAP
wrq->u.ap_addr.sa_family = ARPHRD_ETHER;
memcpy(wrq->u.ap_addr.sa_data, &pAd-> CommonCfg.Bssid,
ETH_ALEN);
Operation
Mode
SIOCGIWMODE
if (ADHOC_ON(pAd))
{
BssType = Ndis802_11IBSS;
wrq->u.mode = IW_MODE_ADHOC;
}
else if (INFRA_ON(pAd))
{
BssType = Ndis802_11Infrastructure;
44/75