+ if (!wrqu->txpower.disabled) {
+ int value;
+
+ if (wl_get_val(dev, "qtxpower", &value, sizeof(int)) < 0)
+ return -EINVAL;
+
+ value &= WL_TXPWR_OVERRIDE;
+ wrqu->txpower.value *= 4;
+ wrqu->txpower.value |= value;
+
+ if (wrqu->txpower.flags != IW_TXPOW_DBM)
+ return -EINVAL;
+
+ if (wrqu->txpower.value > 0)
+ if (wl_set_val(dev, "qtxpower", &(wrqu->txpower.value), sizeof(int)) < 0)
+ return -EINVAL;
+ }
+ break;
+ }
+ case SIOCSIWENCODE:
+ {
+ int val = 0, wep = 1, wrestrict = 1;
+ int index = (wrqu->data.flags & IW_ENCODE_INDEX) - 1;
+
+ if (index < 0)
+ index = get_primary_key(dev);