mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 08:01:59 +00:00
Included changes:
- fix codestyle to respect new checkpatch warnings - increase internal version number -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJTeLMvAAoJEEKTMo6mOh1VKtgP/RuR34USuUbY/xMZ9/Rn2/E7 z1qn6hh8hlw+Hd+Vn+9BvDJzwn+Baneu1c3SMP08kE+pAst0n788y/f/pVzfToJk Gll0sOVHiSm05M0QQ0Vq57H+rxoFv2KACM1t2+NMW+pB+PsSYG5y87b6I+0hR4Pv lbBCNmgIxY2alxM8qab2Zlt+cCUdkKUnI67P0LtVnMh91JuKwsheOdR+Smxz2+2g J+2Bzcz+NIHhJP9c+QmJipV+gtIRjFr7+bebaXDm/eEBq/3f6cEhFtwa76CmCpI/ cAIMDFORCHB27qNMgKSuzFDdhF1qQJnZh8FX0dfRBXvH8NwxBOkjFh1CBJ3iwjm1 T7GBTLTKiv/JqdNjqrWJ9OxChl8I2jppevZdimq1VUjhv9117Jc73TnzazjULTST xr5PpZ1gRfruUVXl362otrtzm0N/hdqez+mYlkZEx/ERTDedLCZZAnjTsx5PPMG+ GXlbc1BWuQZuHpvs8uWMcnXDaWtNyNKKpvfRPuvLIST80F1Bw/KRd2FDH/AiO2tL 2eACn9ughC5XO9E+/iyfWm1MQMEwo/w9+EfWpnRWV9HtDuHepVGy59x3mCYH/bN0 7FP23lbaFw05i/UpsRRneqkzMJLk/16qLCiNoC8u2hEiqKzu0/celPwl7B16Fs4Z CU65LSN/QNU9q+AXVQOd =tdAQ -----END PGP SIGNATURE----- Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge Included changes: - fix codestyle to respect new checkpatch warnings - increase internal version number
This commit is contained in:
commit
b6052af61a
@ -245,6 +245,7 @@ static int batadv_algorithms_open(struct inode *inode, struct file *file)
|
|||||||
static int batadv_originators_open(struct inode *inode, struct file *file)
|
static int batadv_originators_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_orig_seq_print_text, net_dev);
|
return single_open(file, batadv_orig_seq_print_text, net_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,18 +259,21 @@ static int batadv_originators_hardif_open(struct inode *inode,
|
|||||||
struct file *file)
|
struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_orig_hardif_seq_print_text, net_dev);
|
return single_open(file, batadv_orig_hardif_seq_print_text, net_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int batadv_gateways_open(struct inode *inode, struct file *file)
|
static int batadv_gateways_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_gw_client_seq_print_text, net_dev);
|
return single_open(file, batadv_gw_client_seq_print_text, net_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int batadv_transtable_global_open(struct inode *inode, struct file *file)
|
static int batadv_transtable_global_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_tt_global_seq_print_text, net_dev);
|
return single_open(file, batadv_tt_global_seq_print_text, net_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,6 +281,7 @@ static int batadv_transtable_global_open(struct inode *inode, struct file *file)
|
|||||||
static int batadv_bla_claim_table_open(struct inode *inode, struct file *file)
|
static int batadv_bla_claim_table_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_bla_claim_table_seq_print_text,
|
return single_open(file, batadv_bla_claim_table_seq_print_text,
|
||||||
net_dev);
|
net_dev);
|
||||||
}
|
}
|
||||||
@ -285,6 +290,7 @@ static int batadv_bla_backbone_table_open(struct inode *inode,
|
|||||||
struct file *file)
|
struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_bla_backbone_table_seq_print_text,
|
return single_open(file, batadv_bla_backbone_table_seq_print_text,
|
||||||
net_dev);
|
net_dev);
|
||||||
}
|
}
|
||||||
@ -300,6 +306,7 @@ static int batadv_bla_backbone_table_open(struct inode *inode,
|
|||||||
static int batadv_dat_cache_open(struct inode *inode, struct file *file)
|
static int batadv_dat_cache_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_dat_cache_seq_print_text, net_dev);
|
return single_open(file, batadv_dat_cache_seq_print_text, net_dev);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -307,6 +314,7 @@ static int batadv_dat_cache_open(struct inode *inode, struct file *file)
|
|||||||
static int batadv_transtable_local_open(struct inode *inode, struct file *file)
|
static int batadv_transtable_local_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_tt_local_seq_print_text, net_dev);
|
return single_open(file, batadv_tt_local_seq_print_text, net_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,6 +327,7 @@ struct batadv_debuginfo {
|
|||||||
static int batadv_nc_nodes_open(struct inode *inode, struct file *file)
|
static int batadv_nc_nodes_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||||
|
|
||||||
return single_open(file, batadv_nc_nodes_seq_print_text, net_dev);
|
return single_open(file, batadv_nc_nodes_seq_print_text, net_dev);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -333,7 +342,7 @@ struct batadv_debuginfo batadv_debuginfo_##_name = { \
|
|||||||
.llseek = seq_lseek, \
|
.llseek = seq_lseek, \
|
||||||
.release = single_release, \
|
.release = single_release, \
|
||||||
} \
|
} \
|
||||||
};
|
}
|
||||||
|
|
||||||
/* the following attributes are general and therefore they will be directly
|
/* the following attributes are general and therefore they will be directly
|
||||||
* placed in the BATADV_DEBUGFS_SUBDIR subdirectory of debugfs
|
* placed in the BATADV_DEBUGFS_SUBDIR subdirectory of debugfs
|
||||||
@ -395,7 +404,7 @@ struct batadv_debuginfo batadv_hardif_debuginfo_##_name = { \
|
|||||||
.llseek = seq_lseek, \
|
.llseek = seq_lseek, \
|
||||||
.release = single_release, \
|
.release = single_release, \
|
||||||
}, \
|
}, \
|
||||||
};
|
}
|
||||||
static BATADV_HARDIF_DEBUGINFO(originators, S_IRUGO,
|
static BATADV_HARDIF_DEBUGINFO(originators, S_IRUGO,
|
||||||
batadv_originators_hardif_open);
|
batadv_originators_hardif_open);
|
||||||
|
|
||||||
|
@ -662,6 +662,7 @@ static void batadv_dat_tvlv_container_update(struct batadv_priv *bat_priv)
|
|||||||
void batadv_dat_status_update(struct net_device *net_dev)
|
void batadv_dat_status_update(struct net_device *net_dev)
|
||||||
{
|
{
|
||||||
struct batadv_priv *bat_priv = netdev_priv(net_dev);
|
struct batadv_priv *bat_priv = netdev_priv(net_dev);
|
||||||
|
|
||||||
batadv_dat_tvlv_container_update(bat_priv);
|
batadv_dat_tvlv_container_update(bat_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#define BATADV_DRIVER_DEVICE "batman-adv"
|
#define BATADV_DRIVER_DEVICE "batman-adv"
|
||||||
|
|
||||||
#ifndef BATADV_SOURCE_VERSION
|
#ifndef BATADV_SOURCE_VERSION
|
||||||
#define BATADV_SOURCE_VERSION "2014.2.0"
|
#define BATADV_SOURCE_VERSION "2014.3.0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* B.A.T.M.A.N. parameters */
|
/* B.A.T.M.A.N. parameters */
|
||||||
|
@ -86,6 +86,7 @@ static void batadv_nc_tvlv_container_update(struct batadv_priv *bat_priv)
|
|||||||
void batadv_nc_status_update(struct net_device *net_dev)
|
void batadv_nc_status_update(struct net_device *net_dev)
|
||||||
{
|
{
|
||||||
struct batadv_priv *bat_priv = netdev_priv(net_dev);
|
struct batadv_priv *bat_priv = netdev_priv(net_dev);
|
||||||
|
|
||||||
batadv_nc_tvlv_container_update(bat_priv);
|
batadv_nc_tvlv_container_update(bat_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,12 +29,14 @@
|
|||||||
static struct net_device *batadv_kobj_to_netdev(struct kobject *obj)
|
static struct net_device *batadv_kobj_to_netdev(struct kobject *obj)
|
||||||
{
|
{
|
||||||
struct device *dev = container_of(obj->parent, struct device, kobj);
|
struct device *dev = container_of(obj->parent, struct device, kobj);
|
||||||
|
|
||||||
return to_net_dev(dev);
|
return to_net_dev(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct batadv_priv *batadv_kobj_to_batpriv(struct kobject *obj)
|
static struct batadv_priv *batadv_kobj_to_batpriv(struct kobject *obj)
|
||||||
{
|
{
|
||||||
struct net_device *net_dev = batadv_kobj_to_netdev(obj);
|
struct net_device *net_dev = batadv_kobj_to_netdev(obj);
|
||||||
|
|
||||||
return netdev_priv(net_dev);
|
return netdev_priv(net_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +108,7 @@ struct batadv_attribute batadv_attr_vlan_##_name = { \
|
|||||||
.mode = _mode }, \
|
.mode = _mode }, \
|
||||||
.show = _show, \
|
.show = _show, \
|
||||||
.store = _store, \
|
.store = _store, \
|
||||||
};
|
}
|
||||||
|
|
||||||
/* Use this, if you have customized show and store functions */
|
/* Use this, if you have customized show and store functions */
|
||||||
#define BATADV_ATTR(_name, _mode, _show, _store) \
|
#define BATADV_ATTR(_name, _mode, _show, _store) \
|
||||||
@ -115,7 +117,7 @@ struct batadv_attribute batadv_attr_##_name = { \
|
|||||||
.mode = _mode }, \
|
.mode = _mode }, \
|
||||||
.show = _show, \
|
.show = _show, \
|
||||||
.store = _store, \
|
.store = _store, \
|
||||||
};
|
}
|
||||||
|
|
||||||
#define BATADV_ATTR_SIF_STORE_BOOL(_name, _post_func) \
|
#define BATADV_ATTR_SIF_STORE_BOOL(_name, _post_func) \
|
||||||
ssize_t batadv_store_##_name(struct kobject *kobj, \
|
ssize_t batadv_store_##_name(struct kobject *kobj, \
|
||||||
@ -124,6 +126,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \
|
|||||||
{ \
|
{ \
|
||||||
struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
||||||
struct batadv_priv *bat_priv = netdev_priv(net_dev); \
|
struct batadv_priv *bat_priv = netdev_priv(net_dev); \
|
||||||
|
\
|
||||||
return __batadv_store_bool_attr(buff, count, _post_func, attr, \
|
return __batadv_store_bool_attr(buff, count, _post_func, attr, \
|
||||||
&bat_priv->_name, net_dev); \
|
&bat_priv->_name, net_dev); \
|
||||||
}
|
}
|
||||||
@ -133,6 +136,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \
|
|||||||
struct attribute *attr, char *buff) \
|
struct attribute *attr, char *buff) \
|
||||||
{ \
|
{ \
|
||||||
struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
|
struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
|
||||||
|
\
|
||||||
return sprintf(buff, "%s\n", \
|
return sprintf(buff, "%s\n", \
|
||||||
atomic_read(&bat_priv->_name) == 0 ? \
|
atomic_read(&bat_priv->_name) == 0 ? \
|
||||||
"disabled" : "enabled"); \
|
"disabled" : "enabled"); \
|
||||||
@ -155,6 +159,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \
|
|||||||
{ \
|
{ \
|
||||||
struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
||||||
struct batadv_priv *bat_priv = netdev_priv(net_dev); \
|
struct batadv_priv *bat_priv = netdev_priv(net_dev); \
|
||||||
|
\
|
||||||
return __batadv_store_uint_attr(buff, count, _min, _max, \
|
return __batadv_store_uint_attr(buff, count, _min, _max, \
|
||||||
_post_func, attr, \
|
_post_func, attr, \
|
||||||
&bat_priv->_name, net_dev); \
|
&bat_priv->_name, net_dev); \
|
||||||
@ -165,6 +170,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \
|
|||||||
struct attribute *attr, char *buff) \
|
struct attribute *attr, char *buff) \
|
||||||
{ \
|
{ \
|
||||||
struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
|
struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
|
||||||
|
\
|
||||||
return sprintf(buff, "%i\n", atomic_read(&bat_priv->_name)); \
|
return sprintf(buff, "%i\n", atomic_read(&bat_priv->_name)); \
|
||||||
} \
|
} \
|
||||||
|
|
||||||
@ -188,6 +194,7 @@ ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \
|
|||||||
size_t res = __batadv_store_bool_attr(buff, count, _post_func, \
|
size_t res = __batadv_store_bool_attr(buff, count, _post_func, \
|
||||||
attr, &vlan->_name, \
|
attr, &vlan->_name, \
|
||||||
bat_priv->soft_iface); \
|
bat_priv->soft_iface); \
|
||||||
|
\
|
||||||
batadv_softif_vlan_free_ref(vlan); \
|
batadv_softif_vlan_free_ref(vlan); \
|
||||||
return res; \
|
return res; \
|
||||||
}
|
}
|
||||||
@ -202,6 +209,7 @@ ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \
|
|||||||
size_t res = sprintf(buff, "%s\n", \
|
size_t res = sprintf(buff, "%s\n", \
|
||||||
atomic_read(&vlan->_name) == 0 ? \
|
atomic_read(&vlan->_name) == 0 ? \
|
||||||
"disabled" : "enabled"); \
|
"disabled" : "enabled"); \
|
||||||
|
\
|
||||||
batadv_softif_vlan_free_ref(vlan); \
|
batadv_softif_vlan_free_ref(vlan); \
|
||||||
return res; \
|
return res; \
|
||||||
}
|
}
|
||||||
@ -324,12 +332,14 @@ static ssize_t batadv_show_bat_algo(struct kobject *kobj,
|
|||||||
struct attribute *attr, char *buff)
|
struct attribute *attr, char *buff)
|
||||||
{
|
{
|
||||||
struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
|
struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
|
||||||
|
|
||||||
return sprintf(buff, "%s\n", bat_priv->bat_algo_ops->name);
|
return sprintf(buff, "%s\n", bat_priv->bat_algo_ops->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void batadv_post_gw_reselect(struct net_device *net_dev)
|
static void batadv_post_gw_reselect(struct net_device *net_dev)
|
||||||
{
|
{
|
||||||
struct batadv_priv *bat_priv = netdev_priv(net_dev);
|
struct batadv_priv *bat_priv = netdev_priv(net_dev);
|
||||||
|
|
||||||
batadv_gw_reselect(bat_priv);
|
batadv_gw_reselect(bat_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user