Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111608
b: refs/heads/master
c: 78d57eb
h: refs/heads/master
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Sep 11, 2008
1 parent 704ebb8 commit a66aab6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0db663ff192e21ebb703f962308675f22fb38a8
refs/heads/master: 78d57eb2b666617dd75aac0f1a420238004a98b3
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/p54/p54.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ struct p54_common {
struct pda_channel_output_limit *output_limit;
unsigned int output_limit_len;
struct pda_pa_curve_data *curve_data;
unsigned int filter_flags;
u16 rxhw;
u8 version;
u8 rx_antenna;
Expand Down
26 changes: 23 additions & 3 deletions trunk/drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,13 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
size_t header_len = sizeof(*hdr);
u32 tsf32;

if (!(hdr->magic & cpu_to_le16(0x0001))) {
if (priv->filter_flags & FIF_FCSFAIL)
rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
else
return 0;
}

rx_status.signal = hdr->rssi;
/* XX correct? */
rx_status.qual = (100 * hdr->rssi) / 127;
Expand Down Expand Up @@ -1127,13 +1134,26 @@ static void p54_configure_filter(struct ieee80211_hw *dev,
{
struct p54_common *priv = dev->priv;

*total_flags &= FIF_BCN_PRBRESP_PROMISC;
*total_flags &= FIF_BCN_PRBRESP_PROMISC |
FIF_PROMISC_IN_BSS |
FIF_FCSFAIL;

priv->filter_flags = *total_flags;

if (changed_flags & FIF_BCN_PRBRESP_PROMISC) {
if (*total_flags & FIF_BCN_PRBRESP_PROMISC)
p54_set_filter(dev, 0, NULL);
p54_set_filter(dev, priv->filter_type, NULL);
else
p54_set_filter(dev, priv->filter_type, priv->bssid);
}

if (changed_flags & FIF_PROMISC_IN_BSS) {
if (*total_flags & FIF_PROMISC_IN_BSS)
p54_set_filter(dev, priv->filter_type |
cpu_to_le16(0x8), NULL);
else
p54_set_filter(dev, 0, priv->bssid);
p54_set_filter(dev, priv->filter_type &
~cpu_to_le16(0x8), priv->bssid);
}
}

Expand Down

0 comments on commit a66aab6

Please sign in to comment.