iw: Add antenna configuration commands
PATCH v7 1/1 iw: Add antenna configuration commands
Add command to set the antenna configuration (iw phyX set antenna ...) and include antenna setting in wiphy information (iw phyX info).
Signed-off-by Bruno Randolf <[email protected]>
--- info.c | 7 +++++++ phy.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 0 deletions(-)
info.c +7 -0
@@ -167,6 +167,13 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)printf ("\tCoverage class: %d (up to %dm)\n" , coverage,450 * coverage); } +if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_TX ] && + tb_msg[NL80211_ATTR_WIPHY_ANTENNA_RX ]) { +printf ("\tAntenna: TX %#x RX %#x\n" , +nla_get_u32 (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_TX ]), +nla_get_u32 (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_RX ])); + } +if (!tb_msg[NL80211_ATTR_SUPPORTED_IFTYPES ]) goto commands;
phy.c +46 -0
49 lines not on this page · raw message
Quoted 1 line · Bruno Randolf
+COMMAND(set, antenna, "<bitmap> | all | tx <bitmap> rx <bitmap>",
I think the parser is too complicated, how about
"all | <bitmap> | <tx bitmap> <rx bitmap>
johannes
Quoted 6 lines · On Thu November 11 2010 00:56:39 Johannes Berg wrote:
Quoted 1 line · Bruno Randolf
+COMMAND(set, antenna, "<bitmap> | all | tx <bitmap> rx <bitmap>",
I think the parser is too complicated, how about
"all | <bitmap> | <tx bitmap> <rx bitmap>
Sure. I'll work on that once / if the nl80211 part gets accepted.
bruno