tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
ath10k-pending-sdio-usb
head: 3ea6ce40aecf119c80d392db5ca8dbf87010ff52
commit: 3ea6ce40aecf119c80d392db5ca8dbf87010ff52 [16/16] HACK: ath10k: high
latency fixes for beacon buffer
config: i386-randconfig-x0-02240950 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
git checkout 3ea6ce40aecf119c80d392db5ca8dbf87010ff52
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_add_interface':
>> drivers/net/wireless/ath/ath10k/mac.c:5223:26: warning: cast from pointer to
>> integer of different size [-Wpointer-to-int-cast]
arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf;
^
vim +5223 drivers/net/wireless/ath/ath10k/mac.c
5086
5087 /*
5088 * TODO:
5089 * Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
5090 * because we will send mgmt frames without CCK. This requirement
5091 * for P2P_FIND/GO_NEG should be handled by checking CCK flag
5092 * in the TX packet.
5093 */
5094 static int ath10k_add_interface(struct ieee80211_hw *hw,
5095 struct ieee80211_vif *vif)
5096 {
5097 struct ath10k *ar = hw->priv;
5098 struct ath10k_vif *arvif = (void *)vif->drv_priv;
5099 struct ath10k_peer *peer;
5100 enum wmi_sta_powersave_param param;
5101 int ret = 0;
5102 u32 value;
5103 int bit;
5104 int i;
5105 u32 vdev_param;
5106
5107 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD;
5108
5109 mutex_lock(>conf_mutex);
5110
5111 memset(arvif, 0, sizeof(*arvif));
5112 ath10k_mac_txq_init(vif->txq);
5113
5114 arvif->ar = ar;
5115 arvif->vif = vif;
5116
5117 INIT_LIST_HEAD(>list);
5118 INIT_WORK(>ap_csa_work, ath10k_mac_vif_ap_csa_work);
5119 INIT_DELAYED_WORK(>connection_loss_work,
5120ath10k_mac_vif_sta_connection_loss_work);
5121
5122 for (i = 0; i < ARRAY_SIZE(arvif->bitrate_mask.control); i++) {
5123 arvif->bitrate_mask.control[i].legacy = 0x;
5124 memset(arvif->bitrate_mask.control[i].ht_mcs, 0xff,
5125 sizeof(arvif->bitrate_mask.control[i].ht_mcs));
5126 memset(arvif->bitrate_mask.control[i].vht_mcs, 0xff,
5127 sizeof(arvif->bitrate_mask.control[i].vht_mcs));
5128 }
5129
5130 if (ar->num_peers >= ar->max_num_peers) {
5131 ath10k_warn(ar, "refusing vdev creation due to
insufficient peer entry resources in firmware\n");
5132 ret = -ENOBUFS;
5133 goto err;
5134 }
5135
5136 if (ar->free_vdev_map == 0) {
5137 ath10k_warn(ar, "Free vdev map is empty, no more
interfaces allowed.\n");
5138 ret = -EBUSY;
5139 goto err;
5140 }
5141 bit = __ffs64(ar->free_vdev_map);
5142
5143 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac create vdev %i map %llx\n",
5144 bit, ar->free_vdev_map);
5145
5146 arvif->vdev_id = bit;
5147 arvif->vdev_subtype =
5148 ath10k_wmi_get_vdev_subtype(ar, WMI_VDEV_SUBTYPE_NONE);
5149
5150 switch (vif->type) {
5151 case NL80211_IFTYPE_P2P_DEVICE:
5152 arvif->vdev_type = WMI_VDEV_TYPE_STA;
5153 arvif->vdev_subtype = ath10k_wmi_get_vdev_subtype
5154 (ar,
WMI_VDEV_SUBTYPE_P2P_DEVICE);
5155 break;
5156 case NL80211_IFTYPE_UNSPECIFIED:
5157 case NL80211_IFTYPE_STATION:
5158 arvif->vdev_type = WMI_VDEV_TYPE_STA;
5159 if (vif->p2p)
5160 arvif->vdev_subtype =
ath10k_wmi_get_vdev_subtype
5161 (ar,
WMI_VDEV_SUBTYPE_P2P_CLIENT);
5162 break;
5163 case NL80211_IFTYPE_ADHOC:
5164 arvif->vdev_type = WMI_VDEV_TYPE_IBSS;
5165 break;
5166 case NL80211_IFTYPE_MESH_POINT:
5167 if (test_bit(WMI_SERVICE_MESH_11S, ar->wmi.svc_map)) {
5168 arvif->vdev_subtype =
ath10k_wmi_get_vdev_subtype
5169 (ar,
WMI_VDEV_SUBTYPE_MESH_11S);
5170 } else if (!test_bit(ATH10K_FLAG_RAW_MODE,
>dev_flags)) {
5171 ret = -EINVAL;
5172 ath10k_warn(ar, "must load driver with
rawmode=1