Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171863
b: refs/heads/master
c: 6b21a2c
h: refs/heads/master
i:
  171861: 1130d6b
  171859: 35bb757
  171855: b390de2
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Nov 18, 2009
1 parent 2adbbba commit f4c878a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 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: 287f6f9672635f4e948c0aa96754a2ce448ebdb2
refs/heads/master: 6b21a2cd315e2e56a1748bd3ef9d910fe4f2e711
11 changes: 7 additions & 4 deletions trunk/drivers/net/wireless/wl12xx/wl1251_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold)
return ret;
}

int wl1251_acx_beacon_filter_opt(struct wl1251 *wl)
int wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter)
{
struct acx_beacon_filter_option *beacon_filter;
int ret;
Expand All @@ -507,7 +507,7 @@ int wl1251_acx_beacon_filter_opt(struct wl1251 *wl)
goto out;
}

beacon_filter->enable = 0;
beacon_filter->enable = enable_filter;
beacon_filter->max_num_beacons = 0;

ret = wl1251_cmd_configure(wl, ACX_BEACON_FILTER_OPT,
Expand All @@ -525,6 +525,7 @@ int wl1251_acx_beacon_filter_opt(struct wl1251 *wl)
int wl1251_acx_beacon_filter_table(struct wl1251 *wl)
{
struct acx_beacon_filter_ie_table *ie_table;
int idx = 0;
int ret;

wl1251_debug(DEBUG_ACX, "acx beacon filter table");
Expand All @@ -535,8 +536,10 @@ int wl1251_acx_beacon_filter_table(struct wl1251 *wl)
goto out;
}

ie_table->num_ie = 0;
memset(ie_table->table, 0, BEACON_FILTER_TABLE_MAX_SIZE);
/* configure default beacon pass-through rules */
ie_table->num_ie = 1;
ie_table->table[idx++] = BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN;
ie_table->table[idx++] = BEACON_RULE_PASS_ON_APPEARANCE;

ret = wl1251_cmd_configure(wl, ACX_BEACON_FILTER_TABLE,
ie_table, sizeof(*ie_table));
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1251_acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ struct acx_beacon_filter_option {
(BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))

#define BEACON_RULE_PASS_ON_CHANGE BIT(0)
#define BEACON_RULE_PASS_ON_APPEARANCE BIT(1)

#define BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN (37)

struct acx_beacon_filter_ie_table {
struct acx_header header;

Expand Down Expand Up @@ -1283,7 +1288,7 @@ int wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time);
int wl1251_acx_group_address_tbl(struct wl1251 *wl);
int wl1251_acx_service_period_timeout(struct wl1251 *wl);
int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold);
int wl1251_acx_beacon_filter_opt(struct wl1251 *wl);
int wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter);
int wl1251_acx_beacon_filter_table(struct wl1251 *wl);
int wl1251_acx_conn_monit_params(struct wl1251 *wl);
int wl1251_acx_sg_enable(struct wl1251 *wl);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1251_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ int wl1251_hw_init_beacon_filter(struct wl1251 *wl)
{
int ret;

ret = wl1251_acx_beacon_filter_opt(wl);
/* disable beacon filtering at this stage */
ret = wl1251_acx_beacon_filter_opt(wl, false);
if (ret < 0)
return ret;

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1251_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,8 @@ int wl1251_init_ieee80211(struct wl1251 *wl)

wl->hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM |
IEEE80211_HW_SUPPORTS_PS;
IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_BEACON_FILTER;

wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
wl->hw->wiphy->max_scan_ssids = 1;
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251_ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode)
case STATION_POWER_SAVE_MODE:
wl1251_debug(DEBUG_PSM, "entering psm");

/* enable beacon filtering */
ret = wl1251_acx_beacon_filter_opt(wl, true);
if (ret < 0)
return ret;

ret = wl1251_acx_wake_up_conditions(wl,
WAKE_UP_EVENT_DTIM_BITMAP,
wl->listen_int);
Expand All @@ -142,6 +147,11 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode)
if (ret < 0)
return ret;

/* disable beacon filtering */
ret = wl1251_acx_beacon_filter_opt(wl, false);
if (ret < 0)
return ret;

ret = wl1251_acx_wake_up_conditions(wl,
WAKE_UP_EVENT_DTIM_BITMAP,
wl->listen_int);
Expand Down

0 comments on commit f4c878a

Please sign in to comment.