···868868 /* Do PA Calibration */869869 ar9002_hw_pa_cal(ah, true);870870871871- /* Do NF Calibration after DC offset and other calibrations */872872- ath9k_hw_loadnf(ah, chan);873873- ath9k_hw_start_nfcal(ah, true);874874-875871 if (ah->caldata)876872 ah->caldata->nfcal_pending = true;877873
+6-5
drivers/net/wireless/ath/ath9k/ar9003_calib.c
···908908 int i;909909 bool restore;910910911911- if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT) || !ah->caldata)911911+ if (!ah->caldata)912912 return false;913913914914 hist = &ah->caldata->rtt_hist;915915+ if (!hist->num_readings)916916+ return false;917917+915918 ar9003_hw_rtt_enable(ah);916916- ar9003_hw_rtt_set_mask(ah, 0x10);919919+ ar9003_hw_rtt_set_mask(ah, 0x00);917920 for (i = 0; i < AR9300_MAX_CHAINS; i++) {918921 if (!(ah->rxchainmask & (1 << i)))919922 continue;···10731070 if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) {10741071 u32 *table;1075107210731073+ hist->num_readings++;10761074 for (i = 0; i < AR9300_MAX_CHAINS; i++) {10771075 if (!(ah->rxchainmask & (1 << i)))10781076 continue;···1084108010851081 ar9003_hw_rtt_disable(ah);10861082 }10871087-10881088- ath9k_hw_loadnf(ah, chan);10891089- ath9k_hw_start_nfcal(ah, true);1090108310911084 /* Initialize list pointers */10921085 ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
···296296 super = (void *)skb->data;297297 txinfo->status.ampdu_len = super->s.rix;298298 txinfo->status.ampdu_ack_len = super->s.cnt;299299- } else if (txinfo->flags & IEEE80211_TX_STAT_ACK) {299299+ } else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) &&300300+ !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {300301 /*301302 * drop redundant tx_status reports:302303 *···309308 *310309 * 3. minstrel_ht is picky, it only accepts311310 * reports of frames with the TX_STATUS_AMPDU flag.311311+ *312312+ * 4. mac80211 is not particularly interested in313313+ * feedback either [CTL_REQ_TX_STATUS not set]312314 */313315314316 dev_kfree_skb_any(skb);315317 return;316318 } else {317319 /*318318- * Frame has failed, but we want to keep it in319319- * case it was lost due to a power-state320320- * transition.320320+ * Either the frame transmission has failed or321321+ * mac80211 requested tx status.321322 */322323 }323324 }
···18021802 continue;18031803 }1804180418051805+ if (test_bit(RFCOMM_ENC_DROP, &d->flags)) {18061806+ __rfcomm_dlc_close(d, ECONNREFUSED);18071807+ continue;18081808+ }18091809+18051810 if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) {18061811 rfcomm_dlc_clear_timer(d);18071812 if (d->out) {···20822077 if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) {20832078 rfcomm_dlc_clear_timer(d);20842079 if (status || encrypt == 0x00) {20852085- __rfcomm_dlc_close(d, ECONNREFUSED);20802080+ set_bit(RFCOMM_ENC_DROP, &d->flags);20862081 continue;20872082 }20882083 }···20932088 rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT);20942089 continue;20952090 } else if (d->sec_level == BT_SECURITY_HIGH) {20962096- __rfcomm_dlc_close(d, ECONNREFUSED);20912091+ set_bit(RFCOMM_ENC_DROP, &d->flags);20972092 continue;20982093 }20992094 }
+6-6
net/mac80211/cfg.c
···832832 if (is_multicast_ether_addr(mac))833833 return -EINVAL;834834835835+ /* Only TDLS-supporting stations can add TDLS peers */836836+ if ((params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&837837+ !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&838838+ sdata->vif.type == NL80211_IFTYPE_STATION))839839+ return -ENOTSUPP;840840+835841 sta = sta_info_alloc(sdata, mac, GFP_KERNEL);836842 if (!sta)837843 return -ENOMEM;···846840 set_sta_flag(sta, WLAN_STA_ASSOC);847841848842 sta_apply_parameters(local, sta, params);849849-850850- /* Only TDLS-supporting stations can add TDLS peers */851851- if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&852852- !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&853853- sdata->vif.type == NL80211_IFTYPE_STATION))854854- return -ENOTSUPP;855843856844 rate_control_rate_init(sta);857845
+1
net/mac80211/ieee80211_i.h
···389389390390 unsigned long timers_running; /* used for quiesce/restart */391391 bool powersave; /* powersave requested for this iface */392392+ bool broken_ap; /* AP is broken -- turn off powersave */392393 enum ieee80211_smps_mode req_smps, /* requested smps mode */393394 ap_smps, /* smps mode AP thinks we're in */394395 driver_smps_mode; /* smps mode request */
+16-2
net/mac80211/mlme.c
···637637 if (!mgd->powersave)638638 return false;639639640640+ if (mgd->broken_ap)641641+ return false;642642+640643 if (!mgd->associated)641644 return false;642645···14921489 capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info);1493149014941491 if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14)))14951495- printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not "14961496- "set\n", sdata->name, aid);14921492+ printk(KERN_DEBUG14931493+ "%s: invalid AID value 0x%x; bits 15:14 not set\n",14941494+ sdata->name, aid);14971495 aid &= ~(BIT(15) | BIT(14));14961496+14971497+ ifmgd->broken_ap = false;14981498+14991499+ if (aid == 0 || aid > IEEE80211_MAX_AID) {15001500+ printk(KERN_DEBUG15011501+ "%s: invalid AID value %d (out of range), turn off PS\n",15021502+ sdata->name, aid);15031503+ aid = 0;15041504+ ifmgd->broken_ap = true;15051505+ }1498150614991507 pos = mgmt->u.assoc_resp.variable;15001508 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems);
+3-4
net/mac80211/work.c
···10841084 continue;10851085 if (wk->chan != local->tmp_channel)10861086 continue;10871087- if (ieee80211_work_ct_coexists(wk->chan_type,10881088- local->tmp_channel_type))10871087+ if (!ieee80211_work_ct_coexists(wk->chan_type,10881088+ local->tmp_channel_type))10891089 continue;10901090 remain_off_channel = true;10911091 }1092109210931093 if (!remain_off_channel && local->tmp_channel) {10941094- bool on_oper_chan = ieee80211_cfg_on_oper_channel(local);10951094 local->tmp_channel = NULL;10961095 /* If tmp_channel wasn't operating channel, then10971096 * we need to go back on-channel.···11001101 * we still need to do a hardware config. Currently,11011102 * we cannot be here while scanning, however.11021103 */11031103- if (ieee80211_cfg_on_oper_channel(local) && !on_oper_chan)11041104+ if (!ieee80211_cfg_on_oper_channel(local))11041105 ieee80211_hw_config(local, 0);1105110611061107 /* At the least, we need to disable offchannel_ps,