aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_netdev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 13:03:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 13:03:46 -0400
commitcb62ab71fe2b16e8203a0f0a2ef4eda23d761338 (patch)
tree536ba39658e47d511a489c52f7aac60cd78967e5 /net/mac80211/debugfs_netdev.c
parent31ed8e6f93a27304c9e157dab0267772cd94eaad (diff)
parent74863948f925d9f3bb4e3d3a783e49e9c662d839 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) Get rid of the error prone NLA_PUT*() macros that used an embedded goto. 2) Kill off the token-ring and MCA networking drivers, from Paul Gortmaker. 3) Reduce high-order allocations made by datagram AF_UNIX sockets, from Eric Dumazet. 4) Add PTP hardware clock support to IGB and IXGBE, from Richard Cochran and Jacob Keller. 5) Allow users to query timestamping capabilities of a card via ethtool, from Richard Cochran. 6) Add loadbalance mode to the teaming driver, from Jiri Pirko. Part of this is that we can now have BPF filters not attached to sockets, and the loadbalancing function is calculated using one. 7) Francois Romieu went through the network drivers removing gratuitous uses of netdev->base_addr, perhaps some day we can remove it completely but it's used for ISA probing still. 8) Add a BPF JIT for sparc. I know, who cares, right? :-) 9) Move networking sysctl registry away from using the compatability mode interfaces in the sysctl code. From Eric W Biederman. 10) Pavel Emelyanov added a way to save and restore TCP socket state via TCP_REPAIR, TCP_REPAIR_QUEUE, and TCP_QUEUE_SEQ socket options as well as a way to forcefully bind a socket to a port via the sk->sk_reuse value SK_FORCE_REUSE. There is also a TCP_REPAIR_OPTIONS which allows to reinstante the TCP options enabled on the connection. 11) Several enhancements from Eric Dumazet that, in particular, can enhance splice performance on TCP sockets significantly. a) Reset the offset of the per-socket sendmsg page when we know we're the only use of the page in linear_to_page(). b) Add facilities such that skb->data can be backed a page rather than SLAB kmalloc'd memory. In particular devices which were receiving into linear RX buffers can now end up providing paged data. The big result is that code like splice and GRO do not have to copy any more. 12) Allow a pure sender to more gracefully handle ACK backlogs in TCP. What can happen at high rates is that the sender hasn't grown his receive buffer limits at all (he's not receiving data so really doesn't need to), but the non-data ACKs consume receive buffer space. sk_add_backlog() is too aggressive in dropping frames in this case, so relax it's requirements by using the receive buffer plus the send buffer limit as the backlog limit instead of just the former. Also from Eric Dumazet. 13) Add ipv6 support to L2TP, from Benjamin LaHaise, James Chapman, and Chris Elston. 14) Implement TCP early retransmit (RFC 5827), from Yuchung Cheng. Basically, we can start fast retransmit before hiting the dupack threshold under certain conditions. 15) New CODEL active queue management packet scheduler, from Eric Dumazet based upon initial work by Dave Taht. Basically, the big feature is that packets are dropped (or ECN bits are set) based upon how long packets live in the queue, rather than the queue length (which is what RED uses). * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1341 commits) drivers/net/stmmac: seq_file fix memory leak ipv6/exthdrs: strict Pad1 and PadN check USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z USB: qmi_wwan: Make forced int 4 whitelist generic net/ipv4: replace simple_strtoul with kstrtoul net/ipv4/ipconfig: neaten __setup placement net: qmi_wwan: Add Vodafone/Huawei K5005 support net: cdc_ether: Add ZTE WWAN matches before generic Ethernet ipv6: use skb coalescing in reassembly ipv4: use skb coalescing in defragmentation net: introduce skb_try_coalesce() net:ipv6:fixed space issues relating to operators. net:ipv6:fixed a trailing white space issue. ipv6: disable GSO on sockets hitting dst_allfrag tg3: use netdev_alloc_frag() API net: napi_frags_skb() is static ppp: avoid false drop_monitor false positives ipv6: bool/const conversions phase2 ipx: Remove spurious NULL checking in ipx_ioctl(). ...
Diffstat (limited to 'net/mac80211/debugfs_netdev.c')
-rw-r--r--net/mac80211/debugfs_netdev.c87
1 files changed, 27 insertions, 60 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 30f99c344847..ea0122dbd2b3 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -394,7 +394,7 @@ static ssize_t ieee80211_if_parse_uapsd_max_sp_len(
394__IEEE80211_IF_FILE_W(uapsd_max_sp_len); 394__IEEE80211_IF_FILE_W(uapsd_max_sp_len);
395 395
396/* AP attributes */ 396/* AP attributes */
397IEEE80211_IF_FILE(num_sta_authorized, u.ap.num_sta_authorized, ATOMIC); 397IEEE80211_IF_FILE(num_mcast_sta, u.ap.num_mcast_sta, ATOMIC);
398IEEE80211_IF_FILE(num_sta_ps, u.ap.num_sta_ps, ATOMIC); 398IEEE80211_IF_FILE(num_sta_ps, u.ap.num_sta_ps, ATOMIC);
399IEEE80211_IF_FILE(dtim_count, u.ap.dtim_count, DEC); 399IEEE80211_IF_FILE(dtim_count, u.ap.dtim_count, DEC);
400 400
@@ -424,6 +424,7 @@ static ssize_t ieee80211_if_parse_tsf(
424 struct ieee80211_local *local = sdata->local; 424 struct ieee80211_local *local = sdata->local;
425 unsigned long long tsf; 425 unsigned long long tsf;
426 int ret; 426 int ret;
427 int tsf_is_delta = 0;
427 428
428 if (strncmp(buf, "reset", 5) == 0) { 429 if (strncmp(buf, "reset", 5) == 0) {
429 if (local->ops->reset_tsf) { 430 if (local->ops->reset_tsf) {
@@ -431,9 +432,20 @@ static ssize_t ieee80211_if_parse_tsf(
431 wiphy_info(local->hw.wiphy, "debugfs reset TSF\n"); 432 wiphy_info(local->hw.wiphy, "debugfs reset TSF\n");
432 } 433 }
433 } else { 434 } else {
435 if (buflen > 10 && buf[1] == '=') {
436 if (buf[0] == '+')
437 tsf_is_delta = 1;
438 else if (buf[0] == '-')
439 tsf_is_delta = -1;
440 else
441 return -EINVAL;
442 buf += 2;
443 }
434 ret = kstrtoull(buf, 10, &tsf); 444 ret = kstrtoull(buf, 10, &tsf);
435 if (ret < 0) 445 if (ret < 0)
436 return -EINVAL; 446 return -EINVAL;
447 if (tsf_is_delta)
448 tsf = drv_get_tsf(local, sdata) + tsf_is_delta * tsf;
437 if (local->ops->set_tsf) { 449 if (local->ops->set_tsf) {
438 drv_set_tsf(local, sdata, tsf); 450 drv_set_tsf(local, sdata, tsf);
439 wiphy_info(local->hw.wiphy, 451 wiphy_info(local->hw.wiphy,
@@ -499,26 +511,23 @@ IEEE80211_IF_FILE(dot11MeshForwarding, u.mesh.mshcfg.dot11MeshForwarding, DEC);
499IEEE80211_IF_FILE(rssi_threshold, u.mesh.mshcfg.rssi_threshold, DEC); 511IEEE80211_IF_FILE(rssi_threshold, u.mesh.mshcfg.rssi_threshold, DEC);
500#endif 512#endif
501 513
502
503#define DEBUGFS_ADD(name) \
504 debugfs_create_file(#name, 0400, sdata->debugfs.dir, \
505 sdata, &name##_ops);
506
507#define DEBUGFS_ADD_MODE(name, mode) \ 514#define DEBUGFS_ADD_MODE(name, mode) \
508 debugfs_create_file(#name, mode, sdata->debugfs.dir, \ 515 debugfs_create_file(#name, mode, sdata->debugfs.dir, \
509 sdata, &name##_ops); 516 sdata, &name##_ops);
510 517
511static void add_sta_files(struct ieee80211_sub_if_data *sdata) 518#define DEBUGFS_ADD(name) DEBUGFS_ADD_MODE(name, 0400)
519
520static void add_common_files(struct ieee80211_sub_if_data *sdata)
512{ 521{
513 DEBUGFS_ADD(drop_unencrypted); 522 DEBUGFS_ADD(drop_unencrypted);
514 DEBUGFS_ADD(flags);
515 DEBUGFS_ADD(state);
516 DEBUGFS_ADD(channel_type);
517 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 523 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
518 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 524 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
519 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz); 525 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
520 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz); 526 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
527}
521 528
529static void add_sta_files(struct ieee80211_sub_if_data *sdata)
530{
522 DEBUGFS_ADD(bssid); 531 DEBUGFS_ADD(bssid);
523 DEBUGFS_ADD(aid); 532 DEBUGFS_ADD(aid);
524 DEBUGFS_ADD(last_beacon); 533 DEBUGFS_ADD(last_beacon);
@@ -531,16 +540,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
531 540
532static void add_ap_files(struct ieee80211_sub_if_data *sdata) 541static void add_ap_files(struct ieee80211_sub_if_data *sdata)
533{ 542{
534 DEBUGFS_ADD(drop_unencrypted); 543 DEBUGFS_ADD(num_mcast_sta);
535 DEBUGFS_ADD(flags);
536 DEBUGFS_ADD(state);
537 DEBUGFS_ADD(channel_type);
538 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
539 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
540 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
541 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
542
543 DEBUGFS_ADD(num_sta_authorized);
544 DEBUGFS_ADD(num_sta_ps); 544 DEBUGFS_ADD(num_sta_ps);
545 DEBUGFS_ADD(dtim_count); 545 DEBUGFS_ADD(dtim_count);
546 DEBUGFS_ADD(num_buffered_multicast); 546 DEBUGFS_ADD(num_buffered_multicast);
@@ -549,48 +549,14 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
549 549
550static void add_ibss_files(struct ieee80211_sub_if_data *sdata) 550static void add_ibss_files(struct ieee80211_sub_if_data *sdata)
551{ 551{
552 DEBUGFS_ADD(channel_type);
553 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
554 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
555 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
556 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
557
558 DEBUGFS_ADD_MODE(tsf, 0600); 552 DEBUGFS_ADD_MODE(tsf, 0600);
559} 553}
560 554
561static void add_wds_files(struct ieee80211_sub_if_data *sdata) 555static void add_wds_files(struct ieee80211_sub_if_data *sdata)
562{ 556{
563 DEBUGFS_ADD(drop_unencrypted);
564 DEBUGFS_ADD(flags);
565 DEBUGFS_ADD(state);
566 DEBUGFS_ADD(channel_type);
567 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
568 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
569 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
570 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
571
572 DEBUGFS_ADD(peer); 557 DEBUGFS_ADD(peer);
573} 558}
574 559
575static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
576{
577 DEBUGFS_ADD(drop_unencrypted);
578 DEBUGFS_ADD(flags);
579 DEBUGFS_ADD(state);
580 DEBUGFS_ADD(channel_type);
581 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
582 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
583 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
584 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
585}
586
587static void add_monitor_files(struct ieee80211_sub_if_data *sdata)
588{
589 DEBUGFS_ADD(flags);
590 DEBUGFS_ADD(state);
591 DEBUGFS_ADD(channel_type);
592}
593
594#ifdef CONFIG_MAC80211_MESH 560#ifdef CONFIG_MAC80211_MESH
595 561
596static void add_mesh_files(struct ieee80211_sub_if_data *sdata) 562static void add_mesh_files(struct ieee80211_sub_if_data *sdata)
@@ -651,6 +617,13 @@ static void add_files(struct ieee80211_sub_if_data *sdata)
651 if (!sdata->debugfs.dir) 617 if (!sdata->debugfs.dir)
652 return; 618 return;
653 619
620 DEBUGFS_ADD(flags);
621 DEBUGFS_ADD(state);
622 DEBUGFS_ADD(channel_type);
623
624 if (sdata->vif.type != NL80211_IFTYPE_MONITOR)
625 add_common_files(sdata);
626
654 switch (sdata->vif.type) { 627 switch (sdata->vif.type) {
655 case NL80211_IFTYPE_MESH_POINT: 628 case NL80211_IFTYPE_MESH_POINT:
656#ifdef CONFIG_MAC80211_MESH 629#ifdef CONFIG_MAC80211_MESH
@@ -671,12 +644,6 @@ static void add_files(struct ieee80211_sub_if_data *sdata)
671 case NL80211_IFTYPE_WDS: 644 case NL80211_IFTYPE_WDS:
672 add_wds_files(sdata); 645 add_wds_files(sdata);
673 break; 646 break;
674 case NL80211_IFTYPE_MONITOR:
675 add_monitor_files(sdata);
676 break;
677 case NL80211_IFTYPE_AP_VLAN:
678 add_vlan_files(sdata);
679 break;
680 default: 647 default:
681 break; 648 break;
682 } 649 }