diff options
| author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 10:28:19 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 10:28:19 -0500 |
| commit | 734d1ece37fbf3d2ddfc71bc6c69e0fe35f02542 (patch) | |
| tree | c4805dd7e746b1feb9e09e9849f3245d0b2c0c6b /net/mac80211/debugfs_key.c | |
| parent | 216c82c6aba63eeb49d7654b448e0d47bea255bb (diff) | |
| parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) | |
Merge tag 'v3.8-rc3' into v4l_for_linus
Linux 3.8-rc3
* tag 'v3.8-rc3': (11110 commits)
Linux 3.8-rc3
mm: reinstante dropped pmd_trans_splitting() check
cred: Remove tgcred pointer from struct cred
drm/ttm: fix fence locking in ttm_buffer_object_transfer
ARM: clps711x: Fix bad merge of clockevents setup
ARM: highbank: save and restore L2 cache and GIC on suspend
ARM: highbank: add a power request clear
ARM: highbank: fix secondary boot and hotplug
ARM: highbank: fix typos with hignbank in power request functions
ARM: dts: fix highbank cpu mpidr values
ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
drm/prime: drop reference on imported dma-buf come from gem
xen/netfront: improve truesize tracking
ARM: mx5: Fix MX53 flexcan2 clock
ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
sctp: fix Kconfig bug in default cookie hmac selection
EDAC: Cleanup device deregistering path
EDAC: Fix EDAC Kconfig menu
EDAC: Fix kernel panic on module unloading
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
...
Diffstat (limited to 'net/mac80211/debugfs_key.c')
| -rw-r--r-- | net/mac80211/debugfs_key.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c index 090d08ff22c4..c3a3082b72e5 100644 --- a/net/mac80211/debugfs_key.c +++ b/net/mac80211/debugfs_key.c | |||
| @@ -116,7 +116,7 @@ static ssize_t key_rx_spec_read(struct file *file, char __user *userbuf, | |||
| 116 | size_t count, loff_t *ppos) | 116 | size_t count, loff_t *ppos) |
| 117 | { | 117 | { |
| 118 | struct ieee80211_key *key = file->private_data; | 118 | struct ieee80211_key *key = file->private_data; |
| 119 | char buf[14*NUM_RX_DATA_QUEUES+1], *p = buf; | 119 | char buf[14*IEEE80211_NUM_TIDS+1], *p = buf; |
| 120 | int i, len; | 120 | int i, len; |
| 121 | const u8 *rpn; | 121 | const u8 *rpn; |
| 122 | 122 | ||
| @@ -126,7 +126,7 @@ static ssize_t key_rx_spec_read(struct file *file, char __user *userbuf, | |||
| 126 | len = scnprintf(buf, sizeof(buf), "\n"); | 126 | len = scnprintf(buf, sizeof(buf), "\n"); |
| 127 | break; | 127 | break; |
| 128 | case WLAN_CIPHER_SUITE_TKIP: | 128 | case WLAN_CIPHER_SUITE_TKIP: |
| 129 | for (i = 0; i < NUM_RX_DATA_QUEUES; i++) | 129 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) |
| 130 | p += scnprintf(p, sizeof(buf)+buf-p, | 130 | p += scnprintf(p, sizeof(buf)+buf-p, |
| 131 | "%08x %04x\n", | 131 | "%08x %04x\n", |
| 132 | key->u.tkip.rx[i].iv32, | 132 | key->u.tkip.rx[i].iv32, |
| @@ -134,7 +134,7 @@ static ssize_t key_rx_spec_read(struct file *file, char __user *userbuf, | |||
| 134 | len = p - buf; | 134 | len = p - buf; |
| 135 | break; | 135 | break; |
| 136 | case WLAN_CIPHER_SUITE_CCMP: | 136 | case WLAN_CIPHER_SUITE_CCMP: |
| 137 | for (i = 0; i < NUM_RX_DATA_QUEUES + 1; i++) { | 137 | for (i = 0; i < IEEE80211_NUM_TIDS + 1; i++) { |
| 138 | rpn = key->u.ccmp.rx_pn[i]; | 138 | rpn = key->u.ccmp.rx_pn[i]; |
| 139 | p += scnprintf(p, sizeof(buf)+buf-p, | 139 | p += scnprintf(p, sizeof(buf)+buf-p, |
| 140 | "%02x%02x%02x%02x%02x%02x\n", | 140 | "%02x%02x%02x%02x%02x%02x\n", |
| @@ -199,6 +199,22 @@ static ssize_t key_icverrors_read(struct file *file, char __user *userbuf, | |||
| 199 | } | 199 | } |
| 200 | KEY_OPS(icverrors); | 200 | KEY_OPS(icverrors); |
| 201 | 201 | ||
| 202 | static ssize_t key_mic_failures_read(struct file *file, char __user *userbuf, | ||
| 203 | size_t count, loff_t *ppos) | ||
| 204 | { | ||
| 205 | struct ieee80211_key *key = file->private_data; | ||
| 206 | char buf[20]; | ||
| 207 | int len; | ||
| 208 | |||
| 209 | if (key->conf.cipher != WLAN_CIPHER_SUITE_TKIP) | ||
| 210 | return -EINVAL; | ||
| 211 | |||
| 212 | len = scnprintf(buf, sizeof(buf), "%u\n", key->u.tkip.mic_failures); | ||
| 213 | |||
| 214 | return simple_read_from_buffer(userbuf, count, ppos, buf, len); | ||
| 215 | } | ||
| 216 | KEY_OPS(mic_failures); | ||
| 217 | |||
| 202 | static ssize_t key_key_read(struct file *file, char __user *userbuf, | 218 | static ssize_t key_key_read(struct file *file, char __user *userbuf, |
| 203 | size_t count, loff_t *ppos) | 219 | size_t count, loff_t *ppos) |
| 204 | { | 220 | { |
| @@ -260,6 +276,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key) | |||
| 260 | DEBUGFS_ADD(rx_spec); | 276 | DEBUGFS_ADD(rx_spec); |
| 261 | DEBUGFS_ADD(replays); | 277 | DEBUGFS_ADD(replays); |
| 262 | DEBUGFS_ADD(icverrors); | 278 | DEBUGFS_ADD(icverrors); |
| 279 | DEBUGFS_ADD(mic_failures); | ||
| 263 | DEBUGFS_ADD(key); | 280 | DEBUGFS_ADD(key); |
| 264 | DEBUGFS_ADD(ifindex); | 281 | DEBUGFS_ADD(ifindex); |
| 265 | }; | 282 | }; |
