From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felix Fietkau Date: Wed, 02 Nov 2011 18:52:27 +0100 Subject: [ath9k-devel] RFC: expose antCtrlCommon aka. AR_PHY_SWITCH_COM via nl80211 In-Reply-To: <4EB18291.1000906@allnet.de> References: <4EB17A67.1030109@allnet.de> <4EB18291.1000906@allnet.de> Message-ID: <4EB1835B.2010704@openwrt.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On 2011-11-02 6:49 PM, Daniel Golle wrote: > Hi Adrian, > > On 11/02/2011 06:22 PM, Adrian Chadd wrote: >> There's an antenna switch field in the EEPROM, so I take it that you >> require multiple "valid" values? What/why would you choose between >> them? > according to the OEM it's allowed to set 0x09a00210 for horizontal or 0x0a900120 > for vertical. I assume that the TX-antenna is meant by that, i.e. 0x09a00210 > means horizontal-TX/vertical-RX. > From what i understand, misconfiguration could damage the RX-part of the card, > so the user should only be allowed to change the value to anything else than > what is stored in the eeprom if we know it's a valid setting. > > As far as I understand the EEPROM only stores a single value for the > antenna-switch setting, i.e. if there multiple valid values these must come from > somewhere else. > > I don't know the exact electronic details of the implementation, so I'd go with > a list of known-to-be-good values (passed to the driver via platform-data) > instead of a causal check (e.g. don't allow to set the TX and RX to the same > antenna or whatever you imagine to possibly be an invalid setting). I think passing such 'magic' values from user space to the driver is a bad idea. The abstraction should happen within the driver and exposed via the antenna control API. - Felix