<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/net/wireless/mwifiex/debugfs.c, branch next</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=next</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=next'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2014-03-03T20:35:54+00:00</updated>
<entry>
<title>net: Replace min macro with min_t</title>
<updated>2014-03-03T20:35:54+00:00</updated>
<author>
<name>Silvan Jegen</name>
<email>s.jegen@gmail.com</email>
</author>
<published>2014-02-25T17:12:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c8e4955653a470ece7bf580c84fc88eb58cc9850'/>
<id>urn:sha1:c8e4955653a470ece7bf580c84fc88eb58cc9850</id>
<content type='text'>
Instead of an explicit cast, use the min_t macro.

Signed-off-by: Silvan Jegen &lt;s.jegen@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mwifiex: replace num_cmd_timeout with is_cmd_timedout</title>
<updated>2014-02-28T19:33:47+00:00</updated>
<author>
<name>Amitkumar Karwar</name>
<email>akarwar@marvell.com</email>
</author>
<published>2014-02-28T03:35:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0c9c4a09f752e3cbe47fd5ea2d7f5f4837f95580'/>
<id>urn:sha1:0c9c4a09f752e3cbe47fd5ea2d7f5f4837f95580</id>
<content type='text'>
Command timeout happens when firmware goes into bad state.
There is no chance that next command will be successful after
this. Hence we will maintain a flag instead of count.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mwifiex: debugfs: Fix out of bounds array access</title>
<updated>2013-06-12T14:20:55+00:00</updated>
<author>
<name>Mark A. Greer</name>
<email>mgreer@animalcreek.com</email>
</author>
<published>2013-05-29T19:25:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f873ded213d6d8c36354c0fc903af44da4fd6ac5'/>
<id>urn:sha1:f873ded213d6d8c36354c0fc903af44da4fd6ac5</id>
<content type='text'>
When reading the contents of '/sys/kernel/debug/mwifiex/p2p0/info',
the following panic occurs:

$ cat /sys/kernel/debug/mwifiex/p2p0/info
Unable to handle kernel paging request at virtual address 74706164
pgd = de530000
[74706164] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in: phy_twl4030_usb omap2430 musb_hdrc mwifiex_sdio mwifiex
CPU: 0 PID: 1635 Comm: cat Not tainted 3.10.0-rc1-00010-g1268390 #1
task: de16b6c0 ti: de048000 task.ti: de048000
PC is at strnlen+0xc/0x4c
LR is at string+0x3c/0xf8
pc : [&lt;c02c123c&gt;]    lr : [&lt;c02c2d1c&gt;]    psr: a0000013
sp : de049e10  ip : c06efba0  fp : de6d2092
r10: bf01a260  r9 : ffffffff  r8 : 74706164
r7 : 0000ffff  r6 : ffffffff  r5 : de6d209c  r4 : 00000000
r3 : ff0a0004  r2 : 74706164  r1 : ffffffff  r0 : 74706164
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 9e530019  DAC: 00000015
Process cat (pid: 1635, stack limit = 0xde048240)
Stack: (0xde049e10 to 0xde04a000)
9e00:                                     de6d2092 00000002 bf01a25e de6d209c
9e20: de049e80 c02c438c 0000000a ff0a0004 ffffffff 00000000 00000000 de049e48
9e40: 00000000 2192df6d ff0a0004 ffffffff 00000000 de6d2092 de049ef8 bef3cc00
9e60: de6b0000 dc358000 de6d2000 00000000 00000003 c02c45a4 bf01790c bf01a254
9e80: 74706164 bf018698 00000000 de59c3c0 de048000 de049f80 00001000 bef3cc00
9ea0: 00000008 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9ee0: 00000000 00000000 00000000 00000001 00000000 00000000 6669776d 20786569
9f00: 20302e31 2e343128 392e3636 3231702e 00202933 00000000 00000003 c0294898
9f20: 00000000 00000000 00000000 00000000 de59c3c0 c0107c04 de554000 de59c3c0
9f40: 00001000 bef3cc00 de049f80 bef3cc00 de049f80 00000000 00000003 c0108a00
9f60: de048000 de59c3c0 00000000 00000000 de59c3c0 00001000 bef3cc00 c0108b60
9f80: 00000000 00000000 00001000 bef3cc00 00000003 00000003 c0014128 de048000
9fa0: 00000000 c0013f80 00001000 bef3cc00 00000003 bef3cc00 00001000 00000000
9fc0: 00001000 bef3cc00 00000003 00000003 00000001 00000001 00000001 00000003
9fe0: 00000000 bef3cbdc 00011984 b6f1127c 60000010 00000003 18dbdd2c 7f7bfffd
[&lt;c02c123c&gt;] (strnlen+0xc/0x4c) from [&lt;c02c2d1c&gt;] (string+0x3c/0xf8)
[&lt;c02c2d1c&gt;] (string+0x3c/0xf8) from [&lt;c02c438c&gt;] (vsnprintf+0x1e8/0x3e8)
[&lt;c02c438c&gt;] (vsnprintf+0x1e8/0x3e8) from [&lt;c02c45a4&gt;] (sprintf+0x18/0x24)
[&lt;c02c45a4&gt;] (sprintf+0x18/0x24) from [&lt;bf01790c&gt;] (mwifiex_info_read+0xfc/0x3e8 [mwifiex])
[&lt;bf01790c&gt;] (mwifiex_info_read+0xfc/0x3e8 [mwifiex]) from [&lt;c0108a00&gt;] (vfs_read+0xb0/0x144)
[&lt;c0108a00&gt;] (vfs_read+0xb0/0x144) from [&lt;c0108b60&gt;] (SyS_read+0x44/0x70)
[&lt;c0108b60&gt;] (SyS_read+0x44/0x70) from [&lt;c0013f80&gt;] (ret_fast_syscall+0x0/0x30)
Code: e12fff1e e3510000 e1a02000 0a00000d (e5d03000)
---[ end trace ca98273dc605a04f ]---

The panic is caused by the mwifiex_info_read() routine assuming that
there can only be four modes (0-3) which is an invalid assumption.
For example, when testing P2P, the mode is '8' (P2P_CLIENT) so the
code accesses data beyond the bounds of the bss_modes[] array which
causes the panic.  Fix this by updating bss_modes[] to support the
current list of modes and adding a check to prevent the out-of-bounds
access from occuring in the future when more modes are added.

Signed-off-by: Mark A. Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mwifiex: remove max_tx_buf_size</title>
<updated>2013-02-01T19:27:23+00:00</updated>
<author>
<name>Bing Zhao</name>
<email>bzhao@marvell.com</email>
</author>
<published>2013-01-31T03:56:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5e3175fb6755a3d4ec073c0e739581b23b3855dc'/>
<id>urn:sha1:5e3175fb6755a3d4ec073c0e739581b23b3855dc</id>
<content type='text'>
max_tx_buf_size is not used any more after reconfiguration of
tx buffer size has been removed.

Also add missing curr_tx_buf_size update while dumping debug info
via debugfs.

Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mwifiex: add multi-queue support</title>
<updated>2012-11-14T19:55:37+00:00</updated>
<author>
<name>Avinash Patil</name>
<email>patila@marvell.com</email>
</author>
<published>2012-11-02T01:44:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=47411a06c0c44b3c9dc2feffb0d97785ec9aaa68'/>
<id>urn:sha1:47411a06c0c44b3c9dc2feffb0d97785ec9aaa68</id>
<content type='text'>
This patch adds support for multiple TX queues inside mwifiex
driver. Four different queues according to WMM access categories
are defined for each virtual interface. When a packet is
received from netdev for transmission, tx pending count for
particular queue is incremented and if tx pending count has
reached upper water-mark, this queue is stopped instead of
stopping all queues. Similarly when a packet is successfully
transmitted from device, tx pending count is decremented per
queue and if pending count falls below lower water-mark, queue
operations are again resumed. This ensures that not all
tranmission is blocked if traffic with particular TOS value
suddenly increases.

Also wake all queues after association/IBSS_join/uAP_BSS_start
to enable traffic on all queues.

Signed-off-by: Avinash Patil &lt;patila@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mwifiex: display correct country information in debugfs "info"</title>
<updated>2012-04-12T19:10:29+00:00</updated>
<author>
<name>Amitkumar Karwar</name>
<email>akarwar@marvell.com</email>
</author>
<published>2012-04-10T03:06:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5e218b7ab86ed6eb3d1432146c49cbb8733414d0'/>
<id>urn:sha1:5e218b7ab86ed6eb3d1432146c49cbb8733414d0</id>
<content type='text'>
Use "priv-&gt;country_code" string to display country information in
debugfs command "info" instead of "adapter-&gt;region_code".

"adapter-&gt;region_code" contains default region code got from FW while
initialization, whereas "priv-&gt;country_code" is updated in reg_notifier
handler whenever there is a change in regulatory domain.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Kiran Divekar &lt;dkiran@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>simple_open: automatically convert to simple_open()</title>
<updated>2012-04-05T22:25:50+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2012-04-05T21:25:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=234e340582901211f40d8c732afc49f0630ecf05'/>
<id>urn:sha1:234e340582901211f40d8c732afc49f0630ecf05</id>
<content type='text'>
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op.  This leads to a
proliferation of the default_open() implementation across the entire
tree.

Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().

This replacement was done with the following semantic patch:

&lt;smpl&gt;
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i-&gt;i_private)
-f-&gt;private_data = i-&gt;i_private;
|
-f-&gt;private_data = i-&gt;i_private;
)
-return 0;
-}

@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
&lt;/smpl&gt;

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>wireless: mwifiex: print hw address via %pM</title>
<updated>2011-07-20T19:04:40+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2011-07-20T13:34:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=037b559a167c76f3457582d1b84b4d1e36e38925'/>
<id>urn:sha1:037b559a167c76f3457582d1b84b4d1e36e38925</id>
<content type='text'>
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mwifiex: fix minor issue in debugfs command 'info'</title>
<updated>2011-07-08T15:47:15+00:00</updated>
<author>
<name>Amitkumar Karwar</name>
<email>akarwar@marvell.com</email>
</author>
<published>2011-07-08T00:33:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=38869d79e5b498bd35c9967231dfb01cdd301bf5'/>
<id>urn:sha1:38869d79e5b498bd35c9967231dfb01cdd301bf5</id>
<content type='text'>
Debugfs command 'info' shows wrong interface type. The regression
occurred due to commit eecd8250e (mwifiex: remove MWIFIEX_BSS_MODE_
macros) in which we replaced MWIFIEX_BSS_MODE_* macros by
NL80211_IFTYPE_*, for example,

MWIFIEX_BSS_MODE_IBSS (2) --&gt; NL80211_IFTYPE_ADHOC (1)

The issue is fixed by swapping static character array used to
display interface type information.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mwifiex: remove unnecessary variable initialization</title>
<updated>2011-05-05T18:59:16+00:00</updated>
<author>
<name>Yogesh Ashok Powar</name>
<email>yogeshp@marvell.com</email>
</author>
<published>2011-05-04T03:11:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=270e58e8898c8be40451ebee45b6c9b5bd5db04b'/>
<id>urn:sha1:270e58e8898c8be40451ebee45b6c9b5bd5db04b</id>
<content type='text'>
Skip initialization of local variables with some default values
if the values are not going to be used further down the code path.

Signed-off-by: Yogesh Ashok Powar &lt;yogeshp@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
