mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
9b2777d608
Replace the current u8 transmit_power in wpan_phy with s8 transmit_power. The u8 field contained the actual tx power and a tolerance field, which no physical radio every used. Adjust sysfs entries to keep compatibility with userspace, give tolerances of +-1dB statically there. This patch only adds support for this in the at86rf230 driver and the RF212 chip. Configuration calculation for RF212 is also somewhat basic, but does the job - the RF212 datasheet gives a large table with suggested values for combinations of TX power and page/channel, if this does not work well, we might have to copy the whole table. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
72 lines
2.5 KiB
C
72 lines
2.5 KiB
C
/*
|
|
* Copyright (C) 2007, 2008, 2009 Siemens AG
|
|
*
|
|
* 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, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*
|
|
*/
|
|
#ifndef IEEE_802154_LOCAL_H
|
|
#define IEEE_802154_LOCAL_H
|
|
|
|
int __init ieee802154_nl_init(void);
|
|
void __exit ieee802154_nl_exit(void);
|
|
|
|
#define IEEE802154_OP(_cmd, _func) \
|
|
{ \
|
|
.cmd = _cmd, \
|
|
.policy = ieee802154_policy, \
|
|
.doit = _func, \
|
|
.dumpit = NULL, \
|
|
.flags = GENL_ADMIN_PERM, \
|
|
}
|
|
|
|
#define IEEE802154_DUMP(_cmd, _func, _dump) \
|
|
{ \
|
|
.cmd = _cmd, \
|
|
.policy = ieee802154_policy, \
|
|
.doit = _func, \
|
|
.dumpit = _dump, \
|
|
}
|
|
|
|
struct genl_info;
|
|
|
|
struct sk_buff *ieee802154_nl_create(int flags, u8 req);
|
|
int ieee802154_nl_mcast(struct sk_buff *msg, unsigned int group);
|
|
struct sk_buff *ieee802154_nl_new_reply(struct genl_info *info,
|
|
int flags, u8 req);
|
|
int ieee802154_nl_reply(struct sk_buff *msg, struct genl_info *info);
|
|
|
|
extern struct genl_family nl802154_family;
|
|
|
|
/* genetlink ops/groups */
|
|
int ieee802154_list_phy(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_dump_phy(struct sk_buff *skb, struct netlink_callback *cb);
|
|
int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_del_iface(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_set_phyparams(struct sk_buff *skb, struct genl_info *info);
|
|
|
|
enum ieee802154_mcgrp_ids {
|
|
IEEE802154_COORD_MCGRP,
|
|
IEEE802154_BEACON_MCGRP,
|
|
};
|
|
|
|
int ieee802154_associate_req(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_associate_resp(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_disassociate_req(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_scan_req(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_start_req(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_list_iface(struct sk_buff *skb, struct genl_info *info);
|
|
int ieee802154_dump_iface(struct sk_buff *skb, struct netlink_callback *cb);
|
|
|
|
#endif
|