Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159713
b: refs/heads/master
c: 6f632d5
h: refs/heads/master
i:
  159711: 88830c6
v: v3
  • Loading branch information
Andrey Yurovsky authored and John W. Linville committed Aug 20, 2009
1 parent 68b5c9f commit 0192830
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: b23da49e6db341f4721476394dd8b95e0be2d179
refs/heads/master: 6f632d57f35303118685b88c139f3da73df077e2
8 changes: 7 additions & 1 deletion trunk/drivers/net/wireless/libertas/assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ static int get_common_rates(struct lbs_private *priv,
u8 *card_rates = lbs_bg_rates;
size_t num_card_rates = sizeof(lbs_bg_rates);
int ret = 0, i, j;
u8 tmp[30];
u8 *tmp;
size_t tmp_size = 0;

tmp = kzalloc((ARRAY_SIZE(lbs_bg_rates) - 1) * (*rates_size - 1),
GFP_KERNEL);
if (!tmp)
return -1;

/* For each rate in card_rates that exists in rate1, copy to tmp */
for (i = 0; card_rates[i] && (i < num_card_rates); i++) {
for (j = 0; rates[j] && (j < *rates_size); j++) {
Expand Down Expand Up @@ -77,6 +82,7 @@ static int get_common_rates(struct lbs_private *priv,
memset(rates, 0, *rates_size);
*rates_size = min_t(int, tmp_size, *rates_size);
memcpy(rates, tmp, *rates_size);
kfree(tmp);
return ret;
}

Expand Down

0 comments on commit 0192830

Please sign in to comment.