Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291274
b: refs/heads/master
c: 0b0e32b
h: refs/heads/master
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Feb 28, 2012
1 parent daf1b8f commit f6e1405
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5af70c864a1539bd1d3f3fcb04ab9558491c9103
refs/heads/master: 0b0e32b792b4077c113ae70d6de12b5f301e0882
9 changes: 9 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,23 +459,32 @@ int wl12xx_cmd_role_disable(struct wl1271 *wl, u8 *role_id)

int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)
{
unsigned long flags;
u8 link = find_first_zero_bit(wl->links_map, WL12XX_MAX_LINKS);
if (link >= WL12XX_MAX_LINKS)
return -EBUSY;

/* these bits are used by op_tx */
spin_lock_irqsave(&wl->wl_lock, flags);
__set_bit(link, wl->links_map);
__set_bit(link, wlvif->links_map);
spin_unlock_irqrestore(&wl->wl_lock, flags);
*hlid = link;
return 0;
}

void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)
{
unsigned long flags;

if (*hlid == WL12XX_INVALID_LINK_ID)
return;

/* these bits are used by op_tx */
spin_lock_irqsave(&wl->wl_lock, flags);
__clear_bit(*hlid, wl->links_map);
__clear_bit(*hlid, wlvif->links_map);
spin_unlock_irqrestore(&wl->wl_lock, flags);
*hlid = WL12XX_INVALID_LINK_ID;
}

Expand Down

0 comments on commit f6e1405

Please sign in to comment.