diff options
| author | mattis fjallstrom <mattis@acm.org> | 2015-05-21 12:00:33 -0700 |
|---|---|---|
| committer | mattis fjallstrom <mattis@acm.org> | 2015-05-21 13:24:30 -0700 |
| commit | 7d990a059acf5eb46ae99c058fc9911cbdce131d (patch) | |
| tree | ac9531b3ff2b2670dabc84c248a1770c84109586 /include | |
| parent | e8980e2a6a7392ae5a1f882d1ba01e03ac83f899 (diff) | |
| parent | 89fdc2c4bb83fff36199cd883a27efb317f02037 (diff) | |
| download | olio-linux-3.10-7d990a059acf5eb46ae99c058fc9911cbdce131d.tar.xz olio-linux-3.10-7d990a059acf5eb46ae99c058fc9911cbdce131d.zip | |
Merge branch 'android-omap-minnow-3.10-lollipop-wear-release' of https://android.googlesource.com/kernel/omap into mattis_devmattis_dev
Change-Id: I46165dd7747b9b6289eb44cb96cbef2de46c10ba
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/als_notify.h | 36 | ||||
| -rw-r--r-- | include/linux/iio/m4sensorhub/m4sensorhub_fusion.h | 4 | ||||
| -rw-r--r-- | include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h | 1 | ||||
| -rw-r--r-- | include/linux/ipv6.h | 1 | ||||
| -rw-r--r-- | include/linux/m4sensorhub.h | 7 | ||||
| -rw-r--r-- | include/linux/m4sensorhub/MemMapLog.h | 111 | ||||
| -rw-r--r-- | include/linux/m4sensorhub/m4sensorhub_reg_enum.h | 8 | ||||
| -rw-r--r-- | include/linux/power/max17042_battery.h | 3 | ||||
| -rw-r--r-- | include/net/addrconf.h | 2 | ||||
| -rw-r--r-- | include/net/fib_rules.h | 6 | ||||
| -rw-r--r-- | include/net/flow.h | 9 | ||||
| -rw-r--r-- | include/net/inet_sock.h | 9 | ||||
| -rw-r--r-- | include/net/ip.h | 4 | ||||
| -rw-r--r-- | include/net/ip6_route.h | 2 | ||||
| -rw-r--r-- | include/net/ipv6.h | 3 | ||||
| -rw-r--r-- | include/net/netns/ipv4.h | 3 | ||||
| -rw-r--r-- | include/net/netns/ipv6.h | 1 | ||||
| -rw-r--r-- | include/net/route.h | 5 | ||||
| -rw-r--r-- | include/uapi/linux/fib_rules.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/ipv6.h | 1 | ||||
| -rw-r--r-- | include/uapi/linux/rtnetlink.h | 1 |
21 files changed, 157 insertions, 62 deletions
diff --git a/include/linux/als_notify.h b/include/linux/als_notify.h new file mode 100644 index 00000000000..1c35ca54727 --- /dev/null +++ b/include/linux/als_notify.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 Motorola Mobility LLC. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef ALS_NOTIFY_H +#define ALS_NOTIFY_H + +#ifdef __KERNEL__ + +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif + +enum als_state { + ALS_ENABLED = (UINT16_MAX + 1), + ALS_DISABLED +}; + +extern void als_register_notify(struct notifier_block *nb); +extern void als_unregister_notify(struct notifier_block *nb); +extern void als_notify_subscriber(unsigned long event); +#endif /* __KERNEL__ */ + +#endif /* ALS_NOTIFY_H */ diff --git a/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h b/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h index 57680018826..6748393e0e5 100644 --- a/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h +++ b/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h @@ -26,6 +26,9 @@ enum m4sensorhub_fusion_iio_type { FUSION_TYPE_ROTATION = 0, FUSION_TYPE_ORIENTATION = 1, + FUSION_TYPE_GRAVITY = 2, + FUSION_TYPE_LINEAR_ACCELERATION = 3, + M4FUS_NUM_FUSION_BUFFERS }; struct m4sensorhub_fusion_iio_data { @@ -38,6 +41,5 @@ struct m4sensorhub_fusion_iio_data { #define M4FUS_DATA_STRUCT_SIZE_BITS \ (sizeof(struct m4sensorhub_fusion_iio_data) * 8) -#define M4FUS_NUM_FUSION_BUFFERS 2 #endif /* _M4SENSORHUB_FUSION_IIO_H */ diff --git a/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h b/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h index 2e4d6cd9bec..28af1e76359 100644 --- a/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h +++ b/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h @@ -30,6 +30,7 @@ struct m4sensorhub_pedometer_iio_data { uint16_t current_speed; uint32_t healthy_minutes; uint32_t calories; + uint32_t calories_normr; long long timestamp; } __packed; diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 850e95bc766..867833ba6bd 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -36,6 +36,7 @@ struct ipv6_devconf { __s32 accept_ra_rt_info_max_plen; #endif #endif + __s32 accept_ra_rt_table; __s32 proxy_ndp; __s32 accept_source_route; #ifdef CONFIG_IPV6_OPTIMISTIC_DAD diff --git a/include/linux/m4sensorhub.h b/include/linux/m4sensorhub.h index 5bc54f0885b..5eb2ec0586f 100644 --- a/include/linux/m4sensorhub.h +++ b/include/linux/m4sensorhub.h @@ -73,6 +73,7 @@ enum m4sensorhub_panichdl_index { PANICHDL_ALS_RESTORE, PANICHDL_MPU9150_RESTORE, PANICHDL_PEDOMETER_RESTORE, + PANICHDL_EXTERN_RESTORE, /* * Please add enum before PANICHDL_IRQ_RESTORE * to make sure IRQ restore will be called last. @@ -241,5 +242,11 @@ bool m4sensorhub_preflash_callbacks_exist(void); /* For FW flash core */ int m4sensorhub_irq_disable_all(struct m4sensorhub_data *m4sensorhub); +/* External System Calls for Non-M4 Drivers */ +int m4sensorhub_extern_init(struct m4sensorhub_data *m4); /* Init for core */ +int m4sensorhub_extern_set_audio_status(uint8_t status); +int m4sensorhub_extern_set_display_status(uint8_t status); +int m4sensorhub_get_current_mode(void); + #endif /* __KERNEL__ */ #endif /* __M4SENSORHUB_H__ */ diff --git a/include/linux/m4sensorhub/MemMapLog.h b/include/linux/m4sensorhub/MemMapLog.h index 9aab2f4cea8..2b7882a4df4 100644 --- a/include/linux/m4sensorhub/MemMapLog.h +++ b/include/linux/m4sensorhub/MemMapLog.h @@ -1,53 +1,58 @@ -/**********************************************************************
-*
-* Copyright (C) 2012 Motorola, Inc.
-*
-**********************************************************************
-File : MemMapLog.h
-Purpose :
-**********************************************************************/
-#ifndef __MEMMAP_LOG_H__
-#define __MEMMAP_LOG_H__
-/****************************** Defines *******************************/
-struct memMapLog
-{
- u64 logEnable;
- u8 isLogImmediate;
-};
-
-#define LOG_MAX 24
-#define LOG_LEVELS_MAX 4
-
-static char acLogTags[LOG_MAX][40] = {
- "LOG_GENERAL",
- "LOG_TIMER",
- "LOG_ACCEL",
- "LOG_TEMPERATURE",
- "LOG_PRESSURE",
- "LOG_PEDOMETER",
- "LOG_TCMD",
- "LOG_GYRO",
- "LOG_COMPASS",
- "LOG_FUSION",
- "LOG_METS",
- "LOG_GESTURE",
- "LOG_POWER",
- "LOG_CORRELATION",
- "LOG_GPS",
- "LOG_DL",
- "LOG_AUDIO",
- "LOG_DISP",
- "LOG_WRIST",
- "LOG_PASSIVE",
- "LOG_EMG"
- "LOG_HR",
- "LOG_ALS"
-};
-
-static char acLogLevels[LOG_LEVELS_MAX][15] = {
- "LOG_DISABLE",
- "LOG_ERROR",
- "LOG_VERBOSE",
- "LOG_DEBUG"
-};
-#endif /* __MEMMAP_LOG_H__ */
+/********************************************************************** +* +* Copyright (C) 2012 Motorola, Inc. +* +********************************************************************** +File : MemMapLog.h +Purpose : +**********************************************************************/ +#ifndef __MEMMAP_LOG_H__ +#define __MEMMAP_LOG_H__ +/****************************** Defines *******************************/ +#define LOG_EN_SIZE 2 +/* Number of log tags per element of logenable array */ +#define LOG_TAGS_PER_ENABLE 16 +#define LOG_MAX 23 +#define LOG_NO_OF_BITS_PER_TAG 2 +/*This is set to 0x03 since each logtag uses 2 bits in logenable */ +#define LOG_TAG_MASK 0x03 +#define LOG_LEVELS_MAX 4 + +struct memMapLog { + u32 logEnable[LOG_EN_SIZE]; + u8 isLogImmediate; +}; + +static char acLogTags[LOG_MAX][40] = { + "LOG_GENERAL", + "LOG_TIMER", + "LOG_ACCEL", + "LOG_TEMPERATURE", + "LOG_PRESSURE", + "LOG_PEDOMETER", + "LOG_TCMD", + "LOG_GYRO", + "LOG_COMPASS", + "LOG_FUSION", + "LOG_METS", + "LOG_GESTURE", + "LOG_POWER", + "LOG_CORRELATION", + "LOG_GPS", + "LOG_DL", + "LOG_AUDIO", + "LOG_DISP", + "LOG_WRIST", + "LOG_PASSIVE", + "LOG_EMG", + "LOG_HR", + "LOG_ALS", +}; + +static char acLogLevels[LOG_LEVELS_MAX][15] = { + "LOG_DISABLE", + "LOG_ERROR", + "LOG_VERBOSE", + "LOG_DEBUG" +}; +#endif /* __MEMMAP_LOG_H__ */ diff --git a/include/linux/m4sensorhub/m4sensorhub_reg_enum.h b/include/linux/m4sensorhub/m4sensorhub_reg_enum.h index 040df03a2ed..1399e104cc5 100644 --- a/include/linux/m4sensorhub/m4sensorhub_reg_enum.h +++ b/include/linux/m4sensorhub/m4sensorhub_reg_enum.h @@ -81,9 +81,9 @@ enum m4sensorhub_reg { M4SH_REG_FUSION_LOCALX, M4SH_REG_FUSION_LOCALY, M4SH_REG_FUSION_LOCALZ, - M4SH_REG_FUSION_WORLDX, - M4SH_REG_FUSION_WORLDY, - M4SH_REG_FUSION_WORLDZ, + M4SH_REG_FUSION_GRAVITYX, + M4SH_REG_FUSION_GRAVITYY, + M4SH_REG_FUSION_GRAVITYZ, M4SH_REG_FUSION_ROTATIONVECTOR, M4SH_REG_FUSION_HEADING, M4SH_REG_FUSION_HEADING_ACCURACY, @@ -106,6 +106,8 @@ enum m4sensorhub_reg { M4SH_REG_METS_METS, M4SH_REG_METS_CALORIES, M4SH_REG_METS_HEALTHYMINUTES, + M4SH_REG_METS_METS_NO_RMR, + M4SH_REG_METS_CALORIES_NO_RMR, M4SH_REG_USERSETTINGS_SCREENSTATUS, M4SH_REG_USERSETTINGS_USERAGE, M4SH_REG_USERSETTINGS_USERGENDER, diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h index 77542380c52..d3214b54fd2 100644 --- a/include/linux/power/max17042_battery.h +++ b/include/linux/power/max17042_battery.h @@ -120,6 +120,7 @@ enum max17042_register { enum max17047_register { MAX17047_QRTbl00 = 0x12, MAX17047_FullSOCThr = 0x13, + MAX17047_Config_Ver = 0x20, /* Reserved register */ MAX17047_QRTbl10 = 0x22, MAX17047_QRTbl20 = 0x32, MAX17047_V_empty = 0x3A, @@ -139,6 +140,8 @@ struct max17042_reg_data { }; struct max17042_config_data { + /* Increment version for new config data to be programed */ + u16 version; /* External current sense resistor value in milli-ohms */ u32 cur_sense_val; diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 21f702704f2..96a8afe33c5 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -183,6 +183,8 @@ static inline bool ipv6_is_mld(struct sk_buff *skb, int nexthdr, int offset) extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao); +u32 addrconf_rt_table(const struct net_device *dev, u32 default_table); + /* * anycast prototypes (anycast.c) */ diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index e361f488242..4ac12e14c6d 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -23,6 +23,8 @@ struct fib_rule { struct fib_rule __rcu *ctarget; char iifname[IFNAMSIZ]; char oifname[IFNAMSIZ]; + kuid_t uid_start; + kuid_t uid_end; struct rcu_head rcu; struct net * fr_net; }; @@ -80,7 +82,9 @@ struct fib_rules_ops { [FRA_FWMARK] = { .type = NLA_U32 }, \ [FRA_FWMASK] = { .type = NLA_U32 }, \ [FRA_TABLE] = { .type = NLA_U32 }, \ - [FRA_GOTO] = { .type = NLA_U32 } + [FRA_GOTO] = { .type = NLA_U32 }, \ + [FRA_UID_START] = { .type = NLA_U32 }, \ + [FRA_UID_END] = { .type = NLA_U32 } static inline void fib_rule_get(struct fib_rule *rule) { diff --git a/include/net/flow.h b/include/net/flow.h index 628e11b98c5..c91e2aae3fb 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -10,6 +10,7 @@ #include <linux/socket.h> #include <linux/in6.h> #include <linux/atomic.h> +#include <linux/uidgid.h> struct flowi_common { int flowic_oif; @@ -23,6 +24,7 @@ struct flowi_common { #define FLOWI_FLAG_CAN_SLEEP 0x02 #define FLOWI_FLAG_KNOWN_NH 0x04 __u32 flowic_secid; + kuid_t flowic_uid; }; union flowi_uli { @@ -59,6 +61,7 @@ struct flowi4 { #define flowi4_proto __fl_common.flowic_proto #define flowi4_flags __fl_common.flowic_flags #define flowi4_secid __fl_common.flowic_secid +#define flowi4_uid __fl_common.flowic_uid /* (saddr,daddr) must be grouped, same order as in IP header */ __be32 saddr; @@ -78,7 +81,8 @@ static inline void flowi4_init_output(struct flowi4 *fl4, int oif, __u32 mark, __u8 tos, __u8 scope, __u8 proto, __u8 flags, __be32 daddr, __be32 saddr, - __be16 dport, __be16 sport) + __be16 dport, __be16 sport, + kuid_t uid) { fl4->flowi4_oif = oif; fl4->flowi4_iif = 0; @@ -88,6 +92,7 @@ static inline void flowi4_init_output(struct flowi4 *fl4, int oif, fl4->flowi4_proto = proto; fl4->flowi4_flags = flags; fl4->flowi4_secid = 0; + fl4->flowi4_uid = uid; fl4->daddr = daddr; fl4->saddr = saddr; fl4->fl4_dport = dport; @@ -115,6 +120,7 @@ struct flowi6 { #define flowi6_proto __fl_common.flowic_proto #define flowi6_flags __fl_common.flowic_flags #define flowi6_secid __fl_common.flowic_secid +#define flowi6_uid __fl_common.flowic_uid struct in6_addr daddr; struct in6_addr saddr; __be32 flowlabel; @@ -158,6 +164,7 @@ struct flowi { #define flowi_proto u.__fl_common.flowic_proto #define flowi_flags u.__fl_common.flowic_flags #define flowi_secid u.__fl_common.flowic_secid +#define flowi_uid u.__fl_common.flowic_uid } __attribute__((__aligned__(BITS_PER_LONG/8))); static inline struct flowi *flowi4_to_flowi(struct flowi4 *fl4) diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 7235ae73a1e..9528e10fa0b 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -88,6 +88,7 @@ struct inet_request_sock { acked : 1, no_srccheck: 1; kmemcheck_bitfield_end(flags); + u32 ir_mark; struct ip_options_rcu *opt; }; @@ -96,6 +97,14 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) return (struct inet_request_sock *)sk; } +static inline u32 inet_request_mark(struct sock *sk, struct sk_buff *skb) +{ + if (!sk->sk_mark && sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept) + return skb->mark; + + return sk->sk_mark; +} + struct inet_cork { unsigned int flags; __be32 addr; diff --git a/include/net/ip.h b/include/net/ip.h index a68f838a132..02fc145ecc4 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -153,6 +153,7 @@ struct ip_reply_arg { /* -1 if not needed */ int bound_dev_if; u8 tos; + kuid_t uid; }; #define IP_REPLY_ARG_NOSRCCHECK 1 @@ -225,6 +226,9 @@ extern void ipfrag_init(void); extern void ip_static_sysctl_init(void); +#define IP4_REPLY_MARK(net, mark) \ + ((net)->ipv4.sysctl_fwmark_reflect ? (mark) : 0) + static inline bool ip_is_fragment(const struct iphdr *iph) { return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0; diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 260f83f16bc..25b4500f28c 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -131,7 +131,7 @@ extern int rt6_route_rcv(struct net_device *dev, const struct in6_addr *gwaddr); extern void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, - int oif, u32 mark); + int oif, u32 mark, kuid_t uid); extern void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu); extern void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark); diff --git a/include/net/ipv6.h b/include/net/ipv6.h index ab47582f6c0..cc344ca9d0a 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -111,6 +111,9 @@ struct frag_hdr { #define IP6_MF 0x0001 +#define IP6_REPLY_MARK(net, mark) \ + ((net)->ipv6.sysctl.fwmark_reflect ? (mark) : 0) + #include <net/sock.h> /* sysctls */ diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 2ba9de89e8e..0dd6f0b3ead 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -64,6 +64,9 @@ struct netns_ipv4 { int sysctl_tcp_ecn; + int sysctl_fwmark_reflect; + int sysctl_tcp_fwmark_accept; + kgid_t sysctl_ping_group_range[2]; long sysctl_tcp_mem[3]; diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index 005e2c2e39a..4b9f99e3a91 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h @@ -28,6 +28,7 @@ struct netns_sysctl_ipv6 { int ip6_rt_mtu_expires; int ip6_rt_min_advmss; int icmpv6_time; + int fwmark_reflect; }; struct netns_ipv6 { diff --git a/include/net/route.h b/include/net/route.h index 2ea40c1b5e0..647bb2adbff 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -142,7 +142,7 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos, RT_SCOPE_UNIVERSE, proto, sk ? inet_sk_flowi_flags(sk) : 0, - daddr, saddr, dport, sport); + daddr, saddr, dport, sport, sk ? sock_i_uid(sk) : 0); if (sk) security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); return ip_route_output_flow(net, fl4, sk); @@ -253,7 +253,8 @@ static inline void ip_route_connect_init(struct flowi4 *fl4, __be32 dst, __be32 flow_flags |= FLOWI_FLAG_CAN_SLEEP; flowi4_init_output(fl4, oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE, - protocol, flow_flags, dst, src, dport, sport); + protocol, flow_flags, dst, src, dport, sport, + sock_i_uid(sk)); } static inline struct rtable *ip_route_connect(struct flowi4 *fl4, diff --git a/include/uapi/linux/fib_rules.h b/include/uapi/linux/fib_rules.h index 51da65b68b8..9dcdb6251cb 100644 --- a/include/uapi/linux/fib_rules.h +++ b/include/uapi/linux/fib_rules.h @@ -49,6 +49,8 @@ enum { FRA_TABLE, /* Extended table id */ FRA_FWMASK, /* mask for netfilter mark */ FRA_OIFNAME, + FRA_UID_START, /* UID range */ + FRA_UID_END, __FRA_MAX }; diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h index 4bda4cf5b0f..4214fac1bf4 100644 --- a/include/uapi/linux/ipv6.h +++ b/include/uapi/linux/ipv6.h @@ -160,6 +160,7 @@ enum { DEVCONF_ACCEPT_DAD, DEVCONF_FORCE_TLLAO, DEVCONF_NDISC_NOTIFY, + DEVCONF_ACCEPT_RA_RT_TABLE, DEVCONF_MAX }; diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 7a2144e1afa..07c1146c1f5 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h @@ -297,6 +297,7 @@ enum rtattr_type_t { RTA_TABLE, RTA_MARK, RTA_MFC_STATS, + RTA_UID, __RTA_MAX }; |