Hi Artem, On Wed, 2010-06-23 at 11:26 +0200, ext Artem Mygaiev wrote: > Hello Juuso > > A very minor comment - why do you need 'idx' here? Can't you just directly > access array by NL80211_* index without adding an index variable? The idx is there for pure beautification - there's no way to decently fit onto one line without it ;) -Juuso > > > + if (info->attrs[NL80211_ATTR_WIPHY_TX_POWER_SETTING]) { > > + enum nl80211_tx_power_setting type; > > + int idx, mbm = 0; > > + > > + if (!rdev->ops->set_tx_power) { > > + return -EOPNOTSUPP; > > + goto bad_res; > > + } > > + > > + idx = NL80211_ATTR_WIPHY_TX_POWER_SETTING; > > + type = nla_get_u32(info->attrs[idx]); > > + > > + if (!info->attrs[NL80211_ATTR_WIPHY_TX_POWER_LEVEL] && > > + (type != NL80211_TX_POWER_AUTOMATIC)) { > > + result = -EINVAL; > > + goto bad_res; > > + } > > + > > + if (type != NL80211_TX_POWER_AUTOMATIC) { > > + idx = NL80211_ATTR_WIPHY_TX_POWER_LEVEL; > > + mbm = nla_get_u32(info->attrs[idx]); > > + } > > + > > + result = rdev->ops->set_tx_power(&rdev->wiphy, type, mbm); > > + if (result) > > + goto bad_res; > > + } > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html