Hi,

[auto build test ERROR on mac80211/master]
[also build test ERROR on v4.7-rc7]
[cannot apply to mac80211-next/master next-20160715]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Alex-Briskin/New-function-ieee80211_is_skb_handled_by_pkt_type/20160715-195540
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git 
master
config: alpha-defconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=alpha 

All error/warnings (new ones prefixed by >>):

>> net/mac80211/iface.c:1249:11: warning: 'struct ieee80211_sub_if_datai' 
>> declared inside parameter list
       struct ieee80211_sub_if_datai *sdata)
              ^
>> net/mac80211/iface.c:1249:11: warning: its scope is only this definition or 
>> declaration, which is probably not what you want
   net/mac80211/iface.c: In function 'mac80211_is_skb_handled_by_frame_control':
>> net/mac80211/iface.c:1251:39: error: dereferencing pointer to incomplete 
>> type 'struct ieee80211_sub_if_datai'
     struct ieee80211_local *local = sdata->local;
                                          ^
>> net/mac80211/iface.c:1260:26: error: passing argument 1 of 
>> 'sta_info_get_bss' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
      sta = sta_info_get_bss(sdata, mgmt->sa);
                             ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
                    from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
    struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
                     ^
>> net/mac80211/iface.c:1272:29: error: passing argument 1 of 
>> 'ieee80211_process_delba' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
        ieee80211_process_delba(sdata, sta, mgmt, len);
                                ^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1700:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
    void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
         ^
>> net/mac80211/iface.c:1284:32: error: passing argument 1 of 
>> 'ieee80211_process_mu_groups' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
       ieee80211_process_mu_groups(sdata, mgmt);
                                   ^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1737:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
    void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
         ^
   net/mac80211/iface.c:1309:26: error: passing argument 1 of 
'sta_info_get_bss' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
      sta = sta_info_get_bss(sdata, mgmt->sa);
                             ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
                    from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
    struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
                     ^
   net/mac80211/iface.c: In function 'ieee80211_iface_work':
>> net/mac80211/iface.c:1366:54: error: passing argument 2 of 
>> 'mac80211_is_skb_handled_by_frame_control' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
          !mac80211_is_skb_handled_by_frame_control(skb, sdata)) {
                                                         ^
   net/mac80211/iface.c:1248:13: note: expected 'struct ieee80211_sub_if_datai 
*' but argument is of type 'struct ieee80211_sub_if_data *'
    static bool mac80211_is_skb_handled_by_frame_control(struct sk_buff *skb,
                ^
   cc1: some warnings being treated as errors

vim +1251 net/mac80211/iface.c

4ea9593c0 Alex Briskin  2016-07-15  1243        }
4ea9593c0 Alex Briskin  2016-07-15  1244        /*will return true if pkt_type 
found and handled */
4ea9593c0 Alex Briskin  2016-07-15  1245        return true;
4ea9593c0 Alex Briskin  2016-07-15  1246  }
4ea9593c0 Alex Briskin  2016-07-15  1247  
9ea4267a9 Alex Briskin  2016-07-15  1248  static bool 
mac80211_is_skb_handled_by_frame_control(struct sk_buff *skb,
9ea4267a9 Alex Briskin  2016-07-15 @1249                        struct 
ieee80211_sub_if_datai *sdata)
4ea9593c0 Alex Briskin  2016-07-15  1250  {
4ea9593c0 Alex Briskin  2016-07-15 @1251        struct ieee80211_local *local = 
sdata->local;
4ea9593c0 Alex Briskin  2016-07-15  1252        struct sta_info *sta;
4ea9593c0 Alex Briskin  2016-07-15  1253        struct ieee80211_mgmt *mgmt = 
(void *)skb->data;
4ea9593c0 Alex Briskin  2016-07-15  1254  
f10059ca6 Alex Briskin  2016-07-15  1255        if 
(ieee80211_is_action(mgmt->frame_control) &&
bed7ee6e4 Johannes Berg 2010-06-10  1256            mgmt->u.action.category == 
WLAN_CATEGORY_BACK) {
bed7ee6e4 Johannes Berg 2010-06-10  1257                int len = skb->len;
bed7ee6e4 Johannes Berg 2010-06-10  1258  
a93e36443 Johannes Berg 2010-06-10  1259                
mutex_lock(&local->sta_mtx);
875ae5f68 Felix Fietkau 2010-07-17 @1260                sta = 
sta_info_get_bss(sdata, mgmt->sa);
bed7ee6e4 Johannes Berg 2010-06-10  1261                if (sta) {
bed7ee6e4 Johannes Berg 2010-06-10  1262                        switch 
(mgmt->u.action.u.addba_req.action_code) {
bed7ee6e4 Johannes Berg 2010-06-10  1263                        case 
WLAN_ACTION_ADDBA_REQ:
f10059ca6 Alex Briskin  2016-07-15  1264                                
ieee80211_process_addba_request(local, sta,
f10059ca6 Alex Briskin  2016-07-15  1265                                        
                        mgmt, len);
bed7ee6e4 Johannes Berg 2010-06-10  1266                                break;
bed7ee6e4 Johannes Berg 2010-06-10  1267                        case 
WLAN_ACTION_ADDBA_RESP:
bed7ee6e4 Johannes Berg 2010-06-10  1268                                
ieee80211_process_addba_resp(local, sta,
bed7ee6e4 Johannes Berg 2010-06-10  1269                                        
                     mgmt, len);
bed7ee6e4 Johannes Berg 2010-06-10  1270                                break;
bed7ee6e4 Johannes Berg 2010-06-10  1271                        case 
WLAN_ACTION_DELBA:
f10059ca6 Alex Briskin  2016-07-15 @1272                                
ieee80211_process_delba(sdata, sta, mgmt, len);
bed7ee6e4 Johannes Berg 2010-06-10  1273                                break;
bed7ee6e4 Johannes Berg 2010-06-10  1274                        default:
bed7ee6e4 Johannes Berg 2010-06-10  1275                                
WARN_ON(1);
bed7ee6e4 Johannes Berg 2010-06-10  1276                                break;
bed7ee6e4 Johannes Berg 2010-06-10  1277                        }
bed7ee6e4 Johannes Berg 2010-06-10  1278                }
a93e36443 Johannes Berg 2010-06-10  1279                
mutex_unlock(&local->sta_mtx);
23a1f8d44 Sara Sharon   2015-12-08  1280        } else if 
(ieee80211_is_action(mgmt->frame_control) &&
23a1f8d44 Sara Sharon   2015-12-08  1281                   
mgmt->u.action.category == WLAN_CATEGORY_VHT) {
23a1f8d44 Sara Sharon   2015-12-08  1282                switch 
(mgmt->u.action.u.vht_group_notif.action_code) {
23a1f8d44 Sara Sharon   2015-12-08  1283                case 
WLAN_VHT_ACTION_GROUPID_MGMT:
23a1f8d44 Sara Sharon   2015-12-08 @1284                        
ieee80211_process_mu_groups(sdata, mgmt);
23a1f8d44 Sara Sharon   2015-12-08  1285                        break;
23a1f8d44 Sara Sharon   2015-12-08  1286                default:
23a1f8d44 Sara Sharon   2015-12-08  1287                        WARN_ON(1);
23a1f8d44 Sara Sharon   2015-12-08  1288                        break;
23a1f8d44 Sara Sharon   2015-12-08  1289                }
344eec67c Johannes Berg 2010-06-10  1290        } else if 
(ieee80211_is_data_qos(mgmt->frame_control)) {
344eec67c Johannes Berg 2010-06-10  1291                struct ieee80211_hdr 
*hdr = (void *)mgmt;
344eec67c Johannes Berg 2010-06-10  1292                /*
344eec67c Johannes Berg 2010-06-10  1293                 * So the frame isn't 
mgmt, but frame_control
344eec67c Johannes Berg 2010-06-10  1294                 * is at the right 
place anyway, of course, so
344eec67c Johannes Berg 2010-06-10  1295                 * the if statement is 
correct.
344eec67c Johannes Berg 2010-06-10  1296                 *
344eec67c Johannes Berg 2010-06-10  1297                 * Warn if we have 
other data frame types here,
344eec67c Johannes Berg 2010-06-10  1298                 * they must not get 
here.
344eec67c Johannes Berg 2010-06-10  1299                 */
344eec67c Johannes Berg 2010-06-10  1300                
WARN_ON(hdr->frame_control &
344eec67c Johannes Berg 2010-06-10  1301                        
cpu_to_le16(IEEE80211_STYPE_NULLFUNC));
f10059ca6 Alex Briskin  2016-07-15  1302                WARN_ON(!(hdr->seq_ctrl 
& cpu_to_le16(IEEE80211_SCTL_FRAG)));
344eec67c Johannes Berg 2010-06-10  1303                /*
344eec67c Johannes Berg 2010-06-10  1304                 * This was a fragment 
of a frame, received while
344eec67c Johannes Berg 2010-06-10  1305                 * a block-ack session 
was active. That cannot be
344eec67c Johannes Berg 2010-06-10  1306                 * right, so terminate 
the session.
344eec67c Johannes Berg 2010-06-10  1307                 */
a93e36443 Johannes Berg 2010-06-10  1308                
mutex_lock(&local->sta_mtx);
875ae5f68 Felix Fietkau 2010-07-17 @1309                sta = 
sta_info_get_bss(sdata, mgmt->sa);
344eec67c Johannes Berg 2010-06-10  1310                if (sta) {
344eec67c Johannes Berg 2010-06-10  1311                        u16 tid = 
*ieee80211_get_qos_ctl(hdr) &
344eec67c Johannes Berg 2010-06-10  1312                            
IEEE80211_QOS_CTL_TID_MASK;
344eec67c Johannes Berg 2010-06-10  1313  
f10059ca6 Alex Briskin  2016-07-15  1314                        
__ieee80211_stop_rx_ba_session(sta, tid,
f10059ca6 Alex Briskin  2016-07-15  1315                                        
               WLAN_BACK_RECIPIENT,
53f73c09d Johannes Berg 2010-10-05  1316                                        
               WLAN_REASON_QSTA_REQUIRE_SETUP,
53f73c09d Johannes Berg 2010-10-05  1317                                        
               true);
344eec67c Johannes Berg 2010-06-10  1318                }
a93e36443 Johannes Berg 2010-06-10  1319                
mutex_unlock(&local->sta_mtx);
f10059ca6 Alex Briskin  2016-07-15  1320        } else {
f10059ca6 Alex Briskin  2016-07-15  1321                return false;
f10059ca6 Alex Briskin  2016-07-15  1322        }
f10059ca6 Alex Briskin  2016-07-15  1323        return true;
f10059ca6 Alex Briskin  2016-07-15  1324  }
f10059ca6 Alex Briskin  2016-07-15  1325  
9ea4267a9 Alex Briskin  2016-07-15  1326  static void 
mac80211_skb_handle_by_vif_type(struct sk_buff *skb,
698f121a4 Alex Briskin  2016-07-15  1327                                        
    struct ieee80211_sub_if_data *sdata)
698f121a4 Alex Briskin  2016-07-15  1328  {
698f121a4 Alex Briskin  2016-07-15  1329        switch (sdata->vif.type) {
698f121a4 Alex Briskin  2016-07-15  1330        case NL80211_IFTYPE_STATION:
698f121a4 Alex Briskin  2016-07-15  1331                
ieee80211_sta_rx_queued_mgmt(sdata, skb);
698f121a4 Alex Briskin  2016-07-15  1332                break;
698f121a4 Alex Briskin  2016-07-15  1333        case NL80211_IFTYPE_ADHOC:
698f121a4 Alex Briskin  2016-07-15  1334                
ieee80211_ibss_rx_queued_mgmt(sdata, skb);
698f121a4 Alex Briskin  2016-07-15  1335                break;
698f121a4 Alex Briskin  2016-07-15  1336        case NL80211_IFTYPE_MESH_POINT:
698f121a4 Alex Briskin  2016-07-15  1337                if 
(!ieee80211_vif_is_mesh(&sdata->vif))
698f121a4 Alex Briskin  2016-07-15  1338                        break;
698f121a4 Alex Briskin  2016-07-15  1339                
ieee80211_mesh_rx_queued_mgmt(sdata, skb);
698f121a4 Alex Briskin  2016-07-15  1340                break;
698f121a4 Alex Briskin  2016-07-15  1341        default:
698f121a4 Alex Briskin  2016-07-15  1342                WARN(1, "frame for 
unexpected interface type");
698f121a4 Alex Briskin  2016-07-15  1343                break;
698f121a4 Alex Briskin  2016-07-15  1344        }
698f121a4 Alex Briskin  2016-07-15  1345  }
698f121a4 Alex Briskin  2016-07-15  1346  
f10059ca6 Alex Briskin  2016-07-15  1347  static void 
ieee80211_iface_work(struct work_struct *work)
f10059ca6 Alex Briskin  2016-07-15  1348  {
f10059ca6 Alex Briskin  2016-07-15  1349        struct ieee80211_sub_if_data 
*sdata =
f10059ca6 Alex Briskin  2016-07-15  1350                container_of(work, 
struct ieee80211_sub_if_data, work);
f10059ca6 Alex Briskin  2016-07-15  1351        struct ieee80211_local *local = 
sdata->local;
f10059ca6 Alex Briskin  2016-07-15  1352        struct sk_buff *skb;
f10059ca6 Alex Briskin  2016-07-15  1353  
f10059ca6 Alex Briskin  2016-07-15  1354        if 
(!ieee80211_sdata_running(sdata))
f10059ca6 Alex Briskin  2016-07-15  1355                return;
f10059ca6 Alex Briskin  2016-07-15  1356  
f10059ca6 Alex Briskin  2016-07-15  1357        if (test_bit(SCAN_SW_SCANNING, 
&local->scanning))
f10059ca6 Alex Briskin  2016-07-15  1358                return;
f10059ca6 Alex Briskin  2016-07-15  1359  
f10059ca6 Alex Briskin  2016-07-15  1360        if 
(!ieee80211_can_run_worker(local))
f10059ca6 Alex Briskin  2016-07-15  1361                return;
f10059ca6 Alex Briskin  2016-07-15  1362  
f10059ca6 Alex Briskin  2016-07-15  1363        /* first process frames */
f10059ca6 Alex Briskin  2016-07-15  1364        while ((skb = 
skb_dequeue(&sdata->skb_queue))) {
9ea4267a9 Alex Briskin  2016-07-15  1365                if 
(!mac80211_is_skb_handled_by_pkt_type(skb, sdata) &&
9ea4267a9 Alex Briskin  2016-07-15 @1366                    
!mac80211_is_skb_handled_by_frame_control(skb, sdata)) {
9ea4267a9 Alex Briskin  2016-07-15  1367                        
mac80211_skb_handle_by_vif_type(skb, sdata);
1fa57d017 Johannes Berg 2010-06-10  1368                }
36b3a628a Johannes Berg 2010-06-10  1369  

:::::: The code at line 1251 was first introduced by commit
:::::: 4ea9593c0fc996ef6869e82aefc22a58ee6186f7 New function 
ieee80211_is_skb_handled_by_pkt_type

:::::: TO: Alex Briskin <[email protected]>
:::::: CC: 0day robot <[email protected]>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data

Reply via email to