Skip to contentSkip to conversation

iw: Add antenna configuration commands

PATCH Superseded Bruno Randolf 2 participants 3 messages Nov 10, 2010 – Nov 11, 2010

v7 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

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).

---
 info.c |    7 +++++++
 phy.c  |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 0 deletions(-)
info.c +7 -0
index 512e777..ec6ff63 100644
@@ -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

#1 lore raw
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

#2 lore raw
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