diff options
Diffstat (limited to 'drivers/net/wireless')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/main.c | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965-tx.c | 28 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.c | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-dev.h | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-led.c | 20 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlegacy/iwl4965-base.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 27 | ||||
| -rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 6 | 
11 files changed, 88 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 17d04ff8d67..1482fa65083 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -2141,6 +2141,8 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class)  static void ath9k_flush(struct ieee80211_hw *hw, bool drop)  {  	struct ath_softc *sc = hw->priv; +	struct ath_hw *ah = sc->sc_ah; +	struct ath_common *common = ath9k_hw_common(ah);  	int timeout = 200; /* ms */  	int i, j; @@ -2149,6 +2151,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)  	cancel_delayed_work_sync(&sc->tx_complete_work); +	if (sc->sc_flags & SC_OP_INVALID) { +		ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); +		mutex_unlock(&sc->mutex); +		return; +	} +  	if (drop)  		timeout = 1; diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index dcd19bc337d..b29c80def35 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -506,7 +506,7 @@ bool ath_stoprecv(struct ath_softc *sc)  			"confusing the DMA engine when we start RX up\n");  		ATH_DBG_WARN_ON_ONCE(!stopped);  	} -	return stopped || reset; +	return stopped && !reset;  }  void ath_flushrecv(struct ath_softc *sc) diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index d59b0168c14..5af40d9170a 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -72,6 +72,7 @@ MODULE_FIRMWARE("b43/ucode11.fw");  MODULE_FIRMWARE("b43/ucode13.fw");  MODULE_FIRMWARE("b43/ucode14.fw");  MODULE_FIRMWARE("b43/ucode15.fw"); +MODULE_FIRMWARE("b43/ucode16_mimo.fw");  MODULE_FIRMWARE("b43/ucode5.fw");  MODULE_FIRMWARE("b43/ucode9.fw"); diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c index 5c40502f869..79ac081832f 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c @@ -316,12 +316,18 @@ int iwl4965_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)  	hdr_len = ieee80211_hdrlen(fc); -	/* Find index into station table for destination station */ -	sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta); -	if (sta_id == IWL_INVALID_STATION) { -		IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", -			       hdr->addr1); -		goto drop_unlock; +	/* For management frames use broadcast id to do not break aggregation */ +	if (!ieee80211_is_data(fc)) +		sta_id = ctx->bcast_sta_id; +	else { +		/* Find index into station table for destination station */ +		sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta); + +		if (sta_id == IWL_INVALID_STATION) { +			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", +				       hdr->addr1); +			goto drop_unlock; +		}  	}  	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); @@ -1127,12 +1133,16 @@ int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)  	     q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd)) {  		tx_info = &txq->txb[txq->q.read_ptr]; -		iwl4965_tx_status(priv, tx_info, -				 txq_id >= IWL4965_FIRST_AMPDU_QUEUE); + +		if (WARN_ON_ONCE(tx_info->skb == NULL)) +			continue;  		hdr = (struct ieee80211_hdr *)tx_info->skb->data; -		if (hdr && ieee80211_is_data_qos(hdr->frame_control)) +		if (ieee80211_is_data_qos(hdr->frame_control))  			nfreed++; + +		iwl4965_tx_status(priv, tx_info, +				 txq_id >= IWL4965_FIRST_AMPDU_QUEUE);  		tx_info->skb = NULL;  		priv->cfg->ops->lib->txq_free_tfd(priv, txq); diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index c1511b14b23..42db0fc8b92 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c @@ -2155,6 +2155,13 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed)  			goto set_ch_out;  		} +		if (priv->iw_mode == NL80211_IFTYPE_ADHOC && +		    !iwl_legacy_is_channel_ibss(ch_info)) { +			IWL_DEBUG_MAC80211(priv, "leave - not IBSS channel\n"); +			ret = -EINVAL; +			goto set_ch_out; +		} +  		spin_lock_irqsave(&priv->lock, flags);  		for_each_context(priv, ctx) { diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h index 9ee849d669f..f43ac1eb901 100644 --- a/drivers/net/wireless/iwlegacy/iwl-dev.h +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h @@ -1411,6 +1411,12 @@ iwl_legacy_is_channel_passive(const struct iwl_channel_info *ch)  	return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0;  } +static inline int +iwl_legacy_is_channel_ibss(const struct iwl_channel_info *ch) +{ +	return (ch->flags & EEPROM_CHANNEL_IBSS) ? 1 : 0; +} +  static inline void  __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page)  { diff --git a/drivers/net/wireless/iwlegacy/iwl-led.c b/drivers/net/wireless/iwlegacy/iwl-led.c index 15eb8b70715..bda0d61b2c0 100644 --- a/drivers/net/wireless/iwlegacy/iwl-led.c +++ b/drivers/net/wireless/iwlegacy/iwl-led.c @@ -48,8 +48,21 @@ module_param(led_mode, int, S_IRUGO);  MODULE_PARM_DESC(led_mode, "0=system default, "  		"1=On(RF On)/Off(RF Off), 2=blinking"); +/* Throughput		OFF time(ms)	ON time (ms) + *	>300			25		25 + *	>200 to 300		40		40 + *	>100 to 200		55		55 + *	>70 to 100		65		65 + *	>50 to 70		75		75 + *	>20 to 50		85		85 + *	>10 to 20		95		95 + *	>5 to 10		110		110 + *	>1 to 5			130		130 + *	>0 to 1			167		167 + *	<=0					SOLID ON + */  static const struct ieee80211_tpt_blink iwl_blink[] = { -	{ .throughput = 0 * 1024 - 1, .blink_time = 334 }, +	{ .throughput = 0, .blink_time = 334 },  	{ .throughput = 1 * 1024 - 1, .blink_time = 260 },  	{ .throughput = 5 * 1024 - 1, .blink_time = 220 },  	{ .throughput = 10 * 1024 - 1, .blink_time = 190 }, @@ -101,6 +114,11 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv,  	if (priv->blink_on == on && priv->blink_off == off)  		return 0; +	if (off == 0) { +		/* led is SOLID_ON */ +		on = IWL_LED_SOLID; +	} +  	IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n",  			priv->cfg->base_params->led_compensation);  	led_cmd.on = iwl_legacy_blink_compensation(priv, on, diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c index d484c367816..a62fe24ee59 100644 --- a/drivers/net/wireless/iwlegacy/iwl4965-base.c +++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c @@ -2984,15 +2984,15 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)  	struct iwl_priv *priv = container_of(work, struct iwl_priv,  			txpower_work); +	mutex_lock(&priv->mutex); +  	/* If a scan happened to start before we got here  	 * then just return; the statistics notification will  	 * kick off another scheduled work to compensate for  	 * any temperature delta we missed here. */  	if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||  	    test_bit(STATUS_SCANNING, &priv->status)) -		return; - -	mutex_lock(&priv->mutex); +		goto out;  	/* Regardless of if we are associated, we must reconfigure the  	 * TX power since frames can be sent on non-radar channels while @@ -3002,7 +3002,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)  	/* Update last_temperature to keep is_calib_needed from running  	 * when it isn't needed... */  	priv->last_temperature = priv->temperature; - +out:  	mutex_unlock(&priv->mutex);  } diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index dfdbea6e8f9..fbbde0712fa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c @@ -335,7 +335,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)  	struct ieee80211_channel *channel = conf->channel;  	const struct iwl_channel_info *ch_info;  	int ret = 0; -	bool ht_changed[NUM_IWL_RXON_CTX] = {};  	IWL_DEBUG_MAC80211(priv, "changed %#x", changed); @@ -383,10 +382,8 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)  		for_each_context(priv, ctx) {  			/* Configure HT40 channels */ -			if (ctx->ht.enabled != conf_is_ht(conf)) { +			if (ctx->ht.enabled != conf_is_ht(conf))  				ctx->ht.enabled = conf_is_ht(conf); -				ht_changed[ctx->ctxid] = true; -			}  			if (ctx->ht.enabled) {  				if (conf_is_ht40_minus(conf)) { @@ -455,8 +452,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)  		if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging)))  			continue;  		iwlagn_commit_rxon(priv, ctx); -		if (ht_changed[ctx->ctxid]) -			iwlagn_update_qos(priv, ctx);  	}   out:  	mutex_unlock(&priv->mutex); diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index a709d05c586..0712b67283a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c @@ -568,12 +568,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)  	hdr_len = ieee80211_hdrlen(fc); -	/* Find index into station table for destination station */ -	sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta); -	if (sta_id == IWL_INVALID_STATION) { -		IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", -			       hdr->addr1); -		goto drop_unlock; +	/* For management frames use broadcast id to do not break aggregation */ +	if (!ieee80211_is_data(fc)) +		sta_id = ctx->bcast_sta_id; +	else { +		/* Find index into station table for destination station */ +		sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta); +		if (sta_id == IWL_INVALID_STATION) { +			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", +				       hdr->addr1); +			goto drop_unlock; +		}  	}  	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); @@ -1224,12 +1229,16 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)  	     q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {  		tx_info = &txq->txb[txq->q.read_ptr]; -		iwlagn_tx_status(priv, tx_info, -				 txq_id >= IWLAGN_FIRST_AMPDU_QUEUE); + +		if (WARN_ON_ONCE(tx_info->skb == NULL)) +			continue;  		hdr = (struct ieee80211_hdr *)tx_info->skb->data; -		if (hdr && ieee80211_is_data_qos(hdr->frame_control)) +		if (ieee80211_is_data_qos(hdr->frame_control))  			nfreed++; + +		iwlagn_tx_status(priv, tx_info, +				 txq_id >= IWLAGN_FIRST_AMPDU_QUEUE);  		tx_info->skb = NULL;  		if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 7e8a658b767..f3ac62431a3 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -1339,8 +1339,8 @@ int lbs_execute_next_command(struct lbs_private *priv)  				    cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) {  					lbs_deb_host(  					       "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); -					list_del(&cmdnode->list);  					spin_lock_irqsave(&priv->driver_lock, flags); +					list_del(&cmdnode->list);  					lbs_complete_command(priv, cmdnode, 0);  					spin_unlock_irqrestore(&priv->driver_lock, flags); @@ -1352,8 +1352,8 @@ int lbs_execute_next_command(struct lbs_private *priv)  				    (priv->psstate == PS_STATE_PRE_SLEEP)) {  					lbs_deb_host(  					       "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); -					list_del(&cmdnode->list);  					spin_lock_irqsave(&priv->driver_lock, flags); +					list_del(&cmdnode->list);  					lbs_complete_command(priv, cmdnode, 0);  					spin_unlock_irqrestore(&priv->driver_lock, flags);  					priv->needtowakeup = 1; @@ -1366,7 +1366,9 @@ int lbs_execute_next_command(struct lbs_private *priv)  				       "EXEC_NEXT_CMD: sending EXIT_PS\n");  			}  		} +		spin_lock_irqsave(&priv->driver_lock, flags);  		list_del(&cmdnode->list); +		spin_unlock_irqrestore(&priv->driver_lock, flags);  		lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n",  			    le16_to_cpu(cmd->command));  		lbs_submit_command(priv, cmdnode);  |