static void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
{
int nh;
- nh = (ieee->mgmt_queue_head +1) % MGMT_QUEUE_NUM;
+ nh = (ieee->mgmt_queue_head + 1) % MGMT_QUEUE_NUM;
ieee->mgmt_queue_head = nh;
ieee->mgmt_queue_ring[nh] = skb;
ret = ieee->mgmt_queue_ring[ieee->mgmt_queue_tail];
ieee->mgmt_queue_tail =
- (ieee->mgmt_queue_tail+1) % MGMT_QUEUE_NUM;
+ (ieee->mgmt_queue_tail + 1) % MGMT_QUEUE_NUM;
return ret;
}
{
unsigned long flags;
short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE;
- struct ieee80211_hdr_3addr *header=
+ struct ieee80211_hdr_3addr *header =
(struct ieee80211_hdr_3addr *) skb->data;
spin_lock_irqsave(&ieee->lock, flags);
memcpy(req->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
memset(req->header.addr3, 0xff, ETH_ALEN);
- tag = (u8 *) skb_put(skb,len+2+rate_len);
+ tag = (u8 *) skb_put(skb, len + 2 + rate_len);
*tag++ = MFIE_TYPE_SSID;
*tag++ = len;
assoc->status = 0;
assoc->aid = cpu_to_le16(ieee->assoc_id);
- if (ieee->assoc_id == 0x2007) ieee->assoc_id=0;
+ if (ieee->assoc_id == 0x2007) ieee->assoc_id = 0;
else ieee->assoc_id++;
tag = (u8*) skb_put(skb, rate_len);
skb_put(skb, sizeof(struct ieee80211_assoc_request_frame));
hdr->header.frame_control = IEEE80211_STYPE_ASSOC_REQ;
- hdr->header.duration_id= 37; /* FIXME */
+ hdr->header.duration_id = 37; /* FIXME */
memcpy(hdr->header.addr1, beacon->bssid, ETH_ALEN);
memcpy(hdr->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
memcpy(hdr->header.addr3, beacon->bssid, ETH_ALEN);
IEEE80211_DEBUG_MGMT("Stopping scan\n");
ieee->softmac_stats.tx_auth_rq++;
- skb=ieee80211_authentication_req(beacon, ieee, 0);
+ skb = ieee80211_authentication_req(beacon, ieee, 0);
if (!skb) {
ieee80211_associate_abort(ieee);
} else {
IEEE80211_DEBUG_MGMT("Sending association request\n");
ieee->softmac_stats.tx_ass_rq++;
- skb=ieee80211_association_req(beacon, ieee);
+ skb = ieee80211_association_req(beacon, ieee);
if (!skb)
ieee80211_associate_abort(ieee);
else {
}
*challenge = NULL;
a = (struct ieee80211_authentication*) skb->data;
- if (skb->len > (sizeof(struct ieee80211_authentication) +3)) {
+ if (skb->len > (sizeof(struct ieee80211_authentication) + 3)) {
t = skb->data + sizeof(struct ieee80211_authentication);
if (*(t++) == MFIE_TYPE_CHALLENGE) {
{
u8 *tag;
u8 *skbend;
- u8 *ssid=NULL;
+ u8 *ssid = NULL;
u8 ssidlen = 0;
struct ieee80211_hdr_3addr *header =
{
struct ieee80211_hdr_3addr *header = (struct ieee80211_hdr_3addr *) skb->data;
u16 errcode;
- u8* challenge=NULL;
- int chlen=0;
- int aid=0;
+ u8* challenge = NULL;
+ int chlen = 0;
+ int aid = 0;
struct ieee80211_assoc_response_frame *assoc_resp;
struct ieee80211_info_element *info_element;
if (0 == errcode) {
u16 left;
- ieee->state=IEEE80211_LINKED;
+ ieee->state = IEEE80211_LINKED;
ieee->assoc_id = aid;
ieee->softmac_stats.rx_ass_ok++;
/* card type is 8187 */
static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name,
u32 value)
{
- int ret=0;
+ int ret = 0;
unsigned long flags;
switch (name) {
break;
case IEEE_PARAM_TKIP_COUNTERMEASURES:
- ieee->tkip_countermeasures=value;
+ ieee->tkip_countermeasures = value;
break;
case IEEE_PARAM_DROP_UNENCRYPTED: {
}
case IEEE_PARAM_PRIVACY_INVOKED:
- ieee->privacy_invoked=value;
+ ieee->privacy_invoked = value;
break;
case IEEE_PARAM_AUTH_ALGS:
ret = ieee80211_wpa_set_auth_algs(ieee, value);
break;
case IEEE_PARAM_IEEE_802_1X:
- ieee->ieee802_1x=value;
+ ieee->ieee802_1x = value;
break;
case IEEE_PARAM_WPAX_SELECT:
spin_lock_irqsave(&ieee->wpax_suitlist_lock,flags);
struct iw_point *p)
{
struct ieee_param *param;
- int ret=0;
+ int ret = 0;
down(&ieee->wx_sem);