mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge branch 'upstream-fixes' into upstream
This commit is contained in:
commit
499792ec6d
152 changed files with 2010 additions and 768 deletions
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _LINUX_FB_H
|
||||
#define _LINUX_FB_H
|
||||
|
||||
#include <linux/backlight.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
/* Definitions of frame buffers */
|
||||
|
|
@ -381,6 +380,7 @@ struct fb_cursor {
|
|||
#include <linux/workqueue.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/backlight.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
struct vm_area_struct;
|
||||
|
|
|
|||
|
|
@ -155,6 +155,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb,
|
|||
{
|
||||
struct net_device_stats *stats;
|
||||
|
||||
if (skb_bond_should_drop(skb)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NET_RX_DROP;
|
||||
}
|
||||
|
||||
skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK];
|
||||
if (skb->dev == NULL) {
|
||||
dev_kfree_skb_any(skb);
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ extern enum system_states {
|
|||
extern void dump_stack(void);
|
||||
|
||||
#ifdef DEBUG
|
||||
/* If you are writing a driver, please use dev_dbg instead */
|
||||
#define pr_debug(fmt,arg...) \
|
||||
printk(KERN_DEBUG fmt,##arg)
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -336,6 +336,7 @@ static inline void init_page_count(struct page *page)
|
|||
}
|
||||
|
||||
void put_page(struct page *page);
|
||||
void put_pages_list(struct list_head *pages);
|
||||
|
||||
void split_page(struct page *page, unsigned int order);
|
||||
|
||||
|
|
|
|||
|
|
@ -320,6 +320,9 @@ struct net_device
|
|||
#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
|
||||
|
||||
/* List of features with software fallbacks. */
|
||||
#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
|
||||
|
||||
#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
|
||||
#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
|
||||
|
||||
|
|
@ -1012,6 +1015,30 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
|
|||
unlikely(skb->ip_summed != CHECKSUM_HW));
|
||||
}
|
||||
|
||||
/* On bonding slaves other than the currently active slave, suppress
|
||||
* duplicates except for 802.3ad ETH_P_SLOW and alb non-mcast/bcast.
|
||||
*/
|
||||
static inline int skb_bond_should_drop(struct sk_buff *skb)
|
||||
{
|
||||
struct net_device *dev = skb->dev;
|
||||
struct net_device *master = dev->master;
|
||||
|
||||
if (master &&
|
||||
(dev->priv_flags & IFF_SLAVE_INACTIVE)) {
|
||||
if (master->priv_flags & IFF_MASTER_ALB) {
|
||||
if (skb->pkt_type != PACKET_BROADCAST &&
|
||||
skb->pkt_type != PACKET_MULTICAST)
|
||||
return 0;
|
||||
}
|
||||
if (master->priv_flags & IFF_MASTER_8023AD &&
|
||||
skb->protocol == __constant_htons(ETH_P_SLOW))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_DEV_H */
|
||||
|
|
|
|||
|
|
@ -1039,6 +1039,21 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len)
|
|||
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
|
||||
* @skb: buffer to alter
|
||||
* @len: new length
|
||||
*
|
||||
* This is identical to pskb_trim except that the caller knows that
|
||||
* the skb is not cloned so we should never get an error due to out-
|
||||
* of-memory.
|
||||
*/
|
||||
static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
int err = pskb_trim(skb, len);
|
||||
BUG_ON(err);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_orphan - orphan a buffer
|
||||
* @skb: buffer to orphan
|
||||
|
|
@ -1081,7 +1096,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
|
|||
* the headroom they think they need without accounting for the
|
||||
* built in space. The built in space is used for optimisations.
|
||||
*
|
||||
* %NULL is returned in there is no free memory.
|
||||
* %NULL is returned if there is no free memory.
|
||||
*/
|
||||
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
|
||||
gfp_t gfp_mask)
|
||||
|
|
@ -1101,7 +1116,7 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
|
|||
* the headroom they think they need without accounting for the
|
||||
* built in space. The built in space is used for optimisations.
|
||||
*
|
||||
* %NULL is returned in there is no free memory. Although this function
|
||||
* %NULL is returned if there is no free memory. Although this function
|
||||
* allocates memory it can be called from an interrupt.
|
||||
*/
|
||||
static inline struct sk_buff *dev_alloc_skb(unsigned int length)
|
||||
|
|
|
|||
Loading…
Reference in a new issue