Skip to content

Commit

Permalink
mac80211: use listen interval 5 as default
Browse files Browse the repository at this point in the history
Currently if a driver does not set hw.max_listen_interval a listen
interval of 1 is negotiated with the AP. Thus, the AP could drop
buffered frames for us after just one beacon interval which can
easily happen with the current powersave and scan implementation.
To avoid this issue increase the default interval to 5 which should
be a reasonable safe default.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Feb 26, 2010
1 parent 7bfbae1 commit b446918
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)

debugfs_hw_add(local);

/*
* if the driver doesn't specify a max listen interval we
* use 5 which should be a safe default
*/
if (local->hw.max_listen_interval == 0)
local->hw.max_listen_interval = 1;
local->hw.max_listen_interval = 5;

local->hw.conf.listen_interval = local->hw.max_listen_interval;

Expand Down

0 comments on commit b446918

Please sign in to comment.