Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86c2fe1e authored by David S. Miller's avatar David S. Miller
Browse files
parents 1ddbcb00 a6c67339
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
@@ -6467,6 +6467,7 @@ static int airo_get_encode(struct net_device *dev,
{
	struct airo_info *local = dev->ml_priv;
	int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
	int wep_key_len;
	u8 buf[16];

	if (!local->wep_capable)
@@ -6500,11 +6501,13 @@ static int airo_get_encode(struct net_device *dev,
	dwrq->flags |= index + 1;

	/* Copy the key to the user buffer */
	dwrq->length = get_wep_key(local, index, &buf[0], sizeof(buf));
	if (dwrq->length != -1)
		memcpy(extra, buf, dwrq->length);
	else
	wep_key_len = get_wep_key(local, index, &buf[0], sizeof(buf));
	if (wep_key_len < 0) {
		dwrq->length = 0;
	} else {
		dwrq->length = wep_key_len;
		memcpy(extra, buf, dwrq->length);
	}

	return 0;
}
@@ -6617,7 +6620,7 @@ static int airo_get_encodeext(struct net_device *dev,
	struct airo_info *local = dev->ml_priv;
	struct iw_point *encoding = &wrqu->encoding;
	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
	int idx, max_key_len;
	int idx, max_key_len, wep_key_len;
	u8 buf[16];

	if (!local->wep_capable)
@@ -6661,11 +6664,13 @@ static int airo_get_encodeext(struct net_device *dev,
	memset(extra, 0, 16);
	
	/* Copy the key to the user buffer */
	ext->key_len = get_wep_key(local, idx, &buf[0], sizeof(buf));
	if (ext->key_len != -1)
		memcpy(extra, buf, ext->key_len);
	else
	wep_key_len = get_wep_key(local, idx, &buf[0], sizeof(buf));
	if (wep_key_len < 0) {
		ext->key_len = 0;
	} else {
		ext->key_len = wep_key_len;
		memcpy(extra, buf, ext->key_len);
	}

	return 0;
}
+28 −21
Original line number Diff line number Diff line
@@ -1487,28 +1487,35 @@ ath5k_get_linear_pcdac_min(const u8 *stepL, const u8 *stepR,
{
	s8 tmp;
	s16 min_pwrL, min_pwrR;
	s16 pwr_i = pwrL[0];
	s16 pwr_i;

	if (pwrL[0] == pwrL[1])
		min_pwrL = pwrL[0];
	else {
		pwr_i = pwrL[0];
		do {
			pwr_i--;
			tmp = (s8) ath5k_get_interpolated_value(pwr_i,
							pwrL[0], pwrL[1],
							stepL[0], stepL[1]);

		} while (tmp > 1);

		min_pwrL = pwr_i;
	}

	if (pwrR[0] == pwrR[1])
		min_pwrR = pwrR[0];
	else {
		pwr_i = pwrR[0];
		do {
			pwr_i--;
			tmp = (s8) ath5k_get_interpolated_value(pwr_i,
							pwrR[0], pwrR[1],
							stepR[0], stepR[1]);

		} while (tmp > 1);

		min_pwrR = pwr_i;
	}

	/* Keep the right boundary so that it works for both curves */
	return max(min_pwrL, min_pwrR);
+4 −4
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
\*****************************/

#include <linux/pci.h> 		/* To determine if a card is pci-e */
#include <linux/bitops.h>	/* For get_bitmask_order */
#include <linux/log2.h>
#include "ath5k.h"
#include "reg.h"
#include "base.h"
@@ -69,10 +69,10 @@ static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah,

	/* Get exponent
	 * ALGO: coef_exp = 14 - highest set bit position */
	coef_exp = get_bitmask_order(coef_scaled);
	coef_exp = ilog2(coef_scaled);

	/* Doesn't make sense if it's zero*/
	if (!coef_exp)
	if (!coef_scaled || !coef_exp)
		return -EINVAL;

	/* Note: we've shifted coef_scaled by 24 */
@@ -359,7 +359,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
			mode |= AR5K_PHY_MODE_FREQ_5GHZ;

			if (ah->ah_radio == AR5K_RF5413)
				clock |= AR5K_PHY_PLL_40MHZ_5413;
				clock = AR5K_PHY_PLL_40MHZ_5413;
			else
				clock |= AR5K_PHY_PLL_40MHZ;

+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
#include "iwl-6000-hw.h"

/* Highest firmware API version supported */
#define IWL5000_UCODE_API_MAX 1
#define IWL5000_UCODE_API_MAX 2
#define IWL5150_UCODE_API_MAX 2

/* Lowest firmware API version supported */
+0 −7
Original line number Diff line number Diff line
@@ -669,13 +669,6 @@ static int iwl_set_mode(struct iwl_priv *priv, int mode)
	if (!iwl_is_ready_rf(priv))
		return -EAGAIN;

	cancel_delayed_work(&priv->scan_check);
	if (iwl_scan_cancel_timeout(priv, 100)) {
		IWL_WARN(priv, "Aborted scan still in progress after 100ms\n");
		IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n");
		return -EAGAIN;
	}

	iwl_commit_rxon(priv);

	return 0;
Loading