mac80211: a few formatting fixes

Fix a few code formatting issues in the RX code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2012-10-26 00:09:11 +02:00
parent 1724ffbc74
commit 1df332e82d

View file

@ -54,8 +54,7 @@ static struct sk_buff *remove_monitor_info(struct ieee80211_local *local,
return skb; return skb;
} }
static inline int should_drop_frame(struct sk_buff *skb, static inline int should_drop_frame(struct sk_buff *skb, int present_fcs_len)
int present_fcs_len)
{ {
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@ -137,8 +136,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
/* IEEE80211_RADIOTAP_TSFT */ /* IEEE80211_RADIOTAP_TSFT */
if (status->flag & RX_FLAG_MACTIME_MPDU) { if (status->flag & RX_FLAG_MACTIME_MPDU) {
put_unaligned_le64(status->mactime, pos); put_unaligned_le64(status->mactime, pos);
rthdr->it_present |= rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_TSFT);
cpu_to_le32(1 << IEEE80211_RADIOTAP_TSFT);
pos += 8; pos += 8;
} }
@ -374,7 +372,6 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
return origskb; return origskb;
} }
static void ieee80211_parse_qos(struct ieee80211_rx_data *rx) static void ieee80211_parse_qos(struct ieee80211_rx_data *rx)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
@ -481,8 +478,7 @@ static int ieee80211_get_mmie_keyidx(struct sk_buff *skb)
struct ieee80211_mgmt *hdr = (struct ieee80211_mgmt *) skb->data; struct ieee80211_mgmt *hdr = (struct ieee80211_mgmt *) skb->data;
struct ieee80211_mmie *mmie; struct ieee80211_mmie *mmie;
if (skb->len < 24 + sizeof(*mmie) || if (skb->len < 24 + sizeof(*mmie) || !is_multicast_ether_addr(hdr->da))
!is_multicast_ether_addr(hdr->da))
return -1; return -1;
if (!ieee80211_is_robust_mgmt_frame((struct ieee80211_hdr *) hdr)) if (!ieee80211_is_robust_mgmt_frame((struct ieee80211_hdr *) hdr))
@ -497,9 +493,7 @@ static int ieee80211_get_mmie_keyidx(struct sk_buff *skb)
return le16_to_cpu(mmie->key_id); return le16_to_cpu(mmie->key_id);
} }
static ieee80211_rx_result ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)
static ieee80211_rx_result
ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
char *dev_addr = rx->sdata->vif.addr; char *dev_addr = rx->sdata->vif.addr;
@ -546,7 +540,6 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)
return RX_CONTINUE; return RX_CONTINUE;
return RX_DROP_MONITOR; return RX_DROP_MONITOR;
} }
return RX_CONTINUE; return RX_CONTINUE;
@ -570,7 +563,6 @@ static inline u16 seq_sub(u16 sq1, u16 sq2)
return (sq1 - sq2) & SEQ_MASK; return (sq1 - sq2) & SEQ_MASK;
} }
static void ieee80211_release_reorder_frame(struct ieee80211_sub_if_data *sdata, static void ieee80211_release_reorder_frame(struct ieee80211_sub_if_data *sdata,
struct tid_ampdu_rx *tid_agg_rx, struct tid_ampdu_rx *tid_agg_rx,
int index) int index)
@ -1575,18 +1567,15 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
return RX_CONTINUE; return RX_CONTINUE;
} }
static int static int ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx)
ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx)
{ {
if (unlikely(!rx->sta || if (unlikely(!rx->sta || !test_sta_flag(rx->sta, WLAN_STA_AUTHORIZED)))
!test_sta_flag(rx->sta, WLAN_STA_AUTHORIZED)))
return -EACCES; return -EACCES;
return 0; return 0;
} }
static int static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
{ {
struct sk_buff *skb = rx->skb; struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
@ -1608,8 +1597,7 @@ ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
return 0; return 0;
} }
static int static int ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
@ -2379,7 +2367,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
if (!ieee80211_vif_is_mesh(&sdata->vif)) if (!ieee80211_vif_is_mesh(&sdata->vif))
break; break;
if (mesh_action_is_path_sel(mgmt) && if (mesh_action_is_path_sel(mgmt) &&
(!mesh_path_sel_is_hwmp(sdata))) !mesh_path_sel_is_hwmp(sdata))
break; break;
goto queue; goto queue;
} }
@ -2435,7 +2423,6 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
return RX_QUEUED; return RX_QUEUED;
} }
return RX_CONTINUE; return RX_CONTINUE;
} }