summaryrefslogtreecommitdiff
path: root/package/b43/src/debugfs.c
diff options
context:
space:
mode:
authorMichael Büsch <mb@bu3sch.de>2008-02-15 22:47:47 +0000
committerMichael Büsch <mb@bu3sch.de>2008-02-15 22:47:47 +0000
commit99aaf500ed5ca39f30cebf79dc0ee9ff1fd8becf (patch)
tree382f2e40c89aea52fbc7223c66466e1cd4138def /package/b43/src/debugfs.c
parent4e45a1d1acaaf25be8bd435031634ad23a5a205d (diff)
downloadmtk-20170518-99aaf500ed5ca39f30cebf79dc0ee9ff1fd8becf.zip
mtk-20170518-99aaf500ed5ca39f30cebf79dc0ee9ff1fd8becf.tar.gz
mtk-20170518-99aaf500ed5ca39f30cebf79dc0ee9ff1fd8becf.tar.bz2
Upgrade b43 and mac80211.
This also temporarly disables hostapd support for mac80211, as hostapd needs patches to compile against latest mac80211. Will do that in a seperate patch. SVN-Revision: 10466
Diffstat (limited to 'package/b43/src/debugfs.c')
-rw-r--r--package/b43/src/debugfs.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/package/b43/src/debugfs.c b/package/b43/src/debugfs.c
index 734e70e..e38ed0f 100644
--- a/package/b43/src/debugfs.c
+++ b/package/b43/src/debugfs.c
@@ -34,7 +34,6 @@
#include "main.h"
#include "debugfs.h"
#include "dma.h"
-#include "pio.h"
#include "xmit.h"
@@ -128,7 +127,7 @@ static ssize_t shm_read_file(struct b43_wldev *dev,
__le16 *le16buf = (__le16 *)buf;
for (i = 0; i < 0x1000; i++) {
- if (bufsize <= 0)
+ if (bufsize < sizeof(tmp))
break;
tmp = b43_shm_read16(dev, B43_SHM_SHARED, 2 * i);
le16buf[i] = cpu_to_le16(tmp);
@@ -223,8 +222,6 @@ out:
static int txpower_g_write_file(struct b43_wldev *dev,
const char *buf, size_t count)
{
- unsigned long phy_flags;
-
if (dev->phy.type != B43_PHYTYPE_G)
return -ENODEV;
if ((count >= 4) && (memcmp(buf, "auto", 4) == 0)) {
@@ -248,12 +245,12 @@ static int txpower_g_write_file(struct b43_wldev *dev,
dev->phy.tx_control |= B43_TXCTL_PA2DB;
if (pa3db)
dev->phy.tx_control |= B43_TXCTL_PA3DB;
- b43_phy_lock(dev, phy_flags);
+ b43_phy_lock(dev);
b43_radio_lock(dev);
b43_set_txpower_g(dev, &dev->phy.bbatt,
&dev->phy.rfatt, dev->phy.tx_control);
b43_radio_unlock(dev);
- b43_phy_unlock(dev, phy_flags);
+ b43_phy_unlock(dev);
}
return 0;
@@ -352,7 +349,7 @@ static ssize_t b43_debugfs_read(struct file *file, char __user *userbuf,
struct b43_wldev *dev;
struct b43_debugfs_fops *dfops;
struct b43_dfs_file *dfile;
- ssize_t ret;
+ ssize_t uninitialized_var(ret);
char *buf;
const size_t bufsize = 1024 * 128;
const size_t buforder = get_order(bufsize);