Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183912
b: refs/heads/master
c: f298218
h: refs/heads/master
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Jan 25, 2010
1 parent bad0907 commit 00dc236
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 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: 6f98e62a9f1bdbd83d8d1be8c2ca6f58099846ef
refs/heads/master: f2982181e0531c0b12752336a1578626f99e7828
21 changes: 12 additions & 9 deletions trunk/drivers/net/wireless/b43/phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,9 @@ static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max,
bool test)
{
int i;
u16 bw, len, num, rot, angle;
/* TODO: *buffer; */
u16 bw, len, rot, angle;
b43_c32 *samples;


bw = (dev->phy.is_40mhz) ? 40 : 20;
len = bw << 3;
Expand All @@ -839,18 +840,20 @@ static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max,
len = bw << 1;
}

/* TODO: buffer = kzalloc(len * sizeof(u32), GFP_KERNEL); */
num = len;
samples = kzalloc(len * sizeof(b43_c32), GFP_KERNEL);
rot = (((freq * 36) / bw) << 16) / 100;
angle = 0;

for (i = 0; i < num; i++) {
/* TODO */
for (i = 0; i < len; i++) {
samples[i] = b43_cordic(angle);
angle += rot;
samples[i].q = CORDIC_CONVERT(samples[i].q * max);
samples[i].i = CORDIC_CONVERT(samples[i].i * max);
}

/* TODO: Call N PHY Load Sample Table with buffer, num as arguments */
/* TODO: kfree(buffer); */
return num;
/* TODO: Call N PHY Load Sample Table with buffer, len as arguments */
kfree(samples);
return len;
}

/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RunSamples */
Expand Down

0 comments on commit 00dc236

Please sign in to comment.