diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_io.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_io.c b/net/ieee80211/softmac/ieee80211softmac_io.c index febc51dbb412..cc6cd56c85b1 100644 --- a/net/ieee80211/softmac/ieee80211softmac_io.c +++ b/net/ieee80211/softmac/ieee80211softmac_io.c | |||
@@ -180,9 +180,21 @@ ieee80211softmac_assoc_req(struct ieee80211_assoc_request **pkt, | |||
180 | ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), IEEE80211_STYPE_ASSOC_REQ, net->bssid, net->bssid); | 180 | ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), IEEE80211_STYPE_ASSOC_REQ, net->bssid, net->bssid); |
181 | 181 | ||
182 | /* Fill in capability Info */ | 182 | /* Fill in capability Info */ |
183 | (*pkt)->capability = (mac->ieee->iw_mode == IW_MODE_MASTER) || (mac->ieee->iw_mode == IW_MODE_INFRA) ? | 183 | switch (mac->ieee->iw_mode) { |
184 | cpu_to_le16(WLAN_CAPABILITY_ESS) : | 184 | case IW_MODE_INFRA: |
185 | cpu_to_le16(WLAN_CAPABILITY_IBSS); | 185 | (*pkt)->capability = cpu_to_le16(WLAN_CAPABILITY_ESS); |
186 | break; | ||
187 | case IW_MODE_ADHOC: | ||
188 | (*pkt)->capability = cpu_to_le16(WLAN_CAPABILITY_IBSS); | ||
189 | break; | ||
190 | case IW_MODE_AUTO: | ||
191 | (*pkt)->capability = net->capabilities & (WLAN_CAPABILITY_ESS|WLAN_CAPABILITY_IBSS); | ||
192 | break; | ||
193 | default: | ||
194 | /* bleh. we don't ever go to these modes */ | ||
195 | printk(KERN_ERR PFX "invalid iw_mode!\n"); | ||
196 | break; | ||
197 | } | ||
186 | /* Need to add this | 198 | /* Need to add this |
187 | (*pkt)->capability |= mac->ieee->short_slot ? | 199 | (*pkt)->capability |= mac->ieee->short_slot ? |
188 | cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME) : 0; | 200 | cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME) : 0; |