Commit Graph

308 Commits

Author SHA1 Message Date
Andy Shevchenko 068c11dac2 staging: wlan-ng: use %*pEhp to print SN
This is a generic specifier to print an escaped buffer by given criteria.
Let's use it instead of custom approach.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "John W . Linville" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:27 +02:00
Linus Torvalds 35a9ad8af0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
 "Most notable changes in here:

   1) By far the biggest accomplishment, thanks to a large range of
      contributors, is the addition of multi-send for transmit.  This is
      the result of discussions back in Chicago, and the hard work of
      several individuals.

      Now, when the ->ndo_start_xmit() method of a driver sees
      skb->xmit_more as true, it can choose to defer the doorbell
      telling the driver to start processing the new TX queue entires.

      skb->xmit_more means that the generic networking is guaranteed to
      call the driver immediately with another SKB to send.

      There is logic added to the qdisc layer to dequeue multiple
      packets at a time, and the handling mis-predicted offloads in
      software is now done with no locks held.

      Finally, pktgen is extended to have a "burst" parameter that can
      be used to test a multi-send implementation.

      Several drivers have xmit_more support: i40e, igb, ixgbe, mlx4,
      virtio_net

      Adding support is almost trivial, so export more drivers to
      support this optimization soon.

      I want to thank, in no particular or implied order, Jesper
      Dangaard Brouer, Eric Dumazet, Alexander Duyck, Tom Herbert, Jamal
      Hadi Salim, John Fastabend, Florian Westphal, Daniel Borkmann,
      David Tat, Hannes Frederic Sowa, and Rusty Russell.

   2) PTP and timestamping support in bnx2x, from Michal Kalderon.

   3) Allow adjusting the rx_copybreak threshold for a driver via
      ethtool, and add rx_copybreak support to enic driver.  From
      Govindarajulu Varadarajan.

   4) Significant enhancements to the generic PHY layer and the bcm7xxx
      driver in particular (EEE support, auto power down, etc.) from
      Florian Fainelli.

   5) Allow raw buffers to be used for flow dissection, allowing drivers
      to determine the optimal "linear pull" size for devices that DMA
      into pools of pages.  The objective is to get exactly the
      necessary amount of headers into the linear SKB area pre-pulled,
      but no more.  The new interface drivers use is eth_get_headlen().
      From WANG Cong, with driver conversions (several had their own
      by-hand duplicated implementations) by Alexander Duyck and Eric
      Dumazet.

   6) Support checksumming more smoothly and efficiently for
      encapsulations, and add "foo over UDP" facility.  From Tom
      Herbert.

   7) Add Broadcom SF2 switch driver to DSA layer, from Florian
      Fainelli.

   8) eBPF now can load programs via a system call and has an extensive
      testsuite.  Alexei Starovoitov and Daniel Borkmann.

   9) Major overhaul of the packet scheduler to use RCU in several major
      areas such as the classifiers and rate estimators.  From John
      Fastabend.

  10) Add driver for Intel FM10000 Ethernet Switch, from Alexander
      Duyck.

  11) Rearrange TCP_SKB_CB() to reduce cache line misses, from Eric
      Dumazet.

  12) Add Datacenter TCP congestion control algorithm support, From
      Florian Westphal.

  13) Reorganize sk_buff so that __copy_skb_header() is significantly
      faster.  From Eric Dumazet"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1558 commits)
  netlabel: directly return netlbl_unlabel_genl_init()
  net: add netdev_txq_bql_{enqueue, complete}_prefetchw() helpers
  net: description of dma_cookie cause make xmldocs warning
  cxgb4: clean up a type issue
  cxgb4: potential shift wrapping bug
  i40e: skb->xmit_more support
  net: fs_enet: Add NAPI TX
  net: fs_enet: Remove non NAPI RX
  r8169:add support for RTL8168EP
  net_sched: copy exts->type in tcf_exts_change()
  wimax: convert printk to pr_foo()
  af_unix: remove 0 assignment on static
  ipv6: Do not warn for informational ICMP messages, regardless of type.
  Update Intel Ethernet Driver maintainers list
  bridge: Save frag_max_size between PRE_ROUTING and POST_ROUTING
  tipc: fix bug in multicast congestion handling
  net: better IFF_XMIT_DST_RELEASE support
  net/mlx4_en: remove NETDEV_TX_BUSY
  3c59x: fix bad split of cpu_to_le32(pci_map_single())
  net: bcmgenet: fix Tx ring priority programming
  ...
2014-10-08 21:40:54 -04:00
Aybuke Ozdemir 43bb32a585 Staging: wlan-ng: Fix unnecessary space before function pointer arguments
This patch fixes these warning messages found by checkpatch.pl:
WARNING: Unnecessary space before function pointer arguments

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:14:09 -04:00
Grzegorz Swirski 9b4c8cfaff staging: wlan-ng: remove unused 'result' var
Signed-off-by: Grzegorz Swirski <grzegorz@swirski.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:42:39 -07:00
Aybuke Ozdemir 34c376fe07 Staging: wlan-ng: Fix return in void function warning
This fixes checkpatch.pl warning:
WARNING: void function return statements are not generally useful

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:42:15 -07:00
Ilja Sidoroff cc5bcbbdbf Staging: wlan-ng: Remove redundant break/goto statements in hfa384x_usb.c
This patch removes redundant goto or break statements in hfa384x_usb.c as found by checkpatch.pl

Signed-off-by: Ilja Sidoroff <ilja.sidoroff@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08 14:02:48 -07:00
Johannes Berg 5bc8c1f2b0 cfg80211: allow passing frame type to cfg80211_inform_bss()
When using the cfg80211_inform_bss[_width]() functions drivers
cannot currently indicate whether the data was received in a
beacon or probe response. Fix that by passing a new enum that
indicates such (or unknown).

For good measure, use it in ath6kl.

Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> [ath6kl]
Acked-by: Arend van Spriel <arend@broadcom.com> [brcmfmac]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-08-26 11:16:02 +02:00
Jeshwanth Kumar N K 230fa11f5f staging: wlan-ng: prism2mgmt.c Fix break not useful
Fixed up warnings, break is not useful after return statement.
And the exit Label is deleted, now returning inline.

Signed-off-by: Jeshwanth Kumar N K <jeshkumar555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:49:48 -07:00
Artemiy Volkov d41b7b74cf Staging: wlan-ng: Merge string literals on adjacent lines in prism2fw.c
This patch fixes the 'quoted string split across lines' checkpatch.pl
warning in prism2fw.c.

Signed-off-by: Artemiy Volkov <artemiyv@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:27 -07:00
A Raghavendra Rao 41cb65c485 Staging: wlan-ng: fix sparse warning in prism2fw.c
Fix the following sparse warning :

In file included from drivers/staging/wlan-ng/prism2usb.c:5:0:
drivers/staging/wlan-ng/prism2fw.c: In function
‘read_cardpda.constprop.43’:
drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of
1068 bytes is larger than 1024 bytes [-Wframe-larger-than=]

The variable to 'struct p80211msg_p2req_readpda' was previously being created
on the stack, which inturn exeeded the frame size limit, resulting in a
sparse warning. This patch alloctes the memory to the structure dynamically
and the operations are left unchanged.

Signed-off-by: A Raghavendra Rao <arrao@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:13 -07:00
Linus Torvalds ae045e2455 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
 "Highlights:

   1) Steady transitioning of the BPF instructure to a generic spot so
      all kernel subsystems can make use of it, from Alexei Starovoitov.

   2) SFC driver supports busy polling, from Alexandre Rames.

   3) Take advantage of hash table in UDP multicast delivery, from David
      Held.

   4) Lighten locking, in particular by getting rid of the LRU lists, in
      inet frag handling.  From Florian Westphal.

   5) Add support for various RFC6458 control messages in SCTP, from
      Geir Ola Vaagland.

   6) Allow to filter bridge forwarding database dumps by device, from
      Jamal Hadi Salim.

   7) virtio-net also now supports busy polling, from Jason Wang.

   8) Some low level optimization tweaks in pktgen from Jesper Dangaard
      Brouer.

   9) Add support for ipv6 address generation modes, so that userland
      can have some input into the process.  From Jiri Pirko.

  10) Consolidate common TCP connection request code in ipv4 and ipv6,
      from Octavian Purdila.

  11) New ARP packet logger in netfilter, from Pablo Neira Ayuso.

  12) Generic resizable RCU hash table, with intial users in netlink and
      nftables.  From Thomas Graf.

  13) Maintain a name assignment type so that userspace can see where a
      network device name came from (enumerated by kernel, assigned
      explicitly by userspace, etc.) From Tom Gundersen.

  14) Automatic flow label generation on transmit in ipv6, from Tom
      Herbert.

  15) New packet timestamping facilities from Willem de Bruijn, meant to
      assist in measuring latencies going into/out-of the packet
      scheduler, latency from TCP data transmission to ACK, etc"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1536 commits)
  cxgb4 : Disable recursive mailbox commands when enabling vi
  net: reduce USB network driver config options.
  tg3: Modify tg3_tso_bug() to handle multiple TX rings
  amd-xgbe: Perform phy connect/disconnect at dev open/stop
  amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask
  net: sun4i-emac: fix memory leak on bad packet
  sctp: fix possible seqlock seadlock in sctp_packet_transmit()
  Revert "net: phy: Set the driver when registering an MDIO bus device"
  cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine
  team: Simplify return path of team_newlink
  bridge: Update outdated comment on promiscuous mode
  net-timestamp: ACK timestamp for bytestreams
  net-timestamp: TCP timestamping
  net-timestamp: SCHED timestamp on entering packet scheduler
  net-timestamp: add key to disambiguate concurrent datagrams
  net-timestamp: move timestamp flags out of sk_flags
  net-timestamp: extend SCM_TIMESTAMPING ancillary data struct
  cxgb4i : Move stray CPL definitions to cxgb4 driver
  tcp: reduce spurious retransmits due to transient SACK reneging
  qlcnic: Initialize dcbnl_ops before register_netdev
  ...
2014-08-06 09:38:14 -07:00
Modestas Stankus 0e1fc793c7 staging: wlan-ng: coding style problem fix
WARNING: break is not useful after a goto or return
201: FILE: drivers/staging/wlan-ng/p80211conv.c:201:
+               return 1;
+               break;

Signed-off-by: Modestas Stankus <stankus.modestas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 15:00:18 -07:00
Modestas Stankus 6f8eee65a3 staging: wlan-ng: fixing coding style problems
WARNING: Unnecessary space before function pointer arguments
+       int (*func) (struct mibrec *mib,

WARNING: Missing a blank line after declarations
+                       hfa384x_WPAData_t wpa;
+                       if (isget) {

Signed-off-by: Modestas Stankus <stankus.modestas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 15:00:18 -07:00
Tom Gundersen c835a67733 net: set name_assign_type in alloc_netdev()
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.

Coccinelle patch:

@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@

(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)

v9: move comments here from the wrong commit

Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-15 16:12:48 -07:00
Matt Kurz 1177ce46a1 staging: wlan-ng/prism2fw.c: Add blank line after declarations
Fix checkpatch.pl warnings due to missing blank line after declarations

Signed-off-by: Matt Kurz <matt@ninezulu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:59:51 -07:00
Tobias Klauser 9630f6b97a staging: wlan-ng: Use net_device_stats from struct net_device
Instead of using an own copy of struct net_device_stats in struct
wlandevice, use stats from struct net_device. Also remove the thus
unnecessary .ndo_get_stats function, as it would now just return
netdev->stats, which is the default in dev_get_stats().

Furthermore, convert prefix increment of stats counters to the more
common postfix increment idiom.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:59:51 -07:00
Cheng-Wei Lee 4d525ef61f staging: wlan-ng/hfa384x_usb.c: add blank line after declarations
This patch fixes the following checkpatch.pl issues in hfa384x_usb.c:
WARNING: Missing a blank line after declarations

Signed-off-by: Quentin Lee <lee.rhapsody@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:34:42 -07:00
Johannes Stadlinger f9d01751e7 wlan-ng/prism2sta:checkpatch: Insert blank lines
This patch inserts blank lines after declarations to avoid checkpatch
warnings.

After our fixes in 'wlan-ng/prism2sta' there is still a checkpatch
warning about prefering 'ether_addr_copy' instead of 'memcpy'
remaining.

Signed-off-by: Johannes Stadlinger <Johannes.Stadlinger@fau.de>
Signed-off-by: Maximilian Eschenbacher <maximilian@eschenbacher.email>
CC: linux-kernel@i4.cs.fau.de
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
CC: Tugce Sirin <ztugcesirin@gmail.com>
CC: Himangi Saraogi <himangi774@gmail.com>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Vitaly Osipov <vitaly.osipov@gmail.com>
CC: Neil Armstrong <superna9999@gmail.com>
CC: devel@driverdev.osuosl.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 17:30:13 -07:00
Johannes Stadlinger 392cdc9768 wlan-ng/prism2sta:checkpatch: Fix string split
This patch fixes a warning of checkpatch about string splitting.

Signed-off-by: Johannes Stadlinger <Johannes.Stadlinger@fau.de>
Signed-off-by: Maximilian Eschenbacher <maximilian@eschenbacher.email>
CC: linux-kernel@i4.cs.fau.de
CC: Tugce Sirin <ztugcesirin@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
CC: Vitaly Osipov <vitaly.osipov@gmail.com>
CC: Neil Armstrong <superna9999@gmail.com>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: devel@driverdev.osuosl.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 17:30:13 -07:00
Johannes Stadlinger 5a69d9212d wlan-ng/prism2mib:checkpatch: Fix string split
This patch fixes a warning of checkpatch about string splitting.

Signed-off-by: Johannes Stadlinger <Johannes.Stadlinger@fau.de>
Signed-off-by: Maximilian Eschenbacher <maximilian@eschenbacher.email>
CC: linux-kernel@i4.cs.fau.de
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
CC: Vitaly Osipov <vitaly.osipov@gmail.com>
CC: Himangi Saraogi <himangi774@gmail.com>
CC: devel@driverdev.osuosl.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 17:30:13 -07:00
Johannes Stadlinger 5d9c8d51c8 wlan-ng/prism2mgmt:checkpatch: Insert blank line
This patch inserts a blank line after a declaration to avoid checkpatch
warning.

Signed-off-by: Johannes Stadlinger <Johannes.Stadlinger@fau.de>
Signed-off-by: Maximilian Eschenbacher <maximilian@eschenbacher.email>
CC: linux-kernel@i4.cs.fau.de
Meh-by: Josh Triplett <josh@joshtriplett.org>
CC: Himangi Saraogi <himangi774@gmail.com>
CC: Vitaly Osipov <vitaly.osipov@gmail.com>
CC: devel@driverdev.osuosl.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 17:27:36 -07:00
Johannes Stadlinger 17b3754616 wlan-ng/prism2mgmt:checkpatch: Fix string split
This patch fixes all warnings of checkpatch about string splitting.

Signed-off-by: Johannes Stadlinger <Johannes.Stadlinger@fau.de>
Signed-off-by: Maximilian Eschenbacher <maximilian@eschenbacher.email>
CC: linux-kernel@i4.cs.fau.de
CC: Himangi Saraogi <himangi774@gmail.com>
CC: Vitaly Osipov <vitaly.osipov@gmail.com>
CC: devel@driverdev.osuosl.org
CC: linux-kernel@vger.kernel.org
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 17:26:22 -07:00
Johannes Stadlinger 2cf1ba40c6 wlan-ng/prism2mgmt:checkpatch: Fix long lines
This patch fixes all warnings of checkpatch about lines over 80
characters.

Signed-off-by: Johannes Stadlinger <Johannes.Stadlinger@fau.de>
Signed-off-by: Maximilian Eschenbacher <maximilian@eschenbacher.email>
CC: linux-kernel@i4.cs.fau.de
CC: Himangi Saraogi <himangi774@gmail.com>
CC: Vitaly Osipov <vitaly.osipov@gmail.com>
CC: devel@driverdev.osuosl.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 17:26:22 -07:00
Tair Rzayev 6eaf07883c staging: wlan-ng: cfg80211.c: Fix sparse warnings
Include necessary header files to avoid "should be static" sparse warning

Signed-off-by: Tair Rzayev <tair.rzayev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 15:30:08 -07:00
Linus Torvalds f9da455b93 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:

 1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov.

 2) Multiqueue support in xen-netback and xen-netfront, from Andrew J
    Benniston.

 3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn
    Mork.

 4) BPF now has a "random" opcode, from Chema Gonzalez.

 5) Add more BPF documentation and improve test framework, from Daniel
    Borkmann.

 6) Support TCP fastopen over ipv6, from Daniel Lee.

 7) Add software TSO helper functions and use them to support software
    TSO in mvneta and mv643xx_eth drivers.  From Ezequiel Garcia.

 8) Support software TSO in fec driver too, from Nimrod Andy.

 9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli.

10) Handle broadcasts more gracefully over macvlan when there are large
    numbers of interfaces configured, from Herbert Xu.

11) Allow more control over fwmark used for non-socket based responses,
    from Lorenzo Colitti.

12) Do TCP congestion window limiting based upon measurements, from Neal
    Cardwell.

13) Support busy polling in SCTP, from Neal Horman.

14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru.

15) Bridge promisc mode handling improvements from Vlad Yasevich.

16) Don't use inetpeer entries to implement ID generation any more, it
    performs poorly, from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits)
  rtnetlink: fix userspace API breakage for iproute2 < v3.9.0
  tcp: fixing TLP's FIN recovery
  net: fec: Add software TSO support
  net: fec: Add Scatter/gather support
  net: fec: Increase buffer descriptor entry number
  net: fec: Factorize feature setting
  net: fec: Enable IP header hardware checksum
  net: fec: Factorize the .xmit transmit function
  bridge: fix compile error when compiling without IPv6 support
  bridge: fix smatch warning / potential null pointer dereference
  via-rhine: fix full-duplex with autoneg disable
  bnx2x: Enlarge the dorq threshold for VFs
  bnx2x: Check for UNDI in uncommon branch
  bnx2x: Fix 1G-baseT link
  bnx2x: Fix link for KR with swapped polarity lane
  sctp: Fix sk_ack_backlog wrap-around problem
  net/core: Add VF link state control policy
  net/fsl: xgmac_mdio is dependent on OF_MDIO
  net/fsl: Make xgmac_mdio read error message useful
  net_sched: drr: warn when qdisc is not work conserving
  ...
2014-06-12 14:27:40 -07:00
Peter Senna Tschudin 4764ca981b drivers/staging: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
    when strict
return
- ret
+ C
;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:32:15 -07:00
Vitaly Osipov 02d9b1eb4b staging: wlan-ng: use netdev_() instead of printk()
Replaced all uses of printk() in wlan-ng with netdev_err / _warn
where a netdev exists. If a few cases where a netdev does not yet
exist, dev_ or pr_ was used.

Checkpatch complains about lines over 80 chars or split string
constants - the messages are just too long, keeping it completely
happy would make the code less readable.

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:08:16 +09:00
Denis Pithon 79f9e634cc staging/wlan-ng: log with netdev_xxx and dev_xxx
Wherever possible, replaced printk() and pr_xxx() calls with
netdev_xxx() / dev_xxx() calls; used pr_xxx() otherwise.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:06:50 +09:00
Denis Pithon 95c9668dda staging/wlan-ng: rearrange comments
Gathered together comments in front of multicast filtering block.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:22 +09:00
Denis Pithon 02b3b53a08 staging/wlan-ng: multicast address checking
Used is_multicast_ether_addr() to perform the checking.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:22 +09:00
Denis Pithon 9b3ac7a892 staging/wlan-ng: compare using ether_addr_equal_unaligned
Replaced generic memcmp() with dedicated ether_addr_equal_unaligned()
call. I did not find any clue of u16 alignment for both addresses.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:21 +09:00
Denis Pithon ae4af9adf1 staging/wlan-ng: add prefix to function name
Renamed convert_frame_to_ether() to p80211_convert_to_ether().

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:21 +09:00
Johannes Berg c1e5f4714d cfg80211: constify more pointers in the cfg80211 API
This also propagates through the drivers.

The orinoco driver uses the cfg80211 API structs for internal
bookkeeping, and so needs a (void *) cast that removes the
const - but that's OK because it allocates those pointers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-19 17:53:16 +02:00
Johannes Berg 3b3a0162fa cfg80211: constify MAC addresses in cfg80211 ops
This propagates through all the drivers and mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-19 17:34:42 +02:00
Denis Pithon ccc3a5986d staging/wlan-ng: code refactoring
Extract new static function from p80211netdev_rx_bh() to fix coding
style issue (too many leading tabs).

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:58:19 -07:00
Denis Pithon 05d39beeb8 staging/wlan-ng: remove function declaration
Removed useless function prototype: static function p80211netdev_rx_bh()
is defined before being used.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:58:19 -07:00
Denis Pithon 67c4ded5a3 staging/wlan-ng: update function header comment
Header comment of p80211netdev_rx_bh() does not match function
prototype. Fixed.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:58:19 -07:00
Neil Armstrong 8cf22fda62 staging: wlan-ng: fix bad symbol declaration
With sparse, the following error appears :
  CHECK   drivers/staging/wlan-ng/p80211netdev.c
drivers/staging/wlan-ng/cfg80211.c:710:6: warning: symbol 'prism2_connect_result' was not declared. Should it be static?
drivers/staging/wlan-ng/cfg80211.c:719:6: warning: symbol 'prism2_disconnected' was not declared. Should it be static?
drivers/staging/wlan-ng/cfg80211.c:725:6: warning: symbol 'prism2_roamed' was not declared. Should it be static?

Move functions declaration to coherent internal header file.

Signed-off-by: Neil 'Superna' Armstrong <superna9999@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:57:48 -07:00
Sherif Shehab Aldin 5d85fe346f driver: staging: wlan-ng: Removed unnecessary spaces after cast from hfa384x_usb.c
Fixed: No space is necessary after a cast

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:54:11 -07:00
Sherif Shehab Aldin 638f81b849 driver: staging: wlan-ng: Removed #if 0 lines from hfa384x_usb.c
Removed lines that were ignored by #if 0

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:54:11 -07:00
Sherif Shehab Aldin 96b1971ace driver: staging: wlan-ng: Removed multiple assignments
Removed multiple assignments from hfa384x_usb.c

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:54:11 -07:00
Sherif Shehab Aldin a3542e664b driver: staging: wlan-ng: Fixed white spaces issues
In hfa384x_usb.c:
Moved Logical continuations to the correct lines
Removed unnecessary blank lines

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:54:11 -07:00
Sherif Shehab Aldin 3f2d656481 driver: staging: wlan-ng: Fixed Alignment to match open parenthesis
Fixed Alignment to match open parenthesis in hfa384x_usb.c

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:54:11 -07:00
Sherif Shehab Aldin 83f91687b0 driver: staging: wlan-ng: Removed Unnecessary space after function pointer name
Removed Unnecessary space after function pointer name

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:53:29 -07:00
Sherif Shehab Aldin d6ae4a9995 driver: staging: wlan-ng: Setting character pointers as const
changed declaration of ctlx_str to:
static const char * const ctlx_str[]

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:53:29 -07:00
Sherif Shehab Aldin baa8a6c008 driver: staging: wlan-ng: switched to pr_warn
changed printk(KERN_WARNING .. to pr_warn

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:53:29 -07:00
Sherif Shehab Aldin a03742ac96 driver: staging: wlan-ng: Removed unnecessary typedefs from hfa384x_usb.c
Removed unnecessary typedefs from hfa384x_usb.c

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:50:03 -07:00
Sherif Shehab Aldin a212013695 driver: staging: wlan-ng: Fixed Breaking long lines and strings style rule
Fixed coding style rule "Breaking long lines and strings" for hfa384x_usb.c

Signed-off-by: Sherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 14:50:03 -07:00
Denis Pithon 58612c608f staging/wlan-ng: fix small coding style issues
Delete some unneeded blank lines and add few ones to make checkpatch.pl
happy.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 16:21:15 -07:00
Denis Pithon 9864f111a6 staging/wlan-ng: remove obsolete comments
prism2sta_probe_usb() and prism2sta_disconnect_usb() header comments are
erroneous and useless. Removed.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 16:21:15 -07:00