Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265802
b: refs/heads/master
c: 712e9bf
h: refs/heads/master
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Aug 22, 2011
1 parent 1502265 commit 5865dc6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 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: 3be4112cb2c53fcda85fb408aea9a6f94075683b
refs/heads/master: 712e9bf750c5d0db63040c5695dacf38aed4f42c
12 changes: 11 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,16 @@ static void wl12xx_free_link(struct wl1271 *wl, u8 *hlid)
*hlid = WL12XX_INVALID_LINK_ID;
}

static int wl12xx_get_new_session_id(struct wl1271 *wl)
{
if (wl->session_counter >= SESSION_COUNTER_MAX)
wl->session_counter = 0;

wl->session_counter++;

return wl->session_counter;
}

int wl12xx_cmd_role_start_dev(struct wl1271 *wl)
{
struct wl12xx_cmd_role_start *cmd;
Expand Down Expand Up @@ -580,7 +590,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl)
goto out_free;
}
cmd->sta.hlid = wl->sta_hlid;
cmd->sta.session = wl->session_counter;
cmd->sta.session = wl12xx_get_new_session_id(wl);
cmd->sta.remote_rates = cpu_to_le32(wl->rate_set);

wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d "
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2187,11 +2187,6 @@ static int wl1271_sta_handle_idle(struct wl1271 *wl, bool idle)
goto out;
set_bit(WL1271_FLAG_IDLE, &wl->flags);
} else {
/* increment the session counter */
wl->session_counter++;
if (wl->session_counter >= SESSION_COUNTER_MAX)
wl->session_counter = 0;

/* The current firmware only supports sched_scan in idle */
if (wl->sched_scanning) {
wl1271_scan_sched_scan_stop(wl);
Expand Down Expand Up @@ -4453,6 +4448,7 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
wl->sta_hlid = WL12XX_INVALID_LINK_ID;
wl->dev_role_id = WL12XX_INVALID_ROLE_ID;
wl->dev_hlid = WL12XX_INVALID_LINK_ID;
wl->session_counter = 0;
setup_timer(&wl->rx_streaming_timer, wl1271_rx_streaming_timer,
(unsigned long) wl);
wl->fwlog_size = 0;
Expand Down

0 comments on commit 5865dc6

Please sign in to comment.